Re: How to syncdb programatically (django standalone script) ?

2012-11-20 Thread Samar Agrawal
Wow this is the coolest thing...thnx On Tuesday, 16 September 2008 07:20:24 UTC+5:30, Steve Holden wrote: > > Mathieu Leplatre wrote: > > Hi all, > > > > I found many post about specific errors regarding django as a > > standalone tool. > > > > With a little bit of researching, I ended up with thi

Re: How to syncdb programatically (django standalone script) ?

2012-04-23 Thread Fábio Santos
There's a problem in your INSTALLED_APPS setting. You have to use: ('polls',) Notice the trailing comma. When writing tuples with one item, you must have a traling comma. It indicates that you are writing a tuple, and not simply an expression enclosed in parenthesis. A workaround is to use a li

Re: How to syncdb programatically (django standalone script) ?

2008-09-17 Thread Mathieu Leplatre
Ronaldo, from what I read about signals, I don't think they would help me writing a standalone script... On Sep 17, 8:15 am, "Ronaldo Zacarias Afonso" <[EMAIL PROTECTED]> wrote: > Hi, I think you can use "Django signal feature". Threre is > documentation about that in the Django documentation web

Re: How to syncdb programatically (django standalone script) ?

2008-09-17 Thread Ronaldo Zacarias Afonso
Hi, I think you can use "Django signal feature". Threre is documentation about that in the Django documentation web site. I hope it was helpfull []s Ronaldo. On Tue, Sep 16, 2008 at 7:53 PM, Mathieu Leplatre <[EMAIL PROTECTED]> wrote: > > Should I post a new thread ? > I cannot find anythin

Re: How to syncdb programatically (django standalone script) ?

2008-09-16 Thread Mathieu Leplatre
Should I post a new thread ? I cannot find anything about this way of using Django... On Sep 16, 9:12 am, Mathieu Leplatre <[EMAIL PROTECTED]> wrote: > Thanks for the tip. > > Indeed it loooks to be the way, however I am having app_label > errors... > It complains > Error: No module named p > (fo

Re: How to syncdb programatically (django standalone script) ?

2008-09-16 Thread Mathieu Leplatre
Thanks for the tip. Indeed it loooks to be the way, however I am having app_label errors... It complains Error: No module named p (for polls) If I put my script in a module or remove Meta : File "[...]/django/db/models/base.py", line 51, in __new__ kwargs = {"app_label": model_module.__name

Re: How to syncdb programatically (django standalone script) ?

2008-09-15 Thread James Bennett
On Mon, Sep 15, 2008 at 8:50 PM, Steve Holden <[EMAIL PROTECTED]> wrote: > This is k=nd of a wild-assed guess. Please tell me if it works. > > from django.core.management import call_command > call_command('syncdb') That is the way to do it; the whole manage.py/django-admin.py system was refactor

Re: How to syncdb programatically (django standalone script) ?

2008-09-15 Thread Steve Holden
Mathieu Leplatre wrote: > Hi all, > > I found many post about specific errors regarding django as a > standalone tool. > > With a little bit of researching, I ended up with this script below. > Unfortunately, it fails on database initialization. > > ... > ... > File "/home/mathieu/Code/uhm/svn/uh

How to syncdb programatically (django standalone script) ?

2008-09-15 Thread Mathieu Leplatre
Hi all, I found many post about specific errors regarding django as a standalone tool. With a little bit of researching, I ended up with this script below. Unfortunately, it fails on database initialization. ... ... File "/home/mathieu/Code/uhm/svn/uhm/django/db/backends/sqlite3/ base.py", lin