Django doesn't touch tables that already exists in database.
So if you had model Poll run syncdb and then change, add or remove
fields Django doesn't modify underlying table.
There is few options that resolves your problem:
- Manually migrate your database using plain SQL.
- Recreate table or
thanks alot... but i have set it but again it's showing new error..
like...
C:\mysite>python manage.py shell
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>>
Now look your Poll model and try to find field "pub_date" there...
:)
6.2.2013 11:03, Avnesh Shakya kirjoitti:
thanks.. i have added my polls.models file
On Wed, Feb 6, 2013 at 2:20 PM, Sergiy Khohlov > wrote:
1) please provide your model
thanks.. i have added my polls.models file
On Wed, Feb 6, 2013 at 2:20 PM, Sergiy Khohlov wrote:
> 1) please provide your model Poll
> 2) are you run syncdb ?
> Many thanks,
>
> Serge
>
>
> +380 636150445
> skype: skhohlov
>
>
> 2013/2/6 Avnesh Shakya
thanks. i m adding my polls file...
On Wed, Feb 6, 2013 at 2:20 PM, Sergiy Khohlov wrote:
> 1) please provide your model Poll
> 2) are you run syncdb ?
> Many thanks,
>
> Serge
>
>
> +380 636150445
> skype: skhohlov
>
>
> 2013/2/6 Avnesh Shakya :
> >
>
1) please provide your model Poll
2) are you run syncdb ?
Many thanks,
Serge
+380 636150445
skype: skhohlov
2013/2/6 Avnesh Shakya :
>
> Here i want to explore database API but it's generating error..
> C:\mysite>python manage.py shell
> Python 2.7.3 (default,
Here i want to explore database API but it's generating error..
C:\mysite>python manage.py shell
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from
7 matches
Mail list logo