Skip to content

Commit 26432a4

Browse files
committed
reorganize code related to static file, reverse url, and its config
1 parent 684f07b commit 26432a4

4 files changed

Lines changed: 10 additions & 121 deletions

File tree

README.md

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
[![Stories in Ready](https://badge.waffle.io/timlinux/user_map.png?label=ready)](https://waffle.io/timlinux/user_map)
2-
[![Build Status](http://jenkins.linfiniti.com/buildStatus/icon?job=UserMap)](http://jenkins.linfiniti.com/job/UserMap/)
3-
41
User Map
52
========
63

74
A simple flask application for creating user community maps.
85

6+
Hacking
7+
-------
8+
99
By default, this app reads configuration from `users/default_config.py`.
1010
To override values set in default config, simply copy the contents
1111
of `users/default_config.py` and save it elsewhere.
@@ -14,20 +14,18 @@ of `users/default_config.py` and save it elsewhere.
1414

1515
Then edit the custom config file, setting appropriate values as needed.
1616

17-
To run in debug mode (which will also serve up static content),
18-
use the `-d` flag:
17+
To run the development server:
1918

20-
USERS_CONFIG=/path/to/custom/config.py python runserver.py -d
19+
USERS_CONFIG=/path/to/custom/config.py python manage.py runserver
2120

2221
Each config item is overridable through environment variable.
23-
For instance, if you want to suppress email delivery,
24-
simply set appropriate value:
22+
For instance, if you want to suppress email delivery, simply set appropriate value:
2523

26-
USERS_MAIL_SUPPRESS_SEND=True python runserver
24+
USERS_MAIL_SUPPRESS_SEND=True python manage.py runserver
2725

2826
To run testcases:
2927

30-
USERS_CONFIG=/path/to/custom/config.py MAIL_SUPPRESS_SEND=True ./runtests.sh
28+
USERS_CONFIG=/path/to/custom/config.py USERS_MAIL_SUPPRESS_SEND=True ./runtests.sh
3129

3230
Collaboration
3331
-------------
@@ -38,28 +36,6 @@ Collaboration
3836
4. Once it done, submit your pull request (PR) against upstream `develop` branch.
3937
5. Our maintainers will review your PR. If it's good — all tests passed and proposed feature is in our roadmap — your PR will be merged.
4038

41-
Deployment using Docker
42-
-----------------------
43-
44-
If you are using docker, you can create a Docker image for this app easily as
45-
follows:
46-
47-
```
48-
wget -O Dockerfile https://raw.github.com/timlinux/user_map/master/docker/Dockerfile
49-
wget -O sources.list https://raw.github.com/timlinux/user_map/master/docker/sources.list
50-
wget -O post-setup.sh https://raw.github.com/timlinux/user_map/master/docker/post-setup.sh
51-
chmod +x post-setup.sh
52-
53-
docker build -t linfiniti/user_map:base .
54-
docker run -d -p 8099:80 -t linfiniti/user_map:base -n user_map -D
55-
```
56-
57-
If you are on a Hetzner server, consider replacing the second line above with:
58-
59-
```
60-
wget -O sources.list https://raw.github.com/timlinux/user_map/master/docker/hetzner-sources.list
61-
```
62-
6339
Authors
6440
-------
6541

runserver.py

Lines changed: 0 additions & 26 deletions
This file was deleted.

users/__init__.py

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -68,25 +68,10 @@ def setup_logger():
6868

6969
APP = Flask(__name__)
7070

71-
#: Load configuration from any possible means.
72-
#: To override default configuration defined in ``users.default_config``,
73-
#: simply copy the contents of ``config.py`` file,
74-
#: and save it into a file.
75-
#:
76-
#: .. sourcecode:: sh
77-
#:
78-
#: USERS_CONFIG=/path/to/config.py python runserver.py
79-
#:
80-
#: Another way of doing it is by setting environment variable for each
81-
#: config item.
82-
#:
83-
#: .. sourcecode:: sh
84-
#:
85-
#: USERS_CONFIG=/path/to/config.py USERS_MAIL_SUPPRESS_SEND=True \
86-
#: python runserver.py
87-
#:
71+
# Load configuration from any possible means.
8872
AppConfig(APP, default_settings="users.default_config")
8973

74+
# Mailer
9075
mail = Mail(APP)
9176

9277
# backward-compat

users/static.py

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)