Thanks again Russell

The admin templates i put in /templates/admin is working very well the css
is extended and also customize the base template file ( still working thu )
( forget to say i already set the template dir in settings.py : sorry )  , i
also registered the application .

yes the admin working correctly and still working thu :)

about old files of django RC 1.1 somewhere i think so cause this issue is
not happening on Windows Django 1.1 !!!

will check if reinstalling django will work !

Thanks



On Thu, Jul 23, 2009 at 10:22 AM, Russell Keith-Magee <
freakboy3...@gmail.com> wrote:

>
> On Thu, Jul 23, 2009 at 2:30 PM, Dr.Hamza Mousa<dr.hamzam...@gmail.com>
> wrote:
> > 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/
>
> I should point out that unless you make a modification to
> TEMPLATE_DIRS in your settings file, copying the template files will
> have no effect at all. From the point of view of these instructions,
> copying the template files is a no op - the admin won't pay any
> attention to the files in /templates.
>
> > ------------
> >
> > emr/admin.py :
> >
> > so it all runs so fine ,
>
> To clarify - Are you saying that at this point in the process, the
> admin site URLs are displayed correctly?
>
> > register my app models in emr/admin.py
>
> I presume you have also put emr into INSTALLED_APPS at some point in
> this process?
>
> > :
> > 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 :
>
> I don't experience any problems when I follow these instructions. I am
> shown links to  /admin/password_change/ and /admin/logout/; I get
> redirected to /admin/password_change/done/ when I change my password.
>
> The fact that your instructions don't include any reference to
> changing TEMPLATE_DIRS leads me suspect that one of three things is
> happening:
>
> 1) You're actually pointing at a different set of templates than you
> think you are (and those templates are using the old linking scheme
> for the logout and password change links)
>
> 2) You don't have a complete and correct checkout of Django v1.1 RC1
>
> 3) In addition to a complete and correct checkout of Django v1.1 RC1,
> you have an older (pre v1.1 RC1) checkout somewhere, and it is this
> checkout that is being used to provide admin templates.
>
> Could you please check the contents of the TEMPLATE_DIRS settings of
> your project, and then check your PYTHONPATH very closely to see if
> any of these conditions are correct?
>
> 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 django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to