remove local_settings import, document how local_settings.py should be used, reorder admin docs
This commit is contained in:
parent
2516b48c88
commit
d17bdd8006
@ -21,9 +21,23 @@ Then install the software with requirements to your virtual env::
|
|||||||
|
|
||||||
pip install -e .
|
pip install -e .
|
||||||
|
|
||||||
Set SECRET_KEY and create settings_local.py file::
|
|
||||||
|
|
||||||
echo "SECRET_KEY='S3CR3T'" > nsupdate/settings_local.py
|
Configuration
|
||||||
|
=============
|
||||||
|
|
||||||
|
nsupdate.info Service
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
Use a local_settings.py (do not modify the nsupdate/settings.py file directly):
|
||||||
|
|
||||||
|
from nsupdate.settings import *
|
||||||
|
# override whatever you need to override here (read nsupdate/settings.py
|
||||||
|
# to get an overview over what you might need to customize):
|
||||||
|
SECRET_KEY='S3CR3T'
|
||||||
|
|
||||||
|
|
||||||
|
Initialize the database
|
||||||
|
-----------------------
|
||||||
|
|
||||||
To create and initialize the database, use::
|
To create and initialize the database, use::
|
||||||
|
|
||||||
@ -31,11 +45,23 @@ To create and initialize the database, use::
|
|||||||
python manage.py migrate
|
python manage.py migrate
|
||||||
|
|
||||||
|
|
||||||
To start the development server::
|
Start the development server
|
||||||
|
----------------------------
|
||||||
|
|
||||||
python manage.py runserver
|
python manage.py runserver
|
||||||
|
|
||||||
|
|
||||||
|
Nameserver
|
||||||
|
----------
|
||||||
|
|
||||||
|
Now as the server is running, you can log in using the database administrator
|
||||||
|
account you created in the syncdb step and use "admin" from the menu to start
|
||||||
|
Django's admin.
|
||||||
|
|
||||||
|
You'll need to configure at least 1 nameserver / 1 zone to accept dynamic updates,
|
||||||
|
see the "Domains" section in the "user" part of the manual.
|
||||||
|
|
||||||
|
|
||||||
Installation (for production)
|
Installation (for production)
|
||||||
=============================
|
=============================
|
||||||
|
|
||||||
@ -72,7 +98,7 @@ applies to the django version YOU use):
|
|||||||
https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
|
https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
|
||||||
|
|
||||||
PostgreSQL
|
PostgreSQL
|
||||||
~~~~~~~~~~
|
----------
|
||||||
For production usage and better scalability, you may rather want to use
|
For production usage and better scalability, you may rather want to use
|
||||||
PostgreSQL than SQLite database. Django stores its sessions into the
|
PostgreSQL than SQLite database. Django stores its sessions into the
|
||||||
database, so if you get a lot of accesses, sqlite will run into "database
|
database, so if you get a lot of accesses, sqlite will run into "database
|
||||||
@ -116,6 +142,9 @@ To make nsupdate.info (Django) use PostgreSQL, put this into YOUR settings::
|
|||||||
Now proceed with syncdb / migrate as shown above.
|
Now proceed with syncdb / migrate as shown above.
|
||||||
|
|
||||||
|
|
||||||
|
Maintenance
|
||||||
|
===========
|
||||||
|
|
||||||
Regular jobs
|
Regular jobs
|
||||||
------------
|
------------
|
||||||
You need to run some commands regularly, we show how to do that on Linux (or
|
You need to run some commands regularly, we show how to do that on Linux (or
|
||||||
@ -165,25 +194,6 @@ The user can see the ABUSE-BLOCKED status on the web interface, but can not
|
|||||||
change the flag.
|
change the flag.
|
||||||
|
|
||||||
|
|
||||||
Configuration
|
|
||||||
=============
|
|
||||||
|
|
||||||
nsupdate.info Service
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
Use a local_settings.py.
|
|
||||||
|
|
||||||
|
|
||||||
Nameserver
|
|
||||||
----------
|
|
||||||
|
|
||||||
You'll need to configure at least 1 nameserver / 1 zone to accept dynamic updates, see the "Domains" section
|
|
||||||
in the "user" part of the manual.
|
|
||||||
|
|
||||||
|
|
||||||
Maintenance
|
|
||||||
===========
|
|
||||||
|
|
||||||
Database contents
|
Database contents
|
||||||
-----------------
|
-----------------
|
||||||
Users who are in the "staff" group (like the one initially created when creating the database) can access the
|
Users who are in the "staff" group (like the one initially created when creating the database) can access the
|
||||||
@ -194,7 +204,7 @@ Only give Django admin access ("staff" group membership) to highly trusted admin
|
|||||||
|
|
||||||
|
|
||||||
Software updates / upgrades
|
Software updates / upgrades
|
||||||
===========================
|
---------------------------
|
||||||
|
|
||||||
After upgrading the code, you'll usually need to run::
|
After upgrading the code, you'll usually need to run::
|
||||||
|
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
Django settings for nsupdate project
|
Django settings for nsupdate project
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# Note: django internally first loads its own defaults and then loads the
|
||||||
|
# project's settings on top of that. Due to this, no import * is required here.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import django.conf.global_settings as DEFAULT_SETTINGS
|
import django.conf.global_settings as DEFAULT_SETTINGS
|
||||||
|
|
||||||
@ -396,8 +399,3 @@ MESSAGE_TAGS = {
|
|||||||
constants.WARNING: 'alert-warning',
|
constants.WARNING: 'alert-warning',
|
||||||
constants.ERROR: 'alert-danger',
|
constants.ERROR: 'alert-danger',
|
||||||
}
|
}
|
||||||
|
|
||||||
try:
|
|
||||||
from .local_settings import *
|
|
||||||
except ImportError:
|
|
||||||
pass
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user