Skip to content

Instantly share code, notes, and snippets.

Last active July 24, 2016 22:24
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save shangxiao/fdcdf47aaaedc8e7ce0e9338df1e28c0 to your computer and use it in GitHub Desktop.
django faq

Frequently asked questions:

  • Why shouldn't i use mysql? / mongo?
  • Should I use jinja, I read it's faster?
  • Should I use sqlalchemy, I read it's superior?
  • How do i make this thing happen in parallel/not wait for xxx to finish?
  • Why does django ask for a default? (But my table has no data in it wtf django!?!)
    • FunkyBob | I think, perhaps, it's time I wrote a blog post on "why does a migration adding a field need a default?"
  • Why do I need to commit my migrations? Why can't I just run makemigrations on the server?
  • migrations are source, makemigrations is a helper which takes you part way
  • i've seen people accidentally lose their migrations on production…  oops now what?
  • Why can't I just use locals() for template contexts?

Frequently encountered issues:

  • lack of trailing slash: redirect causing issues with comparisons & tests; POSTs…
  • staticfiles_dirs contains static_root
Copy link

sesh commented Jul 24, 2016

What's the deal with static files anyway? Should I have a static directory in my PROJ_ROOT, or should I put them in my apps?

Copy link

sesh commented Jul 24, 2016

Where should I put my project-wide base.html?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment