Re: Session-based messages (Contrib-05, #4604)
On Jan 6, 11:20 am, "Jacob Kaplan-Moss" wrote: > I'd like to see this moved into an external app so that we can > de-couple it from the 1.1 release. If it proves to be popular and > stable, we could then consider it for 1.2. I extracted 4604 into an external app[1] some months ago. It's quite simple, and it's been humming along happily for me. It's not as ambitious as 4604 because it doesn't try to transparently integrate Django's existing auth-based messages with the session-based ones (IIRC, some of the things 4604 did along these lines back when I looked at it would be difficult to do in an external app). I don't have a lot of time to put into improving it right now, but I'd be happy to turn over the keys to Ramiro or anyone else who wants to work on it. Carl [1] http://code.google.com/p/django-session-messages/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Py3k port updated
I have updated my Py3k port of django. As before, it is just the bare minimum to get through the tutorial; as the possibly most significant change since the previous patch, it now supports psycopg2. I have updated the Wiki page at http://wiki.python.org/moin/PortingDjangoTo3k with the new patch. The patch applies against Django's trunk; it was tested with the HEAD of Python's py3k branch (i.e. 3.1). Regards, Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Py3k port updated
Martin, Did you by any chance try running the Django test suite(because that's probably going to be the best way to spot breakages). Thanks, Alex On Sat, Jan 10, 2009 at 4:47 PM, Martin v. Löwis wrote: > > I have updated my Py3k port of django. As before, it is just the bare > minimum to get through the tutorial; as the possibly most significant > change since the previous patch, it now supports psycopg2. > > I have updated the Wiki page at > http://wiki.python.org/moin/PortingDjangoTo3k > with the new patch. > > The patch applies against Django's trunk; it was tested with the HEAD > of Python's py3k branch (i.e. 3.1). > > Regards, > Martin > > > > -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Py3k port updated
On Jan 11, 9:47 am, Martin v. Löwis wrote: > I have updated my Py3k port of django. As before, it is just the bare > minimum to get through the tutorial; as the possibly most significant > change since the previous patch, it now supports psycopg2. > > I have updated the Wiki page athttp://wiki.python.org/moin/PortingDjangoTo3k > with the new patch. > > The patch applies against Django's trunk; it was tested with the HEAD > of Python's py3k branch (i.e. 3.1). Have you by chance tried running it on top of Apache/mod_wsgi (version from subversion which has Python 3.0 support)? Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Py3k port updated
> Did you by any chance try running the Django test suite(because that's > probably going to be the best way to spot breakages). No, I haven't (or only to the degree to find out that runtest.py is not in 3.0 syntax, as it uses incorrect except clauses). I'm fairly certain though that the test suite fails quickly, with just a few tests passing. Contributions are welcome. Regards, Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Py3k port updated
> Have you by chance tried running it on top of Apache/mod_wsgi (version > from subversion which has Python 3.0 support)? No, only in runserver mode. Regards, Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Py3k port updated
On Jan 11, 10:15 am, Martin v. Löwis wrote: > > Have you by chance tried running it on top of Apache/mod_wsgi (version > > from subversion which has Python 3.0 support)? > > No, only in runserver mode. I'll give it a go, but for someone who doesn't know about running 2to3 etc, to make things a but more obvious can you add to your page a quick set of instructions as to what someone needs to do to try this out. Ie., what needs to be done after a checkout, does one apply patch and then install it with 2to3 running automatically, or is there some other voodoo that needs to be done? Thanks. Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Py3k port updated
> I'll give it a go, but for someone who doesn't know about running 2to3 > etc, to make things a but more obvious can you add to your page a > quick set of instructions as to what someone needs to do to try this > out. Ie., what needs to be done after a checkout, does one apply patch > and then install it with 2to3 running automatically, or is there some > other voodoo that needs to be done? >From the patch/django point of view, it is really very simple. You apply the patch, and then do path-to-python3.1 setup.py install No need to run 2to3; this is done behind the covers. The really tricky part might be that you have to use python3.1, as the 2to3 version shipped with 3.0 didn't include all of the necessary fixers (although 3.0.1 will). I would recommend to try runserver first: your application might also need porting, or might invoke parts of Django that I haven't ported. Django apparently features a large variety of error reporting scenarios, depending on where exactly in Django the error occurs. If you run into problems, feel free to contact me. Regards, Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Validate Unique and new/existing models
Hi all, related to work on #6845 I stumbled across an issue with validate_unique. Currently it validates all the unique fields that are present on a form and in cleaned_data. If the instance passed to the form has pk set, it will exclude the model from the db lookup validating uniqueness. Since we moved validate_unique to model, we no longer can just test for self.pk because of custom primary keys. The question is now: what to do? at http://github.com/HonzaKral/django/tree/model-validation I am adding a property _new to the instance in ModelForm.__init__ so that later in the model's validate_unique method I can check for it. That works, but seems ugly. On IRC we also discussed the possibility of an additional parameter to model.clean() or marking all models as existing when constructed by the ORM and using that as source of this piece of information. What do you people think? Thanks Honza Král E-Mail: honza.k...@gmail.com ICQ#: 107471613 Phone: +420 606 678585 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Py3k port updated
On Jan 11, 10:28 am, Martin v. Löwis wrote: > > I'll give it a go, but for someone who doesn't know about running 2to3 > > etc, to make things a but more obvious can you add to your page a > > quick set of instructions as to what someone needs to do to try this > > out. Ie., what needs to be done after a checkout, does one apply patch > > and then install it with 2to3 running automatically, or is there some > > other voodoo that needs to be done? > > From the patch/django point of view, it is really very simple. You > apply the patch, and then do > > path-to-python3.1 setup.py install > > No need to run 2to3; this is done behind the covers. The really tricky > part might be that you have to use python3.1, as the 2to3 version > shipped with 3.0 didn't include all of the necessary fixers (although > 3.0.1 will). > > I would recommend to try runserver first: your application might also > need porting, or might invoke parts of Django that I haven't ported. > Django apparently features a large variety of error reporting > scenarios, depending on where exactly in Django the error occurs. > > If you run into problems, feel free to contact me. Hmmm, main page for an empty project created with startproject is fine under Apache/mod_wsgi with Python 3.1a0. [Sun Jan 11 14:31:29 2009] [notice] Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.7l DAV/2 mod_wsgi/3.0-TRUNK Python/3.1a0 configured -- resuming normal operations When get more time will need to start working through the tutorial, setting up a database and making sure posting content and other aspects of WSGI interface work properly. I must say I was pleasantly surprised that even that worked first time. Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
multidb model binds
I update the http://github.com/weigj/django-multidb/tree , add support to model binds, like this: # settings.py MODEL_BINDS = { 'hello.*':'db1', 'django.contrib.*':'db2', } I think this is most easy way bind model to db, and I also think about connection manage for master-slaver and sharding, may look like this: #settings.py CONNECTION_MANAGE = dict( MASTER_SLAVER = [ {'master':db1,'slaver':['db2','db3',]} ], SHARD = [ ['chooser':my_sharding_chooser,'db':[],'model':[]], ] ) Any suggest? Regards, Wei guangjing --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---