Customize Installed Apps on Django

886 views Asked by At

in my server I have a lot of apps installed like, facebook_connect, userena, guardian and so on...

For example, I realized that if I customize the:

django-userena / userena / templates / userena / emails / activation_email_message.txt

{% load i18n %}{% autoescape off %}{% load url from future %}
{% if not without_usernames %}{% blocktrans with user.username as username %}Dear {{ username }},{% endblocktrans %}
{% endif %}
{% blocktrans with site.name as site %}Thank you for signing up at {{ site }}.{% endblocktrans %}

{% trans "To activate your account you should click on the link below:" %}

{{ protocol }}://{{ site.domain }}{% url 'userena_activate' activation_key %}

{% trans "Thanks for using our site!" %}

{% trans "Sincerely" %},
{{ site.name }}
{% endautoescape %}

For specified website, and I have more than 4 in the same server, I will make a complete mess in my django_site.

My question is:

How to customize the templates or models in some installed apps without completely change the original django_site?

Thanks in advance,

1

There are 1 answers

3
karthikr On BEST ANSWER

You cannot change the models, but you can override templates.

In the same directory as manage.py, you would have a directory called templates, there, you can create the following folder hierarchy, and put your custom template.

templates/userena/emails/activation_email_message.txt