Skip to content

Instantly share code, notes, and snippets.

@shangxiao
Last active July 24, 2016 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save shangxiao/fdcdf47aaaedc8e7ce0e9338df1e28c0 to your computer and use it in GitHub Desktop.
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
@shangxiao
Copy link
Author

shangxiao commented Jul 21, 2016

Some extra FAQ's that I see regularly on irc for a future MelbDjango: (ideally I'd like to survey people in the room to provide more meaningful answers to people who ask these questions)

  • Which editor/development environment should I use?
  • How do I debug my django project anyway? (logging, debuggers, DjDT)

@sesh
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?

@sesh
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