-
Notifications
You must be signed in to change notification settings - Fork 0
Stack
Vlad Timofeev edited this page Jun 2, 2020
·
13 revisions
I think the best way to write a django project ASAP is to use cookiecutter-django.
Cookiecutter-django configures all these features for you in a second.
You can do both SPAs and MPAs using it.
- dj-stripe for payments.
- Use Tailwind, bulma, or bootstrap (but default bootstrap). If you want to replace bootstrap with something else take a look at
tailwind
branch of this repo. - You may want to add react or vue components in django templates for interactive parts of your website. I think vue is a better fit because you can write templates right inside the django template. Maybe this will affect SSR.
- Vanilla JS may be enough for your project, think twice before using vue/react.
- And do not use angular for it.
- Remember that
Netflix
ended up removing react and writing vanilla JS in some parts of their web application. - See https://www.reddit.com/r/programming/comments/d6qpwm/why_we_should_ditch_react/
- disable JS and go to
reddit.com
- Activate DRF option creating cookiecutter-django project
- Consider using djoser to handle authentication for you. I'm not sure if it works with
knox
tokens, but there are othertokenauthentication
classes with multi-device support. - Think about Session vs Token authentication.
- Consider using drf-yasg.
- Consider using django-filter.
- See cookiecutter-drf.
- Any frontend framework. While choosing it, think about SSR and why are you making a SPA and not an MPA. Maybe there's no need to build a SPA and it would be easier and more efficient to use old technologies, they're not bad. Read rendering on the web
- See https://www.youtube.com/watch?v=GiFpyyU6Odc
- See https://www.reddit.com/r/programming/comments/d6qpwm/why_we_should_ditch_react/
- See https://github.com/angular/angular/issues/32855, https://github.com/angular/preboot/issues/75 . Angular has a huge FOUC problem and it's still not fixed.