Skip to content

sirodoht/opencult.com

Repository files navigation

opencult.com

Ridiculously minimal event system for groups.

Development

This is a Django codebase. Check out the Django docs for general technical documentation.

Structure

The Django project is opencult. There is the main Django app, with most business logic, and api, with the public API.

Dependencies

This project uses virtualenv and pip-tools for dependencies management.

Create a virtualenv, enable it, and then install requirements:

virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt

Environment variables

You need to create a new file named .env in the root of this project once you cloned it.

.env should contain the following env variables:

DATABASE_URL="postgres://username:password@localhost:5432/db_name"
SECRET_KEY="thisisthesecretkey"
EMAIL_HOST_USER="usernamehere"  # for email functionality (optional for dev)
EMAIL_HOST_PASSWORD="passwordhere"  # for email functionality (optional for dev)

Database

This project uses PostgreSQL. See above on how to configure it using the .env file.

How to: Create PostgreSQL DB

After creating your local database, you need to apply the migrations:

python manage.py migrate

Serve

Finally, you can run the Django development server:

python manage.py runserver

Or, run the production-grade uwsgi server:

uwsgi --ini=uwsgi.ini -H venv/

Note: The uwsgi method does not read the .env file, so in this case you need to set the env vars in your shell.

Code formatting

Format, lint, sort imports for Python code:

black . && isort -y && flake8

License

MIT

About

Ridiculously minimal event system for groups.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published