Re: How to "convert" data of anonymous users who then sign up

2009-10-12 Thread buttman
My first guess would be to just use the IP of the user in place of a user instance when saving objects as anonymous. Once they signup, give the user owneship of all objects with the user's IP. On Oct 12, 4:55 pm, Continuation wrote: > I'd like to let new users to do certain things, like submitti

Re: Distance across a LineString in GeoDjango

2009-10-12 Thread buttman
>>> ls.srs.name 'WGS 84' >>> srs.units (0.017453292519943282, 'degree') >>>ls.length 0.88329271346608429 So how do I go from degrees to miles? According to the docs, Distance does not handle 'degrees' as a unit. Should I somehow convert to another srs before I calculate distance? Or is there a be

Re: efficiently deleting content based on how old it is

2009-10-10 Thread buttman
I'm the author. Are you sure the comments are broken? I just made one and it seemed to work. On Oct 10, 11:55 pm, Kenneth Gonsalves wrote: > On Sunday 11 Oct 2009 9:07:38 am buttman wrote: > > > you could also do it this way: > > >http://pythonblog300246943.blogspot.

Re: efficiently deleting content based on how old it is

2009-10-10 Thread buttman
you could also do it this way: http://pythonblog300246943.blogspot.com/2009/09/cron-jobs-with-django-made-easy.html On Oct 9, 5:56 am, Chris Withers wrote: > Streamweaver wrote: > > You could set this up as a custom manage.py command and run a cron on > > that.  Gives the advantage of both init

Re: Designing django projects.

2009-10-05 Thread buttman
oh cool, I'm uploading the code right now to github, the link is here: http://github.com/nbv4/flightloggin Maybe check it out and see if you're interested? It uses a lot of GeoDjango stuff, so PostGIS is probably required also. On Oct 5, 7:22 pm, indyplanets wrote: > I'm a Web Designer who's le

Re: user disappearing when saved

2009-09-01 Thread buttman
On Sep 1, 3:17 pm, Joshua Russo wrote: > On Tue, Sep 1, 2009 at 10:09 AM, buttman wrote: > > > On Sep 1, 4:52 am, Joshua Russo wrote: > > > > Why are you using commit=False? > > > If I don't, I get a database error saying "user_id column can't

Re: user disappearing when saved

2009-09-01 Thread buttman
On Sep 1, 4:52 am, Joshua Russo wrote: > > Why are you using commit=False? If I don't, I get a database error saying "user_id column can't be null". --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gro

Re: How do you remove fields from a subclassed form?

2009-08-30 Thread buttman
class MyForm(ModelForm): field1 = CustomField(custom_option="sdsdsd") field2 = CustomField(custom_option="sdsdsd") field3 = CustomField(custom_option="sdsdsd") # class Meta: model = MyModel exclude = ('some_field') class AnotherForm(MyForm): field1 =

Re: How do you remove fields from a subclassed form?

2009-08-30 Thread buttman
On Aug 31, 12:08 am, nbv4 wrote: > class MyForm(ModelForm): >     field1 = CustomField(custom_option="sdsdsd") >     field2 = # ... >     # > >     class Meta: > > class AnotherForm(MyForm): sorry, I accidently pressed tab + space which prematurely submitted the messgae... I will add the re

Re: why doesn't the "with" template tag transverse blocks?

2009-06-24 Thread buttman
On Jun 24, 12:16 am, Karen Tracey wrote: > On Tue, Jun 23, 2009 at 11:05 PM, Steve Howell wrote: > > > {% extends "base_form.html" %} > > > {% with form.instance as object %} > > > I understand why tags outside the block would not render anything > > within the parent but it is not as clear to m

Re: why doesn't the "with" template tag transverse blocks?

2009-06-23 Thread buttman
On Jun 23, 11:03 pm, Karen Tracey wrote: > On Tue, Jun 23, 2009 at 10:22 PM, buttman wrote: > > You seem to have left out of your options the choice of putting the {% with > %} block in the parent template?  Or passing your variables in the context > with the names you'

Re: why doesn't the "with" template tag transverse blocks?

2009-06-23 Thread buttman
On Jun 23, 9:47 pm, Karen Tracey wrote: > On Tue, Jun 23, 2009 at 8:34 PM, nbv4 wrote: > > > I'm trying to set up a template for all my forms, but I'm having > > trouble using the {% with %} block: > > > {% extends "base_form.html" %} > > {% with form.instance as object %} > > > {% block title%}