简体   繁体   中英

Userena Template Directory

I've gotten userena successfully installed and I've copied the entire userena template directory over to my app (which is not named userena but rather accounts, so the directory the templates are in is /accounts/templates/accounts/ ) but simply editing them reflects no changes. When I point my urls.py to

url(r'^accounts/signout/$', userena_views.signout, {'template_name': 'accounts/signout.html'})

It works, but only for that one file. Is there a way to have the entire app automatically refer to this templates directory? I thought about using TEMPLATE_DIRS but that would apply to the entire site and not this one app. Any solutions? Thanks for your help.

The view that calls this template:

def signout(request, next_page=userena_settings.USERENA_REDIRECT_ON_SIGNOUT,
        template_name='userena/signout.html', *args, **kwargs):

Put all userena templates in accounts/templates/userena instead of accounts/templates/accounts . That should work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM