GithubHelp home page GithubHelp logo

snippet_detail.html about djangosnippets.org HOT 6 CLOSED

django avatar django commented on May 17, 2024
snippet_detail.html

from djangosnippets.org.

Comments (6)

coleifer avatar coleifer commented on May 17, 2024

Are you running with the request context processor?

from djangosnippets.org.

rjharris08 avatar rjharris08 commented on May 17, 2024

Hmm...well, I don't see it in my project settings.py. Isn't it on by default?

from djangosnippets.org.

coleifer avatar coleifer commented on May 17, 2024

you can try running:

from django.conf import settings
settings.TEMPLATE_CONTEXT_PROCESSORS

from djangosnippets.org.

rjharris08 avatar rjharris08 commented on May 17, 2024

Here's what I get. Is one of these the request context processor? If not, how would I add it?

>>> settings.TEMPLATE_CONTEXT_PROCESSORS ('django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.contrib.messages.context_processors.messages')

from djangosnippets.org.

coleifer avatar coleifer commented on May 17, 2024

'django.core.context_processors.request'

from djangosnippets.org.

rjharris08 avatar rjharris08 commented on May 17, 2024

added the following to the project's settings.py

TEMPLATE_CONTEXT_PROCESSORS = (
    'django.contrib.auth.context_processors.auth',
    'django.core.context_processors.debug', 
    'django.core.context_processors.i18n', 
    'django.core.context_processors.media',
    'django.contrib.messages.context_processors.messages',
    'django.core.context_processors.request'
)

It now works as originally written! YTG

from djangosnippets.org.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.