New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstrair o domínio nos templates #311

Closed
barraponto opened this Issue Feb 14, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@barraponto
Contributor

barraponto commented Feb 14, 2014

Por exemplo, https://github.com/hacklabr/timtec/blob/master/administration/templates/new_course.html#L60 tem timtec.com.br hardocded, o que zoa pra usar em outros contextos.

@bgola

This comment has been minimized.

Show comment
Hide comment
@bgola

bgola Feb 17, 2014

Contributor

uma sugestão pra resolver isso é fazer um context processor que coloque o objeto 'site' no contexto dos templates e depois dentro dos templates a gente use

{{ site.domain }}

por exemplo:
https://stackoverflow.com/questions/5094571/django-site-template-context-not-working

Contributor

bgola commented Feb 17, 2014

uma sugestão pra resolver isso é fazer um context processor que coloque o objeto 'site' no contexto dos templates e depois dentro dos templates a gente use

{{ site.domain }}

por exemplo:
https://stackoverflow.com/questions/5094571/django-site-template-context-not-working

@barraponto barraponto referenced this issue Feb 18, 2014

Merged

Abstraindo detalhes da Timtec #319

0 of 2 tasks complete

@barraponto barraponto closed this Mar 5, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment