Giter Club home page Giter Club logo

website's Introduction

This is the www.emfcamp.org web site, built with Flask & Postgres by the EMF web team.

CI Status Coverage Status

Get Involved

If you want to get involved, the best way is to join us on IRC, on #emfcamp-web on chat.freenode.net.

Join with IRCCloud:

Getting Started

The only supported way to develop is to use Docker with Docker Compose (on Linux you'll need to install Docker Compose separately).

Lazydocker is highly recommended to monitor the containers.

To start all containers (and rebuild any which may have changed):

docker-compose build --parallel
docker-compose up

You should then be able to view your development server on http://localhost:5000.

To create some fake data in your DB, run:

./flask dev data

To stop all containers, use docker-compose stop To delete all data and start over fresh you can use docker-compose down.

Management commands can be listed and run using the ./flask command, which forwards them to the flask command line within the container.

Tests

Tests are run using the ./run_tests script.

Code Style

For Python we currently use Black and flake8 to enforce code style. These checks are run by ./run_tests.

However, it's easy to forget these checks, so you can also run them as a git pre-commit hook using pre-commit. To set this up on the host where you'll be using git:

pip3 install pre-commit
pre-commit install

Adding accounts

Once you've created an account on the website, you can use ./flask make_admin to make your user an administrator. Or, you can create an account and simultaneously make it an admin by usinag ./flask make_admin -e [email protected]

E-mail sending is disabled in development (but is printed out on the console). You can also login directly by setting BYPASS_LOGIN=True in config/development.cfg and then using a URL of the form e.g. /login/[email protected] and navigate to /admin/.

Database Migrations

  • ./flask db migrate -m 'Migration name' to generate migration scripts when models have been updated.
  • ./flask db upgrade to run any migration scripts you've generated.
  • ./flask db downgrade to undo the last migration.

For more migration commands, see the flask-migrate docs.

More Docs

For more, see:

website's People

Contributors

bfirsh avatar cryptyc avatar davidc avatar davidcx avatar dominicgs avatar geeksareforlife avatar jasperwallace avatar jayaddison avatar jellybob avatar jonty avatar kragniz avatar marekventur avatar marksteward avatar mokele avatar natm avatar paul2d avatar pezmc avatar pyup-bot avatar roseregina avatar russss avatar saerdnaer avatar samlr avatar unknowndomain avatar vetraskr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.