FAQ
Ok, so i've copied the *base_site html* to*lotus/pollapp/mysite/polls/templates/admin
* . I've opened the html file in a text editor and changed

* <h1 id="site-name">{% trans 'Django administration' %}</h1>* to

*<h1 id="site-name">{% trans 'Pollapp' %}</h1>*

However this change doesn't show on the website. My *Template DIRS* is:

TEMPLATE_DIRS = (
     *'lotus/pollapp/mysite/polls/templates',*
     # Put strings here, like "/home/html/django_templates" or
"C:/www/django/templates".
     # Always use forward slashes, even on Windows.
     # Don't forget to use absolute paths, not relative paths.
)

I've restarted the dev server and refreshed the website many times, but
still no change.
Any help with what i'm doing wrong?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5fb2f9b7-8340-4be4-8ba9-cfd8536404a9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Leonardo Giordani at Oct 21, 2013 at 12:31 pm
    I think that you are missing the absolute path part of the code comment

    * # Don't forget to use absolute paths, not relative paths.

    *
    This means that you cannot use 'lotus/...'
    Usually you use code like

    ABSOLUTE_PATH = '%s/'
    %(os.path.abspath(os.path.dirname(locals()['__file__'])).replace('\\', '/'))

    at the beginning of your settings.py file. Then you can write

    TEMPLATE_DIRS = (
         *os.path.join(ABSOLUTE_PATH, 'lotus/pollapp/mysite/polls/**templates'),*
         # Put strings here, like "/home/html/django_templates" or
    "C:/www/django/templates".
         # Always use forward slashes, even on Windows.
         # Don't forget to use absolute paths, not relative paths.
    )

    Remember that settings.py is a Python module, so you can use any valid
    Python code.

    Let me know if you succeed.
    Cheers,

    Leo


    Leonardo Giordani
    Author of The Digital Cat <http://lgiordani.github.com>
    My profile on About.me <http://about.me/leonardo.giordani> - My GitHub
    page<https://github.com/lgiordani>- My Coderwall
    profile <https://coderwall.com/lgiordani>


    2013/10/21 Sheharyar Hamayun <sheharyar.hamayun1992@gmail.com>
    Ok, so i've copied the *base_site html* to*lotus/pollapp/mysite/polls/templates/admin
    * . I've opened the html file in a text editor and changed

    * <h1 id="site-name">{% trans 'Django administration' %}</h1>* to

    *<h1 id="site-name">{% trans 'Pollapp' %}</h1>*

    However this change doesn't show on the website. My *Template DIRS* is:

    TEMPLATE_DIRS = (
    *'lotus/pollapp/mysite/polls/templates',*
    # Put strings here, like "/home/html/django_templates" or
    "C:/www/django/templates".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
    )

    I've restarted the dev server and refreshed the website many times, but
    still no change.
    Any help with what i'm doing wrong?

    --
    You received this message because you are subscribed to the Google Groups
    "Django users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to django-users+unsubscribe@googlegroups.com.
    To post to this group, send email to django-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/django-users.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/django-users/5fb2f9b7-8340-4be4-8ba9-cfd8536404a9%40googlegroups.com
    .
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Django users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
    To post to this group, send email to django-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/django-users.
    To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEhE%2BOnbyMuv6_kn7kis4GukNobXn79xXtnJA8CvKEESJ4mGTg%40mail.gmail.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Sheharyar Hamayun at Oct 26, 2013 at 7:05 am
    Hey

    Yes, thank you. It worked!

    Btw sorry for the late reply, my previous 'thank you' reply didn't seem to
    go through it seems.
    On Monday, October 21, 2013 2:52:48 PM UTC+11, Sheharyar Hamayun wrote:

    Ok, so i've copied the *base_site html* to*lotus/pollapp/mysite/polls/templates/admin
    * . I've opened the html file in a text editor and changed

    * <h1 id="site-name">{% trans 'Django administration' %}</h1>* to

    *<h1 id="site-name">{% trans 'Pollapp' %}</h1>*

    However this change doesn't show on the website. My *Template DIRS* is:

    TEMPLATE_DIRS = (
    *'lotus/pollapp/mysite/polls/templates',*
    # Put strings here, like "/home/html/django_templates" or
    "C:/www/django/templates".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
    )

    I've restarted the dev server and refreshed the website many times, but
    still no change.
    Any help with what i'm doing wrong?
    --
    You received this message because you are subscribed to the Google Groups "Django users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
    To post to this group, send email to django-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/django-users.
    To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ea6c8a05-9acf-4d67-b89f-65eb4651855d%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdjango-users @
categoriesdjango, python
postedOct 21, '13 at 12:10p
activeOct 26, '13 at 7:05a
posts3
users2
websitedjangoproject.com

People

Translate

site design / logo © 2022 Grokbase