Earlier quoted context omitted.
So a stupid question about virtualenv for you. Why does it default to full paths for everything?
I actually don't "know" either. But I suspect it has to do with knowing which python to use (system generally) and if the user wants to use global packages as well. checkout virtualenvwrapper ( http://virtualenvwrapper.readthedocs.org/en/latest/install.h... ) as well for handling virtualenvs.
Eighteen months of Django
41–50 of 85 posts
Re: Eighteen months of Django
#42Earlier quoted context omitted.
Note that periodic execution, one of the more useful aspects of celery, is not supported on all backends. If you're using rabbitMQ, you're golden. If you're using most or all other transports (including SQS), you're likely SOL and will have to resort to either bare cron jobs or something like django-cronograph that accomplishes the same thing. celery is definitely nice, but it does have its limitations (like everythi…
This is good to know. I've just started using it with redis. I never really saw the point of that part of celery anyway. Cron's perfectly adequate on its own (and installed just about everywhere).
Re: Eighteen months of Django
#43Re: Eighteen months of Django
#44Earlier quoted context omitted.
This is good to know. I've just started using it with redis. I never really saw the point of that part of celery anyway. Cron's perfectly adequate on its own (and installed just about everywhere).
The nice thing about it from our point of view is the ability to keep everything in source control. Granted, you can keep your cron jobs as scripts, but celery+rabbitMQ allows you to keep it all in Python without the extra deployment step. It's not a huge deal, but it does help a bit with maintainability and getting new devs up to speed.
I agree that you should keep the code itself in python, but that can be handled just by making it a management command that gets called by cron.
Sysadmins understand and love cron, too. I think celery reinventing the wheel might make some of them a bit mad.
Re: Eighteen months of Django
#45Earlier quoted context omitted.
Neither! Actually, as the others have said it completely depends on what you're making. Django is great if you're making a standard cms type website. News feed, blog, etc. There's a bit of a learning curve but it gives you a lot of the scaffolding out of the box (and there are loads of examples to learn from). It has the biggest community (I guess?) so you'll always be able to find answers / libraries / sample code.…
What is your opinion about web2py? I started exploring it a week back, and it seems to have a lot of built in functionality. I thought it would be the easiest web framework to get started with (since it was originally built to help teach students about web programming). However, it seems to have a vast number of components, and it looks like learning all of it would entail almost the same effort as learning Django...
Re: Eighteen months of Django
#46Earlier quoted context omitted.
Using celery for the first time, coming from PHP-land, blew my mind. Python is now my language of choice for "getting shit done".
Returning to PHP land afterwards feels like you're taping your code together with duct tape and bits of string.
I write this not to meaninglessly bash PHP but to hopefully convince even a single developer passing by to try out Python. I thought the same thing as you, passer-by dev, once: "Why do I need Python? It's stupid. It uses whitespace weirdly. I can do whatever I need in PHP." But then you realize you could be doing everything you're doing in PHP... better, smarter, and faster.
Re: Eighteen months of Django
#47Re: Eighteen months of Django
#48One more addition: Use heroku.
Re: Eighteen months of Django
#49Earlier quoted context omitted.
Neither! Actually, as the others have said it completely depends on what you're making. Django is great if you're making a standard cms type website. News feed, blog, etc. There's a bit of a learning curve but it gives you a lot of the scaffolding out of the box (and there are loads of examples to learn from). It has the biggest community (I guess?) so you'll always be able to find answers / libraries / sample code.…
What is your opinion about web2py? I started exploring it a week back, and it seems to have a lot of built in functionality. I thought it would be the easiest web framework to get started with (since it was originally built to help teach students about web programming). However, it seems to have a vast number of components, and it looks like learning all of it would entail almost the same effort as learning Django...
The creator and lead developer, Massimo Di Pierro, is incredibly active and always willing to lend a hand with whatever problem you have. I've seen him around reddit (not sure if he's on HN) and even when he's met with the inevitable haters, he's always been friendly and cordial.
Just like you've said, web2py was originally made to teach people how to build websites, which really shows in its architecture. It forgoes traditional Python conventions ("explicit is better than implicit" being a major one) in order to be more beginner-friendly. Some of the more experienced developers find this annoying, but if you're coming from PHP or a fresh background, it can be much easier to get started. Just take a look at the overview on Wikipedia[0]. It gives a good outline.
This is coming from someone who doesn't even use web2py. I prefer Flask for personal projects and Django for work/group things, but I would whole-heartedly recommend web2py. Run through the book[1] and, if you don't like it, give the Django tutorial[2] a shot. If that doesn't mesh with you, there's Flask[3], Pyramid[4], TurboGears[5], and CherryPy[6]. (The last two I would not recommend for beginners, but they're still good!)
[0]: http://en.wikipedia.org/wiki/Web2py#Overview
[2]: https://docs.djangoproject.com/en/1.5/intro/tutorial01/
[3]: http://flask.pocoo.org/docs/
[4]: http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch...
Re: Eighteen months of Django
#50As someone who is thinking about doing a python project, should I learn Django or just go with Flask? Any thoughts on those two?
Flask is so simple that it's definitely worth picking that up regardless (in any case, I think it's well done and worth having in your arsenal). However, for large web projects, Django beats it hands down. Doing similar work with Flask would require so much wheel-reinvention that it'd be hard to justify your time or your client's money when it's all built quite well already. Of course it's not perfect, and it's not f…
IronPython?