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.

Deploy Status Coverage Status

Get Involved

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

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) version 1.24.0 or newer.

Lazydocker is highly recommended to monitor the containers.

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

Tip

Apple Silicon Users You'll probably want to build your own version of the base images as well, as the ones we build are amd64 only, and so painfully slow on ARM devices. This is unlikely to be resolved until GitHub Actions has ARM runners.

docker build -t ghcr.io/emfcamp/website-base -f ./docker/Dockerfile.base .
docker build -t ghcr.io/emfcamp/website-base-dev -f ./docker/Dockerfile.base-dev .
docker compose build --parallel
docker compose up

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

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.

Visual Studio Code

If you use Visual Studio Code it should present you with the option to open the project in a dev container. If not, run code . from your local copy, and ensure you have the Dev Containers extension installed.

Reopening in a dev container will start everything via Docker, attach your VSCode instance to the application container, install relevant extensions, and ensure everything is configured to fit with our standards.

The first time you start the dev container you will need to tell VSCode where to find the Poetry virtual environment. You can do this by open the command palette (Cmd-P on macOS devices) and searching for "Python: Select interpreter", the list presented should include website-${randomHash}-py3.11, which will be annotated as "Poetry". Select that, and then any Python tooling and shells will run within the appropriate virtualenv.

Errors starting the dev server

e.g. Error: While importing 'dev_server', an ImportError was raised.

If you've just updated and you're seeing errors when starting the dev server, first make sure you try:

    docker compose up --build

Tests

Tests are run using the ./run_tests script.

Code Style

For Python, we currently use Ruff 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 using ./flask make_admin -e [email protected]

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

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 (or populate a fresh DB).
  • ./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

andrewgodwin avatar anorthall avatar crablab avatar davidc avatar dependabot[bot] avatar edk0 avatar idnorton avatar jasperwallace avatar jayaddison avatar jellybob avatar joenash avatar johnr24 avatar jonty avatar katiesteckles avatar lukegb avatar marekventur avatar marksteward avatar mattsi-jansky avatar mscroggs avatar natm avatar ormiret avatar pezmc avatar phazonoverload avatar pyup-bot avatar russss avatar samlr avatar sammachin avatar siddv avatar vetraskr avatar wlcx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

website's Issues

volunteering check box

Hi Chaps. I mentioned this to crypt last night but if you guys could do me a
big favour on the ticket page, I'd be most grateful. Could you please have a
tick box and some text saying something like "If you are interested in
volunteering please check the box" - Essentially, this is a really good way
for me to get a list of emails regarding volunteers really early on. If its
a bother then dont; obviously ticket selling comes first but if its a quick
win, that'd be marvellous!
Cheers

Ben

Show how many tickets you picked on /pay/choose

I picked 2 tickets then pressed 'Reserve and Pay'.

Selection of payments options came up, bit back and clicked 'Reserve and Pay' again.

Upon picking GoCardless it said I owed 120gbp for 4 tickets, please show how many tickets are selected on /pay/choose and give an option to change them.

Bank Account Reconciliation

We need a script that, given an OFX file, will go through it and match up the bank transfer payments.

Downloading from the bank is not in scope, that's handled at my end.

Show bank transfer reference code on "my tickets" page

Atm pending bank transfers are only listed as such:

Bank transfer £30.00 inprogress Cancel
Bank transfer £60.00 inprogress Cancel

Could we also list the respective reference code, because people will forget it and then can't find it?

Add prominent "my reservations" link on "Thank you!" page

At the moment the "Thank you!" page (/pay/transfer-waiting?payment=14) only has this text at the top:

Thank you!
Your tickets have been reserved for 10 days and we will email you when we receive your payment.

I suggest to also add:

You can check the status of your reservations at this link:

This gets linked at the bottom ("Show my tickets"), but having it right at the top makes it more obvious, and also suggests a suitable next step (check out that page, and then bookmark it.)

Payment status page

