Login

Manage.py alterdb command

Author:
certator
Posted:
July 18, 2012
Language:
Python
Version:
1.3
Score:
-2 (after 2 ratings)

added commands:

altersql - shows sql code with alter queries

alterdb - apply alter queries. parameters:

--showsql - show queries

--app=APPLICATION - alter only selected application

you need clone this repo

1
2
3
4
5
6
7
# add django_snippets to INSTALLED_APPS

# usage example
# ./manage.py altersql myapp
# ./manage.py alterdb
# ./manage.py alterdb --app=myapp
# ./manage.py alterdb --showsql

More like this

  1. Template tag - list punctuation for a list of items by shapiromatron 10 months, 2 weeks ago
  2. JSONRequestMiddleware adds a .json() method to your HttpRequests by cdcarter 10 months, 3 weeks ago
  3. Serializer factory with Django Rest Framework by julio 1 year, 5 months ago
  4. Image compression before saving the new model / work with JPG, PNG by Schleidens 1 year, 6 months ago
  5. Help text hyperlinks by sa2812 1 year, 6 months ago

Comments

ckarrie2 (on July 18, 2012):

So where is this django_snippets module?

#

jezdez (on July 19, 2012):

It's linked in the description. That said, this is a pretty weak snippet.

#

Please login first before commenting.