Re: Alternative model without Database
I don't know your problem in detail, but as alternative I recommend read about twisted framework. If you work with xmlrpc servers and you need in call remote methods, then it help you. Simple exmaples: http://twistedmatrix.com/documents/current/web/howto/xmlrpc.html -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Alternative model without Database
On 24 nov, 10:28, Elyrwen wrote: > Hello, > > I' ve been recently interested in Djagno framework and I am at the > point of choosing it as the framework for my project. My application > will not use database, but will use webservices to get data and then > process it. > > I need a substitute for the Django model layer. Precisely I need a > class that would parse a wsdl (this I am doing with suds) and then > call the remote methods. There should be one instance of this class > served by all requests to > avoid parsing wsdl for evey request - sort of a singleton class that > would keep parsed stubs. It is possible to place such shared class in > Django? Can you point me to some solutions that avoid parsing wsdl > with each new request? > > Maybe there is yet another way to obtain it with Django? Others already gave you good answers - like using the db/model layer as a local cache, which, FWIW, it's probably how I would solve this problem. I'd just like to add a more general comment: Django is a Python framework, and your views can act on just any Python object. So if and when you don't need the ORM part, don't use it !-) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Alternative model without Database
On Nov 24, 1:28 am, Elyrwen wrote: > Hello, > > I' ve been recently interested in Djagno framework and I am at the > point of choosing it as the framework for my project. My application > will not use database, but will use webservices to get data and then > process it. > > I need a substitute for the Django model layer. Precisely I need a > class that would parse a wsdl (this I am doing with suds) and then > call the remote methods. There should be one instance of this class > served by all requests to > avoid parsing wsdl for evey request - sort of a singleton class that > would keep parsed stubs. It is possible to place such shared class in > Django? Can you point me to some solutions that avoid parsing wsdl > with each new request? Is there a reason your app can not use a database? Depending on how often your wsdl data changes, you could map a response to a django model object and then check to see if it exists (essentially using the ORM as a wsdl cache). Or you could use Django's cache framework itself: http://docs.djangoproject.com/en/1.1/topics/cache/#the-low-level-cache-api The former would let you have more class like access to the data (with methods etc), while the latter is more pure key/value. -Preston > > Maybe there is yet another way to obtain it with Django? > > Best regards, > PS -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Alternative model without Database
On Nov 24, 2009, at 1:28 AM, Elyrwen wrote: > My application > will not use database, but will use webservices to get data and then > process it. It can be challenging to excise all of the uses of the database from a Django application. Since you'll be caching the results of your web services operations locally, perhaps cache them in a local database, such as SQLite? You could, then, subclass Model in such a way as to populate the cache on demand. -- -- Christophe Pettus x...@thebuild.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Alternative model without Database
On Tue, Nov 24, 2009 at 11:28 AM, Elyrwen wrote: > Hello, > > I' ve been recently interested in Djagno framework and I am at the > point of choosing it as the framework for my project. My application > will not use database, but will use webservices to get data and then > process it. > > I need a substitute for the Django model layer. Precisely I need a > class that would parse a wsdl (this I am doing with suds) and then > call the remote methods. There should be one instance of this class > served by all requests to > avoid parsing wsdl for evey request - sort of a singleton class that > would keep parsed stubs. It is possible to place such shared class in > Django? Can you point me to some solutions that avoid parsing wsdl > with each new request? > > Maybe there is yet another way to obtain it with Django? > > Best regards, > PS > > I'm also interested in something like this. My feeling was a bit different though. Sticking to django's way of doing things, I would rather create a web service model that defines all the messages and generate WSDL from that file (much like using manage.py syncdb). But I guess if you are using some other tool to generate the WSDL you may not wish to do it this way. I know RoR has something called ActiveResource, but I don't know how closely it maps to ActiveRecord? Regards Dirk -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Alternative model without Database
Hello, I' ve been recently interested in Djagno framework and I am at the point of choosing it as the framework for my project. My application will not use database, but will use webservices to get data and then process it. I need a substitute for the Django model layer. Precisely I need a class that would parse a wsdl (this I am doing with suds) and then call the remote methods. There should be one instance of this class served by all requests to avoid parsing wsdl for evey request - sort of a singleton class that would keep parsed stubs. It is possible to place such shared class in Django? Can you point me to some solutions that avoid parsing wsdl with each new request? Maybe there is yet another way to obtain it with Django? Best regards, PS -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.