On Sat, Oct 25, 2008 at 12:31 AM, astray <[EMAIL PROTECTED]> wrote:

>
> [snip config details]

% models.py %
>
> from django.db import models
>
> class Publisher(models.Model):
>        name = models.CharField(max_length=30)
>        address = models.CharField(max_length=50)
>        city = models.CharField(max_length=60)
>        state_province = models.CharField(max_length=30)
>        country = models.CharField(max_length=50)
>        website = models.URLField()
>        def __str__(self):
>                return self.name
>

Note when using Django 1.0, you should be specifying __unicode__ methods,
not __str__ methods.

[more snipped]


> ==> above are my settings. App name is books. I'm curious about where
> to put admin.py file.
> (Maybe in my app folder (\books)? That's what I'm doing right now.)
>

Yes.


>
> I was at first following my Django book's instruction to create
> administration interface and soon realized that the method on the book
> was not applicable to Django 1.0.
>

The online docs are an excellent reference and are up-to-date:

http://docs.djangoproject.com/en/dev/


> I'm not interested in several options I can override. Just wanting to
> test default interface but It just doesn't work!
>
> with these settings, I encounter this error
>
> --------------------------------------------------------------
> [snipped]
>  File "F:\Python26\Lib\site-packages\django\db\backends\util.py",
> line 19, in execute
>    return self.cursor.execute(sql, params)
>
> ProgrammingError: error:  There's no relation named "django_session"
> <--- message translated by my own because I'm not English user. Just
> focus on the meanig of this message cause this might be not identical.


You need to run manage.py syncdb after adding apps to your INSTALLED_APPS --
this is how the tables for those apps get created.  It sounds like you did
not run syncdb after adding the sessions app to INSTALLED_APPS.

Karen

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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