django - South letting syncdb do all the job -
when try run syncdb django can create tables , south's tables, creates tables south's , other app should not create, south should. look:
patricks-mac-mini:tsm_telecom patrickbassut$ python manage.py syncdb syncing... creating tables ... creating table auth_permission creating table auth_group_permissions creating table auth_group creating table auth_user_groups creating table auth_user_user_permissions creating table auth_user creating table django_content_type creating table django_session creating table django_site creating table south_migrationhistory installed django's auth system, means don't have superusers defined. create 1 now? (yes/no): no installing custom sql ... installing indexes ... installed 0 object(s) 0 fixture(s) synced: > django.contrib.auth > django.contrib.contenttypes > django.contrib.sessions > django.contrib.sites > django.contrib.messages > django.contrib.staticfiles > south not synced (use migrations): - (use ./manage.py migrate migrate these)
here, added app installed_apps try trick django, or whatever is.
patricks-mac-mini:tsm_telecom patrickbassut$ python manage.py syncdb syncing... creating tables ... creating table tb_lines creating table tb_location creating table tb_company_lines creating table tb_company creating table tb_client creating table tb_bills installing custom sql ... installing indexes ... installed 0 object(s) 0 fixture(s) synced: > django.contrib.auth > django.contrib.contenttypes > django.contrib.sessions > django.contrib.sites > django.contrib.messages > django.contrib.staticfiles > core > south not synced (use migrations): - (use ./manage.py migrate migrate these) patricks-mac-mini:tsm_telecom patrickbassut$ python manage.py schemamigration core --initial valueerror: empty module name
sorry forgot settings.py. sending requested:
# django settings tsm_telecom project. import os debug = true template_debug = debug workdir = os.path.dirname(os.path.dirname(__file__)) admins = ( ('patrick bassut', 'patrickbassut@hotmail.com'), # ('luis henrique', 'hacker_wap@yahoo.com.br'), ) managers = admins databases = { 'default': { 'engine': 'django.db.backends.mysql', # add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'name': 'tsm_telecom', # or path database file if using sqlite3. # following settings not used sqlite3: 'user': 'root', 'password': 'root', 'host': '127.0.0.1', # empty localhost through domain sockets or '127.0.0.1' localhost through tcp. 'port': '3306', # set empty string default. } } # hosts/domain names valid site; required if debug false # see https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts allowed_hosts = [] # local time zone installation. choices can found here: # http://en.wikipedia.org/wiki/list_of_tz_zones_by_name # although not choices may available on operating systems. # in windows environment must set system time zone. time_zone = 'america/sao_paulo' # language code installation. choices can found here: # http://www.i18nguy.com/unicode/language-identifiers.html language_code = 'en-us' site_id = 1 # if set false, django make optimizations not # load internationalization machinery. use_i18n = true # if set false, django not format dates, numbers , # calendars according current locale. use_l10n = true # if set false, django not use timezone-aware datetimes. use_tz = true # absolute filesystem path directory hold user-uploaded files. # example: "/var/www/example.com/media/" media_root = '' # url handles media served media_root. make sure use # trailing slash. # examples: "http://example.com/media/", "http://media.example.com/" media_url = '' # absolute path directory static files should collected to. # don't put in directory yourself; store static files # in apps' "static/" subdirectories , in staticfiles_dirs. # example: "/var/www/example.com/static/" static_root = '' # url prefix static files. # example: "http://example.com/static/", "http://static.example.com/" static_url = '/static/' # additional locations of static files staticfiles_dirs = ( # put strings here, "/home/html/static" or "c:/www/django/static". # use forward slashes, on windows. # don't forget use absolute paths, not relative paths. workdir + '/static', ) # list of finder classes know how find static files in # various locations. staticfiles_finders = ( 'django.contrib.staticfiles.finders.filesystemfinder', 'django.contrib.staticfiles.finders.appdirectoriesfinder', # 'django.contrib.staticfiles.finders.defaultstoragefinder', ) # make unique, , don't share anybody. secret_key = 'w*+f*_!)%2kzsbqwszj0amt5_rt-q*njruutvy97n88mr08ci!' # list of callables know how import templates various sources. template_loaders = ( 'django.template.loaders.filesystem.loader', 'django.template.loaders.app_directories.loader', # 'django.template.loaders.eggs.loader', ) middleware_classes = ( 'django.middleware.common.commonmiddleware', 'django.contrib.sessions.middleware.sessionmiddleware', 'django.middleware.csrf.csrfviewmiddleware', 'django.contrib.auth.middleware.authenticationmiddleware', 'django.contrib.messages.middleware.messagemiddleware', # uncomment next line simple clickjacking protection: # 'django.middleware.clickjacking.xframeoptionsmiddleware', ) root_urlconf = 'django_related.urls' # python dotted path wsgi application used django's runserver. wsgi_application = 'django_related.wsgi.application' template_dirs = ( # put strings here, "/home/html/django_templates" or "c:/www/django/templates". # use forward slashes, on windows. # don't forget use absolute paths, not relative paths. workdir + '/templates', ) installed_apps = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', # uncomment next line enable admin: # 'django.contrib.admin', # uncomment next line enable admin documentation: # 'django.contrib.admindocs', 'core', 'south', ) # sample logging configuration. tangible logging # performed configuration send email # site admins on every http 500 error when debug=false. # see http://docs.djangoproject.com/en/dev/topics/logging # more details on how customize logging configuration. logging = { 'version': 1, 'disable_existing_loggers': false, 'filters': { 'require_debug_false': { '()': 'django.utils.log.requiredebugfalse' } }, 'handlers': { 'mail_admins': { 'level': 'error', 'filters': ['require_debug_false'], 'class': 'django.utils.log.adminemailhandler' } }, 'loggers': { 'django.request': { 'handlers': ['mail_admins'], 'level': 'error', 'propagate': true, }, } } if debug: installed_apps += ( # debug toolbar https://github.com/django-debug-toolbar/django-debug-toolbar 'debug_toolbar', ) debug_toolbar_panels = ( 'debug_toolbar.panels.version.versiondebugpanel', 'debug_toolbar.panels.timer.timerdebugpanel', 'debug_toolbar.panels.settings_vars.settingsvarsdebugpanel', 'debug_toolbar.panels.headers.headerdebugpanel', 'debug_toolbar.panels.request_vars.requestvarsdebugpanel', 'debug_toolbar.panels.template.templatedebugpanel', 'debug_toolbar.panels.sql.sqldebugpanel', 'debug_toolbar.panels.signals.signaldebugpanel', 'debug_toolbar.panels.logger.loggingpanel', ) debug_toolbar_config = { 'intercept_redirects': false, } middleware_classes += ( 'debug_toolbar.middleware.debugtoolbarmiddleware', )
you must generate migrations first python manage.py schemamigration core --initial
. south doesn't block syncdb
apps don't have migrations
directory __init__.py
in it.
Comments
Post a Comment