Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
error
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
xina towner  
View profile  
 More options Feb 13, 6:51 am
From: xina towner <xinatow...@gmail.com>
Date: Mon, 13 Feb 2012 12:51:03 +0100
Local: Mon, Feb 13 2012 6:51 am
Subject: error

Hi, I get this message when I try to acces to the admin page:

AlreadyRegistered at /admin

The model Location is already registered

does anybody know which is the problem?

--
Grŕcies,

Rubén


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathan Paugh  
View profile  
 More options Feb 13, 1:02 pm
From: Jonathan Paugh <jpa...@gmx.us>
Date: Mon, 13 Feb 2012 13:02:51 -0500
Local: Mon, Feb 13 2012 1:02 pm
Subject: Re: error
On 02/13/2012 06:51 AM, xina towner wrote:

> Hi, I get this message when I try to acces to the admin page:

> AlreadyRegistered at /admin

> The model Location is already registered

> does anybody know which is the problem?

This is a horrible, horrible problem which I've worked around as follows:

from django.contrib.admin import site

def adminRegister(model, admin_class=None, **kwargs):
  '''(Re)register a model with the AdminSite site.'''
  if model in site._registry:
    site.unregister(model)
  site.register(model, admin_class, **kwargs)

class MagicModel(models.Model):
  pass
adminRegister(MagicModel)

I encountered this whenever I tried to run ./manage.py shell and
./manage.py runserver at the same time. If I understood what I read in
the development list, though, this is being fixed for release 1.4.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »