WaZaRWiki : DjangoFramework

GaelReignier :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register :: Hosted by: eNiX

Revision [36407]

Most recent edit made on 2011-05-30 13:40:51 by GaelReignier

Additions:

Displaying different columns:




Revision [36406]

Edited on 2011-05-30 13:32:53 by GaelReignier

Additions:
class stockAdmin ( admin.ModelAdmin ):
inlines = [stockPriceInline]




Revision [36405]

Edited on 2011-05-30 13:32:01 by GaelReignier

Additions:

Managing the admin panel

example:
%%(python)
class stockInline ( admin.TabularInline ): # admin.StackedInline
model = Stock
extra = 3


Deletions:

django notes





Revision [36404]

Edited on 2011-05-30 13:30:18 by GaelReignier

Additions:
ITTips





Revision [36403]

The oldest known version of this page was edited on 2011-05-30 13:29:40 by GaelReignier

django notes


Create a project

django-admin.py startproject mysite


Create a new app:

Several apps can exist in the same project

python manage.py startapp polls


Sync the view with the db

python manage.py syncdb


Run the test server
python manage.py runserver 8080


Show what SQL statements will be generated from models

python manage.py sql appName


Commit the databases changes to the database
python manage.py syncdb
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.2360 seconds