Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login page #67

Open
azjps opened this issue Apr 18, 2024 · 1 comment
Open

Login page #67

azjps opened this issue Apr 18, 2024 · 1 comment

Comments

@azjps
Copy link

azjps commented Apr 18, 2024

Hi @czue, just wanted to thank you for making this project available. We used as the starting point for our wedding website over a year ago and were really happy with the outcome. As a python dev who hasn't really worked with Django or frontend before, there's no way I would have managed to get anything reasonable in time without having this to start from 😄

We added a few things like a login page, a savable RSVP form, and some clunky JavaScript effects:

aa-website-480p.mp4

Some notes about some technical items that I could contribute back upstream:

  • The login page was created from a CustomAuthForm based on https://stackoverflow.com/questions/43542442 and using django-widget-tweaks
  • We wanted multiple guests of the same party to be able to login through any of their emails, so we added a derived guests.backends.ModelBackend which looks up the corresponding Guest object and returning its guest.party.user.
  • We set up a custom context processor (https://stackoverflow.com/questions/433162/) to pass through certain settings "globally" as variables to jinja2 rather than having to specify them as arguments to render().
  • We used dotenv to manage credentials
  • We refactored the CSS stylesheet colors to use CSS variables
  • We added a generic QuestionAnswer model to allow us to add arbitrary questions and guests to provide arbitrary answers in the RSVP form

The resulting code had a lot of last minute hacks so I don't think I'll upload the end result, but I'd be happy to try to separate out some of the above items.

@czue
Copy link
Owner

czue commented Apr 19, 2024

Wow, looks great! Also glad the project was useful. :)

I'd definitely happily take contributions. The dotenv update and CSS variables seem like no-brainers. The rest sound useful but also maybe unique to specific use cases. If you feel like they can be incorporated in a generic way that would be useful to everyone and want to go through the trouble of packaging them up, you're welcome to send them across as PRs and I'll have a look. Another possibly easier idea would be to add a link to your repo to the README as an example of a site with some of these additional features...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants