Hi all,

I am starting a new thread, the first one became off-topic (http://
groups.google.com/group/django-users/browse_thread/thread/
34b501d2d1f88496/f8a5d5ef5aeab62a)

I want to do a simple external script that just relies on django's
ORM.
So I did a single file testdjango.py  :
------
import sys, datetime

from django.conf import settings
settings.configure( DATABASE_ENGINE = "sqlite3",
                    DATABASE_NAME   = "./testbase.db",
                    INSTALLED_APPS = ('polls'))

from django.db import models
class Poll(models.Model):
    question = models.CharField(max_length=200)
    pub_date = models.DateTimeField('date published')
    class Meta:
        app_label = "polls"

# Create sqlite database :
from django.core.management import call_command
call_command('syncdb')
------

I have an error about app_label :
Error: No module named p (first label of my app label)

I tried verbosity=2 and DEBUG=True, but I don't get more information.

If I put my script in a module and remove Meta :
File "[...]/django/db/models/base.py", line 51, in __new__
    kwargs = {"app_label": model_module.__name__.split('.')[-2]}
IndexError: list index out of range

Thanks for your comments !
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to