Re: DjangoAMF vs. pyAMF - any opinions?
On Sat, Jun 14, 2008 at 11:52 PM, Ederson Mota Pereira <[EMAIL PROTECTED]> wrote: > Hi Cristopher, > > Thanks for you feedback. > > I'm working only with PyAMF now. My example application is working fine > with Flex 3 and exposed methods in django side, but I'm having problem with > class mapping of the Django models. (More specifically, in the Flex side: > TypeError: Error #1034: Type Coercion failed: cannot convert [EMAIL PROTECTED] > to cli.Client). I already tried in many ways, including using Flex 2 with > the s2flex2 library. > > Do you (or anyone) already did anything similar? > > Thanks Well I haven't yet. When I started work with django+ PyAMF tandem there was only support for simple objects so I decide to rely on them. Anyway in order get any django objects sent to flex (and the other way) you'll need to write your own classes (on both sides) and register them - in python: pyamf.register_class - in flex they need to implement IExtrenizable and need to be registered with metetag [RemoteClass(alias="flex.messaging.io.ObjectProxy")] It's really whole lots of work to do it right so I wouldn't bother doing that. greets Chris > > On 6/14/08, Krzysztof Ciesielski <[EMAIL PROTECTED]> wrote: >> >> On 5/3/08, J Peyret <[EMAIL PROTECTED]> wrote: >> > >> > I am just starting out with Flex 3 and I'd like to know if anybody's >> > got any strong opinions on which AMF<=>Python bridge is best for using >> > AMF to talk to Django. >> > >> > I do know Python and am somewhat familiar with Django. >> > >> > Things that make a difference to me, roughly in order of decreasing >> > importance: >> > >> > - code maturity >> > - how much activity there is on the project, by how many developers >> > - absolute drop-dead bugs that prohibit using either under specific >> > circumstances >> > - documentation >> > - ease of use and clean design >> > - performance >> > >> > Far as I can tell from surfing around, DjangoAMF is more mature and >> > perhaps easier to set up, but it is hosted in Japan and last time I >> > checked I didn't speak Japanese so I am worried about missing out on >> > the latest project "gossip". >> > >> > Neither seem to have much documentation going for them. That's OK to >> > an extent, I'll probably try both, but I'd welcome some insight from >> > people who have used them in anger. >> > >> > What I would like to do is to move data back and forth from a Django- >> > based postgreSQL database backend to a GUI application with complex >> > behavior requirements, using Apache to serve the SWFs. Not all of the >> > relational data will be housed in Django models either, as I will use >> > some raw SQL to manipulate it as needed. >> > >> > Any opinions? >> > > >> > >> >> >> Hi, I had same problem some time ago. My decision was to choose PyAMF. >> So here's what I found out after couple months of work. >> - code maturity >> both projects are immature and still under heavy development, pyAmf is >> considered as Beta >> >> >> - how much activity there is on the project, by how many developers >> >> PyAMF has really strong community of European developers, (I reported >> bug and it was fixed next day) >> >> >> - absolute drop-dead bugs that prohibit using either under specific >> circumstances >> >> >> in PyAMF as for now I've seen only two really big issues and both are >> fixed >> >> - documentation >> both have barelly none, but as they are python OS projects you >> shouldn't be suprised. Just like with django most info you can get by >> reading code. And code is very clean and nice to read. >> >> >> - ease of use and clean design >> >> PyAMF is very easy and clean, you just define DjangoGateway object >> that is much alike mapping string function names to coresponding view >> names/functions >> >> - performance >> haven't tested it yet, but as django apps are easilly scalable it >> shouldn't be any problem at all. >> >> >> >> -- >> Greets >> Christopher Ciesielski >> -- >> mob. +48 791457074 >> email: [EMAIL PROTECTED] >> skype: mi_yagi >> jabber: [EMAIL PROTECTED] >> www: http://www.pydev.pl/ >> ASI: http://www.asi.pwr.wroc.pl/ >> >> > > > > > -- Pozdrawiam Krzysiek Ciesielski -- mob. +48 791457074 email: [EMAIL PROTECTED] skype: mi_yagi jabber: [EMAIL PROTECTED] www: http://www.pydev.pl/ ASI: http://www.asi.pwr.wroc.pl/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: DjangoAMF vs. pyAMF - any opinions?
On 5/3/08, J Peyret <[EMAIL PROTECTED]> wrote: > > I am just starting out with Flex 3 and I'd like to know if anybody's > got any strong opinions on which AMF<=>Python bridge is best for using > AMF to talk to Django. > > I do know Python and am somewhat familiar with Django. > > Things that make a difference to me, roughly in order of decreasing > importance: > > - code maturity > - how much activity there is on the project, by how many developers > - absolute drop-dead bugs that prohibit using either under specific > circumstances > - documentation > - ease of use and clean design > - performance > > Far as I can tell from surfing around, DjangoAMF is more mature and > perhaps easier to set up, but it is hosted in Japan and last time I > checked I didn't speak Japanese so I am worried about missing out on > the latest project "gossip". > > Neither seem to have much documentation going for them. That's OK to > an extent, I'll probably try both, but I'd welcome some insight from > people who have used them in anger. > > What I would like to do is to move data back and forth from a Django- > based postgreSQL database backend to a GUI application with complex > behavior requirements, using Apache to serve the SWFs. Not all of the > relational data will be housed in Django models either, as I will use > some raw SQL to manipulate it as needed. > > Any opinions? > > > Hi, I had same problem some time ago. My decision was to choose PyAMF. So here's what I found out after couple months of work. - code maturity both projects are immature and still under heavy development, pyAmf is considered as Beta - how much activity there is on the project, by how many developers PyAMF has really strong community of European developers, (I reported bug and it was fixed next day) - absolute drop-dead bugs that prohibit using either under specific circumstances in PyAMF as for now I've seen only two really big issues and both are fixed - documentation both have barelly none, but as they are python OS projects you shouldn't be suprised. Just like with django most info you can get by reading code. And code is very clean and nice to read. - ease of use and clean design PyAMF is very easy and clean, you just define DjangoGateway object that is much alike mapping string function names to coresponding view names/functions - performance haven't tested it yet, but as django apps are easilly scalable it shouldn't be any problem at all. -- Greets Christopher Ciesielski -- mob. +48 791457074 email: [EMAIL PROTECTED] skype: mi_yagi jabber: [EMAIL PROTECTED] www: http://www.pydev.pl/ ASI: http://www.asi.pwr.wroc.pl/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Newbie Question
On Jan 29, 2008 10:03 PM, Tim Sawyer <[EMAIL PROTECTED]> wrote: > > My model includes: > > surname = models.CharField(maxlength=50) > forenames = models.CharField(maxlength=50) > > def __str__(self): > return self.name > > def name(self): > return self.forenames + ' ' + self.surname > > > Referencing name in a template works fine, but in the admin site I get > >__str__ returned non-string (type instancemethod) > > when displaying a list of my object. > > why is this? > Read carefully the info you get ... __str__ method is about to return instance of string objects (or string like object), You pass a method ... name, you either should use something like def __str__(self): return self.name() or read something about @property and use it > Thanks, > > Tim. No problem, but better read Dive into python first :D -- Greets, Chris Ciesielski -- mob. +48 791457074 email: [EMAIL PROTECTED] skype: mi_yagi jabber: [EMAIL PROTECTED] www: http://www.pydev.pl/ ASI: http://www.asi.pwr.wroc.pl/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Authorization from ssl certificate data
Hi, I've got a problem with django used with mod_ssl and mod_python. I wanted to use environmental variables from mod_ssl in order to automaticly log in users but it appears that those variables are not accessible trough request.META Has anyone met this problem before. and has any idea how to solve this issue? with regards, Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Admin file uploads validation
Hi, Some time ago I had to validate ODT files sent to server via admin site. Since I know how long it took me to solve that problem and I haven't found any hints in google I decided to share with my solution. Take have a look on my code: import zipfile try: from cStringIO import StringIO except: from StringIO import StringIO class ODTField(models.FileField): def __init__(self, verbose_name=None, name=None, upload_to='', **kwargs): super(ODTField,self).__init__(verbose_name, name, upload_to, \ validator_list = [self.isODTFile]) def isODTFile(self, field_data, all_data): try: tmp = StringIO(field_data["content"]) zf = zipfile.ZipFile(tmp,"r") if zf.read("content.xml") =0: raise ValidationError, _('Document must be \ in OpenDocument format.') except: raise ValidationError, _('Document must be in OpenDocument format.') The most importatnt part of code is passing the argument validator_list = [self.isODTFile] into argument list of __init__. Btw. I started with my friend site about python and python related stuff in polish. If you speek polish and have some time:D take have look on it http://www.pydev.pl Christopher Ciesielski aka kac.gigant --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---