Re: [sqlalchemy] Re: django user (using django ORM) + sqlalchemy for other db tables

2013-09-10 Thread Dennis
Thanks for the advice -- your recommendations against this configuration 
were a surprise to me...
It's making me rethink what I want (and how much I want it).
I'll post this as a comment to the first stackoverflow question so others 
are made aware.


On Monday, September 9, 2013 10:17:10 PM UTC+8, Mauricio de Abreu Antunes 
wrote:

 The major problem is: everything in Django is mapped to the ORM. Even the 
 sessions. Sorry for being negative but that is my way to understand this.


 2013/9/9 Jonathan Vanasco jona...@findmeon.com javascript:

 Honestly, I wouldn't do this.

 Django has a lot of magic under the hood, and it's ORM does some very 
 specific things to make this magic happen.  It's not just the auth, it's 
 how everything is structured in the database and how the app integrates 
 with the database.  You're likely to break things and be miserable.  Django 
 , Rails, etc are all-in frameworks -- they provide a stack with several 
 decisions made for you; it's all or nothing.

 I'd personally suggest you either:

 - Continue using Django with their ORM.  Create a secondary model that 
 uses SqlAlchemy to reflect the Django mapping.  That will let you use 
 SqlAlchemy to do advanced read queries.

 - Use a different framework ( Pyramid, Flask, etc ; many have auth 
 plugins that work with SqlAlchemy models )


  -- 
 You received this message because you are subscribed to the Google Groups 
 sqlalchemy group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to sqlalchemy+...@googlegroups.com javascript:.
 To post to this group, send email to sqlal...@googlegroups.comjavascript:
 .
 Visit this group at http://groups.google.com/group/sqlalchemy.
 For more options, visit https://groups.google.com/groups/opt_out.




 -- 
 *Mauricio de Abreu Antunes*
 *
 *
 Github: https://github.com/mauricioabreu
 Twitter: https://twitter.com/maugzoide
  

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sqlalchemy] Re: django user (using django ORM) + sqlalchemy for other db tables

2013-09-10 Thread Jonathan Vanasco

On Tuesday, September 10, 2013 6:47:41 AM UTC-4, Dennis wrote:

 Thanks for the advice -- your recommendations against this configuration 
 were a surprise to me...
 It's making me rethink what I want (and how much I want it).
 I'll post this as a comment to the first stackoverflow question so others 
 are made aware.

 https://twitter.com/maugzoide



Not sure why its a surprise. There's a reason why you don't see SqlAlchemy 
used in Django.

To clarify -- it's entirely possible to use SqlAlchemy or most other ORMs 
with Django... it's just that many of the core apps ( like the automatic 
admin tools , which is why most people choose to use Django in the first 
place ) are tightly coupled to the stock ORM.  By switching the ORM, you 
lose most of the automatic admin backend functionalities.  This is pretty 
common knowledge, it's listed on their site in a few places, as well as 
Stack Overflow and Quora.

WIthout the admin tools , and ditching the ORM for SqlAlchemy, I don't see 
much of a point in using Django.  You'd probably have an easier time 
building and maintaining the same project in Flask or Pyramid.

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.


[sqlalchemy] Re: django user (using django ORM) + sqlalchemy for other db tables

2013-09-09 Thread Dennis
PS: from my google searching, the 2 references below (and their references) 
are really the only mention of this approach on the web!
So, it would be great to get some definitive advice on this seemly 
reasonable approach.



On Monday, September 9, 2013 6:04:23 PM UTC+8, Dennis wrote:

 Any advice (or potential problems) with using sqlalchemy with the django 
 framework but keeping the django user auth module?

 The django ORM would be used for the auth module (and its user table).
 SqlAlchemy ORM would be used for other tables and also to read (but not 
 write) the django user table.

 This combination would allow the power of sqlachemy but maintain 
 compatibility with django auth -- a sweet combination!
 Of course, the django admin system would likely not work, but that's ok.

 Just wondering if others have tried this and what issues might have come 
 up.

 This approach is described in the stackoverflow comment here:

 http://stackoverflow.com/questions/18465197/how-do-i-start-with-django-orm-to-easily-switch-to-sqlalchemy#comment27166795_18476898

 The method to integrate sqlalchemy into django is described here:

 http://stackoverflow.com/questions/6606725/best-way-to-integrate-sqlalchemy-into-a-django-project


-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.


[sqlalchemy] Re: django user (using django ORM) + sqlalchemy for other db tables

2013-09-09 Thread Jonathan Vanasco
Honestly, I wouldn't do this.

Django has a lot of magic under the hood, and it's ORM does some very 
specific things to make this magic happen.  It's not just the auth, it's 
how everything is structured in the database and how the app integrates 
with the database.  You're likely to break things and be miserable.  Django 
, Rails, etc are all-in frameworks -- they provide a stack with several 
decisions made for you; it's all or nothing.

I'd personally suggest you either:

- Continue using Django with their ORM.  Create a secondary model that uses 
SqlAlchemy to reflect the Django mapping.  That will let you use SqlAlchemy 
to do advanced read queries.

- Use a different framework ( Pyramid, Flask, etc ; many have auth plugins 
that work with SqlAlchemy models )


-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sqlalchemy] Re: django user (using django ORM) + sqlalchemy for other db tables

2013-09-09 Thread Mauricio de Abreu Antunes
The major problem is: everything in Django is mapped to the ORM. Even the
sessions. Sorry for being negative but that is my way to understand this.


2013/9/9 Jonathan Vanasco jonat...@findmeon.com

 Honestly, I wouldn't do this.

 Django has a lot of magic under the hood, and it's ORM does some very
 specific things to make this magic happen.  It's not just the auth, it's
 how everything is structured in the database and how the app integrates
 with the database.  You're likely to break things and be miserable.  Django
 , Rails, etc are all-in frameworks -- they provide a stack with several
 decisions made for you; it's all or nothing.

 I'd personally suggest you either:

 - Continue using Django with their ORM.  Create a secondary model that
 uses SqlAlchemy to reflect the Django mapping.  That will let you use
 SqlAlchemy to do advanced read queries.

 - Use a different framework ( Pyramid, Flask, etc ; many have auth plugins
 that work with SqlAlchemy models )


  --
 You received this message because you are subscribed to the Google Groups
 sqlalchemy group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to sqlalchemy+unsubscr...@googlegroups.com.
 To post to this group, send email to sqlalchemy@googlegroups.com.
 Visit this group at http://groups.google.com/group/sqlalchemy.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
*Mauricio de Abreu Antunes*
*
*
Github: https://github.com/mauricioabreu
Twitter: https://twitter.com/maugzoide

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.