Re: Django 1.1 update

2009-05-10 Thread christian schilling
2009/5/7 Jacob Kaplan-Moss > > Now, we can't ship with anything that actually causes data loss, > i know you asked for reducing the number of tickets for 1.1, but i think one should actually be added: http://code.djangoproject.com/ticket/6191 this does not only cause data loss, but is causes d

Re: GSoC - denormalization model field proposal

2009-04-04 Thread christian schilling
2009/3/22 Daniel Tang > > On Sun, Mar 22, 2009 at 11:55, Christian Schilling > wrote: > > > 2) a API like the current django-denorm to turn functions into fields. > > this could work by creating a model DirtyInstance that contains > > nothing but a generic FK &g

Re: GSoC - denormalization model field proposal

2009-03-22 Thread Christian Schilling
As i already spend some time implementing demormalization for django (the "django-denorm" project on github mentioned above), i'd like to ad a few thoughts: The solutions created by Andrew Godwin and me currently rely completly on django signals to detect database rows that need updating. This ha

Re: view permission for contrib.admin

2008-12-18 Thread christian schilling
2008/12/18 Jacob Kaplan-Moss > > On Thu, Dec 18, 2008 at 10:35 AM, christian schilling > wrote: > > mybe changelist views should not check permissions at all, by default. > > If you think about this a bit you'll realize why this is a very, very > bad idea. I can th

Re: view permission for contrib.admin

2008-12-18 Thread christian schilling
2008/12/18 Jacob Kaplan-Moss > > To get back to the original question, you can do this right now with a > bit of custom admin code. Take a look at > ``ModelAdmin.has_change_permission`` -- you can override this method > to control exactly what the definition of "can change" is for a > particular

Re: view permission for contrib.admin

2008-12-18 Thread christian schilling
2008/12/18 Collin Grady > > Admin is for admins. Not limited users. > then why does it have permissions at all? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send

Re: Denormalisation Magic, Round Two

2008-11-30 Thread Christian Schilling
On Nov 30, 9:55 pm, Andrew Godwin <[EMAIL PROTECTED]> wrote: > I have a Trac setup around on my server for South, so if you want I'll > kick that slightly and install the Git plugin... this should be easier than setting it up on my server where i run debian/stable which contains only an old vers

Re: Denormalisation Magic, Round Two

2008-11-30 Thread Christian Schilling
On Nov 30, 12:54 am, Andrew Godwin <[EMAIL PROTECTED]> wrote: > The unit test 'suite' is hardly finished yet (one test...), but it does > at least do a pretty thorough use check of some of the more basic > scenarios. ./manage.py test denorm does indeed test and come out OK, > though - it even brou

Re: Denormalisation Magic, Round Two

2008-11-29 Thread Christian Schilling
On Nov 28, 5:30 pm, Andrew Godwin <[EMAIL PROTECTED]> wrote: > > One: This is the MirrorField equivalent in the example: > >     @denormalized(models.CharField,max_length=100) >     @depend_on_related(User) >     def owner_username(self): >         return self.owner.username > > While it's reall

Re: Denormalisation Magic, Round Two

2008-11-25 Thread Christian Schilling
i spend some time implementing my idea above (still just a proof of concept, all testing i did was on the example project) the resulting models.py: (still in the same place) http://github.com/initcrash/django-denorm/tree/master/example%2Fgallery%2Fmodels.py as you can see, this makes the @denorma

Re: Denormalisation Magic, Round Two

2008-11-24 Thread Christian Schilling
one more thing... On Nov 23, 12:00 pm, Andrew Godwin <[EMAIL PROTECTED]> wrote: > Additionally, your code loops over every model every time, whereas in > some cases you can detect which specific model needs updating (for > example, if you know that the field "planet" on the just-saved object is >

Re: Denormalisation Magic, Round Two

2008-11-24 Thread Christian Schilling
I think it would be even nicer if the function passed into the decorator could actualy return the new value of the field, instead of assigning it and call save(). Currenty the function does two tasks: 1) figure out what needs to be updated "resolve dependenys" 2) calculate the new value maybe the