If you benefit from web2py hope you feel encouraged to pay it forward by contributing back to society in whatever form you choose!


  • 0
    rochacbruno  12 years ago

    Doing on Shell:

    $ python web2py.py -S yourappname -M
    
    # import needed objects
    >>> from movuca import DataBase, User
    >>> from datamodel.article import ContentType
    
    # create db instance with some objects(tables) defined
    >>> db = DataBase([User, ContentType])
    
    # insert a new content_type (according the datamodel in modules/contenttypes.py)
    >>> db.ContentType.insert(title="question", description="User Questions", identifier="Question", classname="Question", viewname="question", tablename="question_data")
    
    # commit
    >>> db.commit()

Commented on:

Hi.

 

I have installed movuca at:

 

http://mutabit.com/ubakye

 

So far, so good. But I have only Article and Status update content types. There is any way of adding the "question" content type already available on web2pyslices? (I'm also aware of the tutorial about adding new content types).

 

Cheers


Hosting graciously provided by:
Python Anywhere