Skip to content

Instantly share code, notes, and snippets.

@rj76
Created July 28, 2015 06:12
Show Gist options
  • Save rj76/4f12f2706f8051de70fa to your computer and use it in GitHub Desktop.
Save rj76/4f12f2706f8051de70fa to your computer and use it in GitHub Desktop.
Demovibes source cleanup

I looked at the existing codebase and taking into account my experiences with previous Django projects/deployments I would suggest to do the following:

  • Change directory structure to something more modular and structured
  • Lose all old south migrations and create inital ones for 1.8
  • Check all models for changes with 1.8, because there will be
  • Get a mysql slave up on my vps to test the new setup
  • Use nginx as reverse proxy for gunicorn and to serve static content (and node.js if it's used)
  • Use supervisord to keep an eye on processes (gunicorn, node.js, etc.)
  • Integrate existing config in a more generic way of handling configs (dev/staging/live)
  • Start rewriting views (from what I have seen, this should be quite doable with existing packages like django-class-based-auth-views and the work already done)
  • All jinja2 => django templates (yawn, this is going to be the boring part)
  • All ajax and client side JS that needs refactoring
  • Make it deployable via Travis-CI

Like I said, would be cool to be able to do this, but the changes are quite radical, so I forked the repo and will start working on that.

Cheers, Richard

@arabek
Copy link

arabek commented Jul 28, 2015

👍

@arabek
Copy link

arabek commented Jul 28, 2015

Also, please take note of what the previous developer left for us:

Quote: "the obvious things would be to clean up the codebase. Make it Django 1.8 compatible, get everything over on one render engine instead of two, use django's generic class based views instead of the function based ones and my own class based view system I made before django had it's own, and so on.

also standardize some things like ajax and client side JS, which have different implementations here and there as I were learning better ways to do things over time.

and if that sounds like a truckload of very boring drudgework, you'd be absolutely correct."

Thanks! :)

@arabek
Copy link

arabek commented Jul 28, 2015

Some 2 cents:

Sidenote: A fix for current openid mess would be top1-prio & highly desired. I'm unfortunately not skilled enough to fix it.

@rj76
Copy link
Author

rj76 commented Jul 29, 2015

Well, gunicorn is just what I've seen people use and I'm quite happy with it, but I'm not saying we have to use it ;)

Okay, I'll dive into that. I do have some experience with django-allauth which also includes openID

http://django-allauth.readthedocs.org/en/latest/providers.html

@TheTerrasque
Copy link

Just a small FYI: There's also some local, scenemusic-unique changes that might conflict with the new code, so it might not be a clean deploy

@arabek
Copy link

arabek commented Jul 29, 2015

For the general version it should be ok, any specific nectarine changes will be resolved manually (hopefully) by me.

If not, it might be necessary to back out from the nectarine-specific changes - and maintain a clean codebase.

@arabek
Copy link

arabek commented Jul 29, 2015

@rj76
Copy link
Author

rj76 commented Jul 30, 2015

Can we isolate these nectarine specific changes?

@rj76
Copy link
Author

rj76 commented Jul 30, 2015

Oh yeah, from the changelog of 1.6:

Pillow is now the preferred image manipulation library to use with Django. PIL is pending deprecation (support to be removed in Django 1.8). To upgrade, you should first uninstall PIL, then install Pillow.

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