If you've started the payment process, we should show you the pending status of each of your payments when you log in.

Ticket allocation

There should be a specified number of each ticket available (although we only need to care about pre-sales tickets for the initial release, so we can hard-code some of this.)
When a bank transfer or gocardless payment is started, a ticket should be allocated. This allocation should expire after a configured amount of time.

"Welcome" email when signing up.

With:

  • brief welcome message
  • mention of the username I chose (email address is implicitly stated as the email recipient)
  • a link to recover my account if I forgot my password

Add ticket count on "my tickets" page

Atm you just see a list of items:

Prepay Camp Ticket Pending
Prepay Camp Ticket Pending

Could we add a column "quantity" (with a value of "1" on each row), just to make it super-obvious how many you're buying?

SSL support

I've added the cert, but we need to make sure the URLs work OK. login_required should imply SSL.

Add transport preferences/scheduling questions

(Copying from a Lighthouse comment by Alison)

Could we also add the following too:

(1) How do you anticipate travelling to EMFcamp?

  • public transport - train, coach, other
  • private transport - car, motorcycle, bicycle, van, truck, bus, motorhome, other
  • would you be interested in car sharing?

(2) Which day / time do you plan to arrive in Milton Keynes?

  • Friday 31st August - pre-10am | 10am-1pm | 1pm - 5pm | 5pm -8pm | after 8pm
  • Saturday 1st September - pre-10am | 10am-1pm | 1pm - 5pm | 5pm -8pm | after 8pm
  • Sunday 2nd September - pre-10am | 10am-1pm | 1pm - 5pm | 5pm -8pm | after 8pm

(3) Which day / time do you expect to leave the site?

  • 0Saturday 1st September - pre-10am | 10am-1pm | 1pm - 5pm | 5pm -8pm | after 8pm
  • Sunday 2nd September - pre-10am | 10am-1pm | 1pm - 5pm | 5pm -8pm | after 8pm
  • Monday 3rd September - pre-10am | 10am-1pm

(4) Camping on site:

  • please note that we will not be able to accommodate caravans

(1) gives us a better idea of parking & shuttlebus needs, (2) & (3) for scheduling of shuttle bus(es) and site traffic management. Along with a note that you won't be held to these, of course!

implement logging

We need to log payments and payment status so we don't lose track of things.

Catch all the exceptions

Especially IntegrityErrors from SQLAlchemy and "No outstanding tickets" (probably should have its own exception)

More prominent error highlighting

The "You can only buy 4 tickets" error (and any other validation error) is not highlighted in any way.

Suggestion: change font/background colours to make more prominent. (Red may be appropriate.)

Admin pages

Add a flag to User to permit them to list users and drill down into payments

Allow payments to be cancelled

This will help with the per-user ticket limit.

Don't delete the payment, but set its status to "cancelled". Reset the expiry on the tickets to a couple of hours and tell the user so they can create a new payment.

Direct payment

Generate random easy-to-read-by-bank-tellers references for reconciliation
Describe process (S/O, cash, etc)
Allocate payments automatically or manually

"Account Rescue" features

I used a comically long username and password, want to log in, but the form for some reason doesn't autocomplete the name I entered last time (this is Safari 5.1.5)

I was not sent a "welcome" email when I signed up.

There is no account retrieval link.

I'm now locked out out of my account.

Improve wording

Various wording/process stuff to be elaborated. Needs going through step-by-step.

Rephrase "You can only buy 4 tickets" message

If I do a second round of ticket purchases I may go across the 4 ticket limit. The error message then is: "You can only buy 4 tickets", even if my number of tickets purchased in this second round is below 4.

Suggestion: rephrase as "You can only buy 4 tickets in total"
Or even: "You can only buy 4 tickets in total, but already reserved X."

Direct payment

Generate random easy-to-read-by-bank-tellers references for reconciliation
Describe process (S/O, cash, etc)
Allocate payments automatically or manually

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.