Django: Unterschied zwischen den Versionen

Aus Open Source Ecology - Germany
Zur Navigation springen Zur Suche springen
Zeile 38: Zeile 38:
 
** manage.py migrate app_name
 
** manage.py migrate app_name
 
* [http://www.djangopro.com/2011/01/django-database-migration-tool-south-explained/ Django database migration tool: south, explained]
 
* [http://www.djangopro.com/2011/01/django-database-migration-tool-south-explained/ Django database migration tool: south, explained]
 +
* Delete migration
 +
** manage.py migrate app_name number_of_migration_to_rollback_to
  
 
==Internationalization==
 
==Internationalization==

Version vom 19. Juli 2013, 19:28 Uhr

Django - a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

Aptana Configuration

  • Win-Preferences->PyDev->Editor->Code Completeion: Apply completion on '.' and '('

Install Packages

Virtualenv

Activate:

  • source <your_environment>/bin/activate
  • . ~/.environments/<your_environment>/bin/activate

Tutorials

Style Guides

Images

Configure with PyCharm

Databases

  • Install Databases
~/.environments/<PROJEKT>env/bin/pip install -r requirements.txt

Migrations

  • Migrate on change of requirements.txt, e.g. new tables are added.
    • <ENV> manage.py migrate
  • Migrate on model change:
    • manage.py schemamigration app_name --auto
    • manage.py migrate app_name
  • Django database migration tool: south, explained
  • Delete migration
    • manage.py migrate app_name number_of_migration_to_rollback_to

Internationalization


If you have problems with translating strings:

REST

Django REST Framework

Hosting

Sites in Django