Hi Russell
The admin templates i copied into /templates/admin/ .
The idea : i need to customize the admin for a project am working on .
-details :
installed django RC 1.1 , ubuntu linux 9.04 .
so i ran :
django-admin.py startproject emr_admin
, python manage.py startapp emr
defined my first model in the emr/models.py
added the django.contrib.admin in emr_admin/settings.py
then ran : python manage.py syncdb
*urls.py* :
-------------
from django.contrib import admin
admin.autodiscover()
and in : urlpatterns i added the admin urls
(r'^admin/', include(ad
min.site.urls)),
------------
------------
*Django admin Template files :*
to extend the admin css style i copied the admin template from the django RC
1.1 to /templates/admin/ like base.html , base_site.html , index.html ......
so now they are in
/templates/admin/
------------
*emr/admin.py :*
*so it all runs so fine ,
register my app models in emr/admin.py
*
:
from django.contrib import admin
from django import forms
from emr_admin.emr.models import *
class PatientForm(forms.ModelForm):
comment = forms.CharField(widget=forms.Textarea(attrs={'rows':4,
'cols':60}),label='Comment',help_text="")
sex = forms.CharField(widget=forms.RadioSelect(choices=SEX),label='Sex')
smoking =
forms.CharField(widget=forms.RadioSelect(choices=SMOKING),label='Smoking')
maritalstatus =
forms.CharField(widget=forms.RadioSelect(choices=Marital_STATS))
class PatientAdmin(admin.ModelAdmin):
list_display = ( 'name', 'sex','maritalstatus', 'bdate','jobtitle')
list_display_links = ( 'name', 'sex','maritalstatus', 'bdate','jobtitle')
search_fields = ('name', 'jobtitle')
list_filter = ('jobtitle','sex')
list_per_page = 25
ordering = ['name']
form = PatientForm
admin.site.register(Patient , PatientAdmin)
-------------
everything working so fine at the admin side , however the only thing is not
working is the logout and change password , when i direct the url to the
change password form and change my password , it redirect me to the wrong
url as well :
http://localhost:8000/admin/password_change/admin/password_change/done/
thats what happend so far :
best regards
Hamza
------------------------------
thats what i did so far
On Thu, Jul 23, 2009 at 8:49 AM, Russell Keith-Magee <[email protected]
> wrote:
>
> On Thu, Jul 23, 2009 at 1:42 PM, Dr.Hamza Mousa<[email protected]>
> wrote:
> > do you mean admin templates ?! i think its the template file of the RC !
>
> Saying "I think" isn't quite the help we're looking for - are you
> using the default admin templates, or not? Have you taken _any_ copies
> of the admin templates? When you say you are "customizing" the admin -
> what modifications have you made?
>
> We need _exact_ and _explicit_ instructions for how to reproduce your
> problem - i.e., starting with running django-admin.py startproject,
> what do I have to do in order to reproduce this problem. It may help
> if you start from scratch yourself - start with an empty project, and
> then bring over configurations and files from your 'broken' project
> until the problem appears.
>
> Please try to keep in mind that I have many running Django projects,
> and _none_ of them are exhibiting the problem you describe. I don't
> deny that you are experiencing this problem, but If I'm going to fix
> this problem, I need to be able to reproduce it first.
>
> Yours,
> Russ Magee %-)
>
> >
>
--
Hamza E.e Mousa
www.neoxero.com
www.goomedic.com
www.medpeek.com
www.freewaydesign.com
http://www.twitter.com/hamzamusa
http://twitter.com/goomedic
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---