hello again!
I have some code that throws causes syncdb to throw an error (because it tries to access the model before the tables are created).
Is there a way to keep the code from running on syncdb? something like:
if not syncdb:
run_some_code()
Thanks :)
edit: PS - I thought about using the post_init signal... for the code th...
I wanted to reset a database and issued a drop database followed by a create database
on a postgresql server accessed through psycopg2 by a django app.
When I do ./manage.py syncdb I get the following error:
(prod)root@ns204612:/home/someproject/prod/django-mingus/mingus# ./manage.py syncdb
Traceback (most recent call last):
File "./...
I have 2 models. I run manage.py syncdb but it creates only id fields for 2 models. How to make it generate the remaining fields? Please kindly advise. Your help is much appreciated!
Here's my models.py:
from django.db import models
GENDER_CHOICES = (
('M', 'Male')
, ('F', 'Female')
)
ACTIVATION_CHOICES = (
('Y', 'Activat...
Hello! I'm now making unit-tests for already existing code. I faced the next problem:
After running syncdb for creating test database, Django automatically fills several tables like django_content_type or auth_permissions.
Then, imagine I need to run a complex test, like check the users registration, that will need a lof ot data tables...
What is the best Django syncdb crash debugging technique ?
I've previously asked a question about a problem with manage.py syncdb returning an exception
and the answer was that the app has a wrong import.
http://stackoverflow.com/questions/2734721/django-manage-py-syncdb-not-working
I'd like to know the technique used to find the plac...
Hi All,
I am pretty new to Django.
I want the name of my models to be displayed in Chinese, so i used verbose_name in my meta class of my model, codes below:
#this models.py file is encoded in unicode
class TS_zone(models.Model):
index = models.IntegerField()
zone_name = models.CharField(max_length=50);
zone_icon = models...