Django non-profit is a web application built with Django that will be used as a management platform for a non-profit. It is being developed in REFOOD CASCAIS CPR, and the first release will be out in December!
The objective is to create a web-application that may be customized and expanded as wished. Not only for Re-food but any non-profit. The final product will be independent working modules (Django Apps) that will be decoupled when generic enough, so they are reusable. The first one will be django-volunteers!
First of all, you should know Python and Django, at least the basics.
- Download, Fork or Clone this repository.
- In the main directory create a file named
db.sqlite3
. - Set the environmental variables. See the section above.
- Migrate Django to create your DB:
python manage.py migrate
- Run the server:
python manage.py runserver
It should be working by now, but it is sending you to the login page (And you have no account!)
- Kill the server
- Create a superuser:
python manage.py createsuperuser
- Run the server again:
python manage.py runserver
- Log in with your fresh credentials and explore the App!
- You won't be able to submit any form with a catcha. Sign up for reCAPTCHA and change your Env vars.
- You just need to change the Env vars if you want to use this in production.
- Go to the Development Section when you'r ready!
Every configuration that is sectret or may change between deploys is set as an env var. See this if you want to understand why.
To get started (easy way) you may run this script in a python console:
import os
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
DB_NAME = os.path.join(BASE_DIR, "db.sqlite3")
os.environ.setdefault("DEBUG", "True")
os.environ.setdefault("DB_ENGINE","django.db.backends.sqlite3")
os.environ.setdefault("DB_NAME", str(DB_NAME))
os.environ.setdefault("SECRET_KEY", "super-secure-django-key")
os.environ.setdefault("RECAPTCHA_PUBLIC_KEY", "notvalid")
os.environ.setdefault("RECAPTCHA_PRIVATE_KEY", "notvalid")
This defines the basic variables with basic and insecure configurations.
If a variable is not mandatory, the default value is in front of it. If you have a =
and nothing in front of it the default value is ''
- SECRET_KEY [Django Docs]
- DEBUG = False
- ALLOWED_HOSTS =
- Database:
- DB_ENGINE
- DB_NAME
- DB_USER =
- DB_PASS =
- DB_HOST =
- DB_PORT =
- LANGUAGE_CODE = pt-pt
- TIME_ZONE = UTC
- AXES_COOLOFF_TIME = 2 [Axes Docs]
- RECAPTCHA_PUBLIC_KEY
- RECAPTCHA_PRIVATE_KEY
- Email:
- DEFAULT_FROM_EMAIL = webmaster@django-non-profit
- EMAIL_SUBJECT_PREFIX =
- EMAIL_HOST = localhost
- EMAIL_HOST_PASSWORD =
- EMAIL_HOST_USER =
- EMAIL_PORT= 25
The first release will allow (December 2016):
- The creation of volunteers both in Django admin and through a front-office.
- The volunteers should be able to change their personal information and its preferences (timetable)
- The timetable (a group of weekdays and time intervals) should be created through Django Admin, but volunteers should be able to define its preferences in the front-office.
- It should be possible to see a list the volunteers and to search them organized by schedules.
- The volunteers should be manually added by a manager a shift map may be created manually.
Ideas for the upcoming versions are welcomed and should be added in Issues
This app follows the Twelve-Factor-App methodology, so give it a look.
If you wish to help me developing it for Re-Food, send me an email ([email protected])! Find out more about Re-food - This project is being implemented in Re-Food Cascais CPR where more than 300 volunteers help people in need by collecting and distributing the food excess in restaurants, events, and supermarkets.
If it for other project go ahead and fork it.
On the roadmap and will be out with the first release.
Dependencies that must be met to use the application:
- Django 1.10
- django-axes 2.3
- django-ipware 1.1
- django-phonenumber-field 1.1
- django-recaptcha 1.1
- django-dual-authentication 1.0
The rest of the dependencies come from these and are automatically installed with pip. These dependencies are stated in requirements.txt, together with the ones needed for CI.