News for hackers. Stuff that matters.
Re:Python and Django on Heroku by john2x on Wednesday September 28, 2011 @04:22PM (#3049713)
Great news! But why is the example for Flask?
Re:Python and Django on Heroku by craigkerstiens on Wednesday September 28, 2011 @04:30PM (#3049759)
Flask is very lightweight and simple to get up and running. We also have a guide within the devcenter to get up and running with Django: http://devcenter.heroku.com/articles/django
Re:Python and Django on Heroku by Nic0 on Wednesday September 28, 2011 @04:25PM (#3049724)
Maybe because it takes less code to write a "hello world" with Flask than with Django.
Re:Python and Django on Heroku by paul-woolcock on Wednesday September 28, 2011 @04:31PM (#3049762)
Definitely this. A database is a requirement for a Django app, but not for Flask. I always seem to go back and forth about whether to start a micro-framework like Flask and use plugins and Python libs to assembly a framework that has only what I need, or use Django and (possible) include a lot of code that will never get run.
Re:Python and Django on Heroku by Pewpewarrows on Wednesday September 28, 2011 @04:41PM (#3049818)
It really depends on your vision for the app. If this is a single weekend project or a toy web site that you'll likely never touch again, or if you do will only be for minor updates, then I say go for Flask. It'll get in your way less and let you just launch it sooner.

For anything larger than that though, Flask has always turned into a giant headache for me. As soon as I ever start to try and organize the project better because it's become too large for a single file, all shit hits the fan. Supposedly this has gotten slightly better with 0.7's Blueprints, but I've yet to see it. Circular imports and Flask's global variables bite me in the ass on a regular basis. I also have come to really miss tons of features that Django offered, like URLconfs. The decorator technique works great when you can count the number of URLs that your app has on two hands. Beyond that, ack/grepping my project to find where anything lives isn't my idea of maintainable. With Django I can very cleanly trace through the whole request/response cycle in my head and by looking at the code paths.

Re:Python and Django on Heroku by fakeempire on Wednesday September 28, 2011 @06:41PM (#3050235)
I've been running multi file apps since before 0.7. If you read the documentation or searched mailing lists or looked at example applications you can see how. Blueprints made it even better.

2. In the documentation you will find that you can list out routes just like django. http://flask.pocoo.org/docs/api/#flask.Flask.add_url_rule

Re:Python and Django on Heroku by Pewpewarrows on Wednesday September 28, 2011 @09:20PM (#3050691)
I've read through all the documentation, and researched extensively. I still ran into problems way too often to ever warrant using it over a full framework for larger projects.
Re:Python and Django on Heroku by fakeempire on Thursday September 29, 2011 @02:04PM (#3053530)
I'm not trying to get you to use Flask or anything. But I definitely find it interesting that you have "read through the documentation or researched extensively" but were unable to find `add_url_rule`.

Either way, I'm glad we have selection and choice. At least we both like python! Peace

Re:Python and Django on Heroku by kingkilr on Wednesday September 28, 2011 @06:04PM (#3050102)
A database is not required fr Django.
Re:Python and Django on Heroku by paul-woolcock on Thursday September 29, 2011 @10:56AM (#3052665)
Ah, my mistake
Re:Python and Django on Heroku by proles on Wednesday September 28, 2011 @04:25PM (#3049726)
found that interesting as well, given that the release is around python+django, but it makes sense for the sake of quickly doing a demo with minimal requirements.

[edit] does adding Flask in requirements.txt automatically handle the easy_install portion?

Re:Python and Django on Heroku by calloc on Wednesday September 28, 2011 @06:27PM (#3050188)
anything in the requirements.txt is picked up by pip and installed into a virtualenv from what I have been able to gather.