Code Monkey home page Code Monkey logo

Comments (14)

bashu avatar bashu commented on June 8, 2024

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.

jplehmann avatar jplehmann commented on June 8, 2024

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.

jplehmann avatar jplehmann commented on June 8, 2024

@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.

bashu avatar bashu commented on June 8, 2024

@jplehmann, can you post your settings.py? have you tried example project?

from django-maintenancemode.

jplehmann avatar jplehmann commented on June 8, 2024

Trying to get example working. I have:

  1. created venv
  2. installed requirements
  3. export DJANGO_SETTINGS_MODULE='example.settings'
  4. any attempt to run manage fails: ~/git/django-maintenancemode]$
    example/manage.py with ImportError: 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.

bashu avatar bashu commented on June 8, 2024

all you need to run it as python example/manage.py runserver see example/README.md

from django-maintenancemode.

jplehmann avatar jplehmann commented on June 8, 2024

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.

bashu avatar bashu commented on June 8, 2024

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.

bashu avatar bashu commented on June 8, 2024

@jplehmann you right I need to make sure example works without PYTHONPATH manipulations

from django-maintenancemode.

jplehmann avatar jplehmann commented on June 8, 2024

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.

jplehmann avatar jplehmann commented on June 8, 2024

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.

bashu avatar bashu commented on June 8, 2024

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.

jplehmann avatar jplehmann commented on June 8, 2024

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.

bashu avatar bashu commented on June 8, 2024

feel free to post a bug report

from django-maintenancemode.

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.