List Info

Thread: Admin class not working




Admin class not working
user name
2006-11-22 22:50:40
Hello,

I'm new to Django so please excuse my ignorance...

I tried to add my model to the admin index page as described
on

http://www.djangoproject.com/documentation/tutorial2

But my model still isn't listed on the admin page.

Here's my code:

------------------------------------------------------------
------------------------------------------------------------
from django.db import models

class Poll(models.Model):
    question = models.CharField(maxlength=200)
    pub_date = models.DateTimeField('date published')
    class Admin:
        pass

class Choice(models.Model):
    poll = models.ForeignKey(Poll)
    choice = models.CharField(maxlength=200)
    votes = models.IntegerField()
------------------------------------------------------------
------------------------------------------------------------

I'm not getting any errors either. Any ideas? I'm using
Django 0.95.


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Admin class not working
user name
2006-11-22 23:35:44
On 11/22/06, 3T <thetruetribegmail.com> wrote:
> I tried to add my model to the admin index page as
described on
> 
http://www.djangoproject.com/documentation/tutorial2
>
> But my model still isn't listed on the admin page.

Hi 3T,

Here are a few things to check on:

* Make sure your admin user account has permission to add
and/or
change objects in the admin site. An easy way to ensure this
is to
give your user account superuser privileges.

* Restart your Web server to make sure all the code changes
have taken effect.

Adrian

-- 
Adrian Holovaty
holovaty.com | djangoproject.com

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Admin class not working
user name
2006-11-23 15:04:04
3T,

You could also try running ./manage.py validate to see if
you have any
errors in your models

Best,

Alan


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )