Comments (6)
Are you running with the request context processor?
from djangosnippets.org.
Hmm...well, I don't see it in my project settings.py. Isn't it on by default?
from djangosnippets.org.
you can try running:
from django.conf import settings
settings.TEMPLATE_CONTEXT_PROCESSORS
from djangosnippets.org.
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.
'django.core.context_processors.request'
from djangosnippets.org.
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)
- Moving master to main HOT 3
- Add "dark mode" button in the website HOT 1
- UnserializableContentError HOT 1
- AttributeError /snippets/{snippet_id}/ HOT 1
- SIte is not mobile friendly HOT 1
- Twitter should render image of snippet when snippet url shared HOT 5
- Twitter access HOT 1
- User.MultipleObjectsReturned: get() returned more than one User -- it returned 2! HOT 1
- Cant set up discussions HOT 2
- Configuration error starting up docker development environment HOT 1
- Development setup instructions for windows users missing HOT 1
- Start to using sass and get rid of bower and compass HOT 2
- Code formatting with Black HOT 5
- Travis-Ci.org is no longer need to move to .com or github actions HOT 1
- ALLOWED HOSTS in wrong location
- UserWarning when running tests
- Initial setup should be simplified HOT 3
- Change Home page to use HTMX to prevent unnecessary full page reloads
- Site is down HOT 8
- LiveRepl and Snippets in other language
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from djangosnippets.org.