Monday, October 29, 2012

Re: Changing the index page

Helllo Sorin,

Thank you for the fix, really works to me too. I don't know why django broke admin view without changes by me.

May i ask you one thing?. What really do static and get_static_prefix?.

Thank you

2012/10/28 Sorin Popa <sorin192@gmail.com>
Hello,.. obviously my answer comes late, but - as I am now learning Django and I ran into the same issue, here's my post - may be helpful for anyone getting in the same trouble.

I am following the tutorial for Django 1.3.
On my Ubuntu 12.10 I have installed with Synaptic Django 1.4.1, but I believe I already had a Django 1.3.3 before... now the result is... in my command-line django-admin tells me the version is 1.3.3.

But I am pretty convinced that something mixed up, and that's how this trouble came...

Solution to "fix" your copy of index.html from the tutorial part 2:
- replace: {% load i18n admin_static %} with {% load i18n static %}
- replace: href="{% static "admin/css/dashboard.css" %}" with href="{% get_static_prefix %}admin/css/dashboard.css"


I hope this helps!
Sorin

miercuri, 11 ianuarie 2012, 04:51:07 UTC+1, kalyan boga a scris:
Hi,

I was working on tutorial 2 and i tried to change the layout of index page. Copied the index.html template to my template folder under admin and changed the contents to suit the site. The second line errors out : 
{% load i18n admin_static %}

The error on the page reads :

TemplateSyntaxError at /admin/

'admin_static' is not a valid tag library: Template library admin_static not found, tried django.templatetags.admin_static,django.contrib.admin.templatetags.admin_static



What did i miss ?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/NcMX0qVYXTcJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
   Rodrigo Morgado   
Tel: (56 2) 246 3220
Cel: (56 9) 5 333 8041
      www.ewok.cl

This email and any files transmitted with it are confidential and intended solely for the recipient named. If you have received this email in error please notify the sender immediately. Any disclosure, copying, or distribution of this message, or taking of any action based on it, is strictly prohibited. Failure to respect this prohibition may constitute a breach of law. 

Este mail y cualquier archivo enviado adjunto son confidenciales y destinados solo a la utilización del individuo o entidad a la que van dirigidos. Sí usted ha recibido este mail por error, Favor bórrelo y notifique al remitente. Se prohíbe cualquier uso, copia o distribución de este mensaje o sus adjuntos. El no respetar esta prohibición puede constituir una infracción a la ley.


--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment