Have you done the Django tutorial at
https://docs.djangoproject.com/en/1.6/intro/tutorial01/?

South is highly recommended for managing your database schema:
http://mezzanine.jupo.org/docs/model-customization.html#field-injection-caveats

I would also take a step back and go through http://effectivedjango.com/.

ken




On Mon, Mar 31, 2014 at 11:55 AM, Tameen Malik <[email protected]> wrote:

>  Thank You!
>>>
>>    hmmm see i have created models.py file in project have these lines:
>>
>> from django.db import modelsfrom mezzanine.pages.models import Pageclass 
>> Author(Page):
>>     dob = models.DateField("Date of birth")
>> class Book(models.Model):
>>     author = models.ForeignKey("Author")
>>     cover = models.ImageField(upload_to="authors")
>>
>> and admin.py with these:
>>
>> from django.contrib import adminfrom mezzanine.pages.admin import 
>> PageAdminfrom .models import Author
>>
>>
>
>> admin.site.register(Author, PageAdmin)
>>
>>
>> Now i write these commands: python manage.py syncdb,  python manage.py
>> migrate,
>> and then open python shell to write  Author.objects.create(dob =
>> "12/12/2014")
>>
>> That generates error that author is not defined. It's true because no
>> tables created in my database.!
>>
>
>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to