Django-fr

Forum

  • Accueil
  • » Django-fr
  • » The model Patient is already registered, je suis totalement bloqué

#1 27-02-2012 15:48:53

beegees
Membre
Inscription : 26-12-2010
Messages : 66

The model Patient is already registered, je suis totalement bloqué

Bonjour à tous,

J'ai besoin de réouvrir un ancien site développé avec Django.

J'ai ouvert le serveur avec python manage.py runserverr.

J'ai par contre un souci :

AlreadyRegistered at /neuro
The model Patient is already registered
Request Method:    GET
Request URL:    http://localhost:8000/neuro
Django Version:    1.2.4
Exception Type:    AlreadyRegistered
Exception Value:   
The model Patient is already registered
Exception Location:    C:\Python26\lib\site-packages\django-1.2.4-py2.6.egg\django\contrib\admin\sites.py in register, line 78
Python Executable:    C:\Python26\python.exe
Python Version:    2.6.6
Python Path:    ['C:\\Users\\David\\Documents\\Dubinfo\\Erasme\\database\\Neuro', 'C:\\Python26\\lib\\site-packages\\django-1.2.4-py2.6.egg', 'C:\\Python26\\lib\\site-packages\\ipython-0.10.1-py2.6.egg', 'C:\\Python26\\lib\\site-packages\\pyreadline-1.6.1-py2.6-win32.egg', 'C:\\Python26\\lib\\site-packages\\sqlalchemy-0.6.5-py2.6.egg', 'C:\\Python26\\lib\\site-packages\\pyexcelerator-0.6.4.1-py2.6.egg', 'C:\\Python26\\lib\\site-packages\\pil-1.1.7-py2.6-win32.egg', 'C:\\Python26\\lib\\site-packages\\django_annoying-0.7.6-py2.6.egg', 'C:\\Python26\\lib\\site-packages\\pyodbc-2.1.8-py2.6-win32.egg', 'C:\\Python26', 'C:\\Python26\\Scripts', 'C:\\Windows\\system32\\python26.zip', 'C:\\Python26\\DLLs', 'C:\\Python26\\lib', 'C:\\Python26\\lib\\plat-win', 'C:\\Python26\\lib\\lib-tk', 'C:\\Python26\\lib\\site-packages', 'C:\\Python26\\lib\\site-packages\\win32', 'C:\\Python26\\lib\\site-packages\\win32\\lib', 'C:\\Python26\\lib\\site-packages\\Pythonwin']
Server time:    Mon, 27 Feb 2012 15:30:26 +0100

Je ne suis pas très bon avec Django.

Merci d'avance pour votre aide.

beegees

Hors ligne

#2 27-02-2012 17:46:38

fsx999
Membre
Inscription : 22-03-2011
Messages : 8

Re : The model Patient is already registered, je suis totalement bloqué

dans les fichiers admin.py, il y a plusieurs une déclaration à l'admin
de ta class Patient

Le 27/02/2012 15:48, beegees a écrit :
> Bonjour à tous,
>
> J'ai besoin de réouvrir un ancien site développé avec Django.
>
> J'ai ouvert le serveur avec python manage.py runserverr.
>
> J'ai par contre un souci :
>
> [quote]
> AlreadyRegistered at /neuro
> The model Patient is already registered
> Request Method:    GET
> Request URL:    http://localhost:8000/neuro
> Django Version:    1.2.4
> Exception Type:    AlreadyRegistered
> Exception Value:   
> The model Patient is already registered
> Exception
> Location:    C:\Python26\lib\site-packages\django-1.2.4-py2.6.egg\django\contrib\admin\sites.py
> in register, line 78
> Python Executable:    C:\Python26\python.exe
> Python Version:    2.6.6
> Python
> Path:    ['C:\\Users\\David\\Documents\\Dubinfo\\Erasme\\database\\Neuro',
> 'C:\\Python26\\lib\\site-packages\\django-1.2.4-py2.6.egg',
> 'C:\\Python26\\lib\\site-packages\\ipython-0.10.1-py2.6.egg',
> 'C:\\Python26\\lib\\site-packages\\pyreadline-1.6.1-py2.6-win32.egg',
> 'C:\\Python26\\lib\\site-packages\\sqlalchemy-0.6.5-py2.6.egg',
> 'C:\\Python26\\lib\\site-packages\\pyexcelerator-0.6.4.1-py2.6.egg',
> 'C:\\Python26\\lib\\site-packages\\pil-1.1.7-py2.6-win32.egg',
> 'C:\\Python26\\lib\\site-packages\\django_annoying-0.7.6-py2.6.egg',
> 'C:\\Python26\\lib\\site-packages\\pyodbc-2.1.8-py2.6-win32.egg',
> 'C:\\Python26', 'C:\\Python26\\Scripts',
> 'C:\\Windows\\system32\\python26.zip', 'C:\\Python26\\DLLs',
> 'C:\\Python26\\lib', 'C:\\Python26\\lib\\plat-win',
> 'C:\\Python26\\lib\\lib-tk', 'C:\\Python26\\lib\\site-packages',
> 'C:\\Python26\\lib\\site-packages\\win32',
> 'C:\\Python26\\lib\\site-packages\\win32\\lib',
> 'C:\\Python26\\lib\\site-packages\\Pythonwin']
> Server time:    Mon, 27 Feb 2012 15:30:26 +0100
> [/quote]
>
> Je ne suis pas très bon avec Django.
>
> Merci d'avance pour votre aide.
>
> beegees
> _______________________________________________
> django mailing list
> django _AT_ lists.afpy.org
> http://lists.afpy.org/mailman/listinfo/django

Hors ligne

#3 27-02-2012 22:22:18

Sébastien Cheminel
Membre
Inscription : 08-12-2011
Messages : 12

Re : The model Patient is already registered, je suis totalement bloqué

Je rajouterai qu'il est possible de dés-enregistrer une class avant de la
réenregistrer.
J'utilise cela surtout pour avoir un formulaire de création de user
spécifique mais peut-être que cela peut correspondre à votre (d'autres?)
cas:

from django.contrib import admin
from django.contrib.auth.models import User
from monprofile.models import MonSuperProfileYouhouForm
admin.site.unregister(User)
admin.site.register(User,MonSuperProfileYouhouForm
)




2012/2/27 polo <fsx999 _AT_ gmail.com>

> dans les fichiers admin.py, il y a plusieurs une déclaration à l'admin de
> ta class Patient
>
> Le 27/02/2012 15:48, beegees a écrit :
>
>  Bonjour à tous,
>>
>> J'ai besoin de réouvrir un ancien site développé avec Django.
>>
>> J'ai ouvert le serveur avec python manage.py runserverr.
>>
>> J'ai par contre un souci :
>>
>> [quote]
>> AlreadyRegistered at /neuro
>> The model Patient is already registered
>> Request Method: GET
>> Request URL:    http://localhost:8000/neuro
>> Django Version: 1.2.4
>> Exception Type: AlreadyRegistered
>> Exception Value:
>> The model Patient is already registered
>> Exception
>> Location:       C:\Python26\lib\site-packages\**
>> django-1.2.4-py2.6.egg\django\**contrib\admin\sites.py
>> in register, line 78
>> Python Executable:      C:\Python26\python.exe
>> Python Version: 2.6.6
>> Python
>> Path:   ['C:\\Users\\David\\Documents\**\Dubinfo\\Erasme\\database\\**
>> Neuro',
>> 'C:\\Python26\\lib\\site-**packages\\django-1.2.4-py2.6.**egg',
>> 'C:\\Python26\\lib\\site-**packages\\ipython-0.10.1-py2.**6.egg',
>> 'C:\\Python26\\lib\\site-**packages\\pyreadline-1.6.1-**py2.6-win32.egg',
>> 'C:\\Python26\\lib\\site-**packages\\sqlalchemy-0.6.5-**py2.6.egg',
>> 'C:\\Python26\\lib\\site-**packages\\pyexcelerator-0.6.4.**1-py2.6.egg',
>> 'C:\\Python26\\lib\\site-**packages\\pil-1.1.7-py2.6-**win32.egg',
>> 'C:\\Python26\\lib\\site-**packages\\django_annoying-0.7.**6-py2.6.egg',
>> 'C:\\Python26\\lib\\site-**packages\\pyodbc-2.1.8-py2.6-**win32.egg',
>> 'C:\\Python26', 'C:\\Python26\\Scripts',
>> 'C:\\Windows\\system32\\**python26.zip', 'C:\\Python26\\DLLs',
>> 'C:\\Python26\\lib', 'C:\\Python26\\lib\\plat-win',
>> 'C:\\Python26\\lib\\lib-tk', 'C:\\Python26\\lib\\site-**packages',
>> 'C:\\Python26\\lib\\site-**packages\\win32',
>> 'C:\\Python26\\lib\\site-**packages\\win32\\lib',
>> 'C:\\Python26\\lib\\site-**packages\\Pythonwin']
>> Server time:    Mon, 27 Feb 2012 15:30:26 +0100
>> [/quote]
>>
>> Je ne suis pas très bon avec Django.
>>
>> Merci d'avance pour votre aide.
>>
>> beegees
>> ______________________________**_________________
>> django mailing list
>> django _AT_ lists.afpy.org
>> http://lists.afpy.org/mailman/**listinfo/django<http://lists.afpy.org/mailman/listinfo/django>
>>
> ______________________________**_________________
> django mailing list
> django _AT_ lists.afpy.org
> http://lists.afpy.org/mailman/**listinfo/django<http://lists.afpy.org/mailman/listinfo/django>
>

Hors ligne

  • Accueil
  • » Django-fr
  • » The model Patient is already registered, je suis totalement bloqué

Pied de page des forums