Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So then your answer is simple- just like in Flask, put the function wherever it makes sense for your application and desired architecture.

If you really prefer SQLAlchemy, there is nothing stopping you from using it over the Django ORM, I happen to prefer the Django ORM, but Django doesn't get jealous if you go out with a different ORM (it is a polyamorious web framework[1]).

Yes, I have seen Django applications do that. There are plenty of individuals out there advocating such a separation. I wouldn't worry about these "different developers' and their opinions.

[1] I was going to use a smiley face here, but then I recalled that a Python dev was de-flocked recently for using smiley emoji as it is offensive to some individuals, so insert whatever words or symbols you don't find offensive that indicate humor instead.



Again, I'm not saying you can't do this with Django, I'm saying it makes it much harder than it should be.

Using Django without its ORM really doesn't seem attractive. I'm really not sure what you'd be getting from Django at that point. Crap templates, views that aren't views. The ORM is the only good bit of Django. Well, that and the package ecosystem.

The more I think about it the more I realise it's that last point that is the real attraction.

Also please don't worry about offending me. I come from the old internet ;)


Now I think I get it, you just don't like Django. And that is fine, there are plenty of good alternatives. I happen to like it and find that I miss many of its small convenience functions when I don't have it. Its not perfect, but it gets the job done or gets out of the way when it doesn't- at least for me.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: