|
@@ -13,8 +13,10 @@ sudo apt-get install python3-pip python3-virtualenv virtualenv libyaml-dev
|
|
|
Retrieve the repository:
|
|
|
|
|
|
```bash
|
|
|
+# Create the base directory:
|
|
|
+mkdir wwm
|
|
|
+# Clone the repo:
|
|
|
git clone https://code.ffdn.org/FFDN/wifi-with-me.git
|
|
|
-cd wifi-with-me
|
|
|
```
|
|
|
|
|
|
Create and activate the virtualenv with:
|
|
@@ -27,20 +29,21 @@ source venv/bin/activate
|
|
|
We use django framework. Install it from requirements with pip:
|
|
|
|
|
|
```bash
|
|
|
-pip install -r requirements/base.txt
|
|
|
+pip install -r wifi-with-me/requirements/base.txt
|
|
|
```
|
|
|
|
|
|
For development, install `dev.txt` instead:
|
|
|
|
|
|
```bash
|
|
|
-pip install -r requirements/dev.txt
|
|
|
+pip install -r wifi-with-me/requirements/dev.txt
|
|
|
```
|
|
|
|
|
|
Set up configuration
|
|
|
====================
|
|
|
|
|
|
-Then create and edit the configuration file `wifiwithme/settings/local.py`
|
|
|
-according to following instructions:
|
|
|
+Then create and edit the configuration file
|
|
|
+`wifi-with-me/wifiwithme/settings/local.py` according to following
|
|
|
+instructions:
|
|
|
|
|
|
Mandatory settings
|
|
|
------------------
|
|
@@ -66,16 +69,18 @@ ISP={
|
|
|
}
|
|
|
```
|
|
|
|
|
|
-The wifi-with-me website URL, for links included in emails (Defaults to
|
|
|
-`http://localhost:8000`):
|
|
|
+The wifi-with-me website URL (for links included in emails) defaults to
|
|
|
+`http://localhost:8000`, so it must be customized:
|
|
|
|
|
|
```python
|
|
|
SITE_URL='https://wifi.faimaison.net'
|
|
|
```
|
|
|
|
|
|
-If the website is accessible under several hostnames, list these here:
|
|
|
+List of domain name(s) under wich the website is accessible:
|
|
|
|
|
|
```python
|
|
|
+ALLOWED_HOSTS=['wifi.faimaison.net']
|
|
|
+# Or, for several domains:
|
|
|
ALLOWED_HOSTS=['wifi.faimaison.net', 'faimaison.net']
|
|
|
```
|
|
|
|
|
@@ -132,32 +137,32 @@ If you used the (old) bottle version of wifi-with-me and want to migrate your
|
|
|
data follow this extra step :
|
|
|
|
|
|
```bash
|
|
|
-./manage.py migrate auth
|
|
|
-./manage.py migrate contribmap 0001 --fake
|
|
|
+./wifi-with-me/manage.py migrate auth
|
|
|
+./wifi-with-me/manage.py migrate contribmap 0001 --fake
|
|
|
```
|
|
|
|
|
|
Run development server
|
|
|
======================
|
|
|
|
|
|
-NOTE: For prod environment, replace `./manage.py` by
|
|
|
-`DJANGO_SETTINGS_MODULE=wifiwithme.settings.prod ./manage.py`.
|
|
|
+NOTE: For prod environment, replace `./wifi-with-me/manage.py` with
|
|
|
+`DJANGO_SETTINGS_MODULE=wifiwithme.settings.prod ./wifi-with-me/manage.py`.
|
|
|
|
|
|
It is required to initialize database first:
|
|
|
|
|
|
```bash
|
|
|
-./manage.py migrate
|
|
|
+./wifi-with-me/manage.py migrate
|
|
|
```
|
|
|
|
|
|
Create an admin:
|
|
|
|
|
|
```bash
|
|
|
-./manage.py createsuperuser
|
|
|
+./wifi-with-me/manage.py createsuperuser
|
|
|
```
|
|
|
|
|
|
Then launch service with:
|
|
|
|
|
|
```bash
|
|
|
-./manage.py runserver
|
|
|
+./wifi-with-me/manage.py runserver
|
|
|
```
|
|
|
|
|
|
You can visit with your browser at <http://127.0.0.1:8000/map/contribute>
|
|
@@ -189,6 +194,6 @@ python -c "import string,random; uni=string.ascii_letters+string.digits+string.p
|
|
|
handling (run them with `--help` for more information):
|
|
|
|
|
|
```bash
|
|
|
-./manage.py delete_expired_contribs
|
|
|
-./manage.py send_expiration_reminders
|
|
|
+./wifi-with-me/manage.py delete_expired_contribs
|
|
|
+./wifi-with-me/manage.py send_expiration_reminders
|
|
|
```
|