Comments (14)
oops, forgot to update docs you'll need to add maintenancemode
to INSTALLED_APPS
in your project's settings.py
file:
INSTALLED_APPS = (
...
'maintenancemode',
)
from django-maintenancemode.
Thank you, this was a complete noob issue and something I could have
thought of. But like on the road, when someone starts giving me directions
I stop thinking for myself. :)
On Sat, Aug 15, 2015 at 10:42 AM, Basil Shubin [email protected]
wrote:
oops, forgot to update docs you'll need to add maintenancemode to
INSTALLED_APPS in your project's settings.py file:INSTALLED_APPS = (
...
'maintenancemode',
)—
Reply to this email directly or view it on GitHub
#12 (comment)
.
from django-maintenancemode.
@bashu sorry to bother again, but whether I set the var to True
in my settings, or I use the manage.py command with on
(which now does not error, but produces no output), I do not appear to get routed to a 503 page. I am not logged in, and I have tried this locally both ways, as well as in production (heroku). I am using Django 1.8.
from django-maintenancemode.
@jplehmann, can you post your settings.py? have you tried example
project?
from django-maintenancemode.
Trying to get example
working. I have:
- created venv
- installed requirements
- export DJANGO_SETTINGS_MODULE='example.settings'
- any attempt to run manage fails: ~/git/django-maintenancemode]$
example/manage.py withImportError: No module named example.settings
I actually did get it to run if I am within the example dir, but I don't
think this is right because I have problems later with it finding other
things.
Regarding my settings within my app, see my initial issue description for
the relevant parts. Here's a gist of the whole thing:
https://gist.github.com/jplehmann/17981d1eabb3d2228809 There's a little
more in prod/local configs but I don't think it's relevant.
thanks!
On Sat, Aug 15, 2015 at 10:26 PM, Basil Shubin [email protected]
wrote:
hey, can you post your settings.py? have you tried example project?
—
Reply to this email directly or view it on GitHub
#12 (comment)
.
from django-maintenancemode.
all you need to run it as python example/manage.py runserver
see example/README.md
from django-maintenancemode.
I take it you're staying my step 3 is unnecessary. I should have clarified -- if I unset the variable I get the same error. I can find no permutation which is correct, including unset.
from django-maintenancemode.
have you tried to run example as described here https://github.com/shanx/django-maintenancemode/blob/develop/example/README.rst ?
PS: run it as env PYTHONPATH=
pwd python example/manage.py runserver
from django-maintenancemode.
@jplehmann you right I need to make sure example
works without PYTHONPATH
manipulations
from django-maintenancemode.
Okay on our other thread of convo (my actually app) -- I have debugged it locally and discovered that it's working fine there -- it was my INTERNAL_IPS, so all is good.
However, in production on Heroku, it is NOT working, and I haven't determined the cause yet. Might be because of the way it attempts to modify the lockfile, I'm going to see if that's getting set. I welcome any ideas here.
from django-maintenancemode.
Yes, it appears to be failing to create a lockfile after I run maintenance on. I think it should be creating it here: /app/.heroku/python/lib/python2.7/site-packages/maintenancemode/
. I will try deploying with the hardcoded setting and see if that works for now, and create a new issue.
from django-maintenancemode.
or set MAINTENANCE_LOCKFILE_PATH
option to a different path, for reference https://github.com/shanx/django-maintenancemode/blob/develop/maintenancemode/conf.py#L11
from django-maintenancemode.
For anyone who finds this in the future, I remembered why this approach will not work on heroku. Any execution of heroku run manage.py
will be run on a separate worker dyno, not the web one. I think a good alternative would be a staff-authenticated view which togged the maintenance status by adding/removing the file.
from django-maintenancemode.
feel free to post a bug report
from django-maintenancemode.
Related Issues (20)
- django 1.8 compatibility HOT 5
- Possibility to set MAINTENANCE_MODE on/off through a command HOT 1
- Default branch and travis ci service HOT 2
- Update ``example`` project
- Management command does not work for Heroku HOT 1
- Enable network specify in INTERNAL_IPS
- Adding messages
- Check on maintenance status HOT 4
- limit staff users too! HOT 1
- Lock file location should be configurable in django settings.py file HOT 1
- Compliance with Django 1.10 middleware HOT 2
- Handling of multilingual sites
- Please add tests back to sdist HOT 1
- Job failing on travis-ci for python 2.7 HOT 1
- Middleware early return refactor (suggest/request for comment) HOT 2
- Are contributions welcome? HOT 6
- Better customization
- Package Management + Coding Style HOT 1
- Release 0.11.8 ? HOT 1
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 django-maintenancemode.