Re: Django open source cashflow management app

2011-07-27 Thread zodman
the app is back :)

On Tue, Jul 26, 2011 at 6:48 AM, Derek  wrote:
> On Jul 25, 8:51 pm, zodman  wrote:
>> http://misgastos.zodman.com.mxits on spanish sorry.
>>
>> https://github.com/zodman/misgastos/
>>
>> On Sun, Jul 24, 2011 at 8:44 AM, mf  wrote:
>> > Does anyone knows about an open source cashflow management app like
>> > this one[0], built with django?.
>>
>> > [0]http://pulseapp.com/
>>
>> > Thanks for your help.
>>
> I get an error from that site:
>
> uWSGI Error
> wsgi application not found
>
> --
> 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 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Andres Vargas
www.zodman.com.mx

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Improperly Configured Remote User Middleware

2011-07-27 Thread Karen Tracey
On Wed, Jul 27, 2011 at 9:50 PM, John  wrote:

> I did check here before posting, clearly not well enough, but I was
> mostly googling for django improperly configured remote user and
> similar stuff. Thanks for the link to the bug. It looks like it was
> fixed, but not committed.
>
>
It was not directly fixed, but the code which was causing the problem has
been restructured, therefore it is believed to be fixed by that other
change, which has been committed.

You'll usually get best results when searching by copy/pasting the error, or
taking verbatim key bits of it like RemoteUserMiddleware.

Karen
-- 
http://tracey.org/kmt/

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Extending the ManyToMany relation, maybe a bad idea

2011-07-27 Thread Joshua Russo
Ok, so I can retrieve this extra data in the __init__ of the model form, but 
it seems like I will need to skip all of the cleaning and automatic 
validation of the form; because the data, to be displayed with the 
associated checkbox will have to be included with the items field in the 
OrganizationForm and fields and form names need to have a one to one 
relationship. 

I keep thinking I'm doing something wrong here. From the lack of responses I 
feel like there is no real good way to handle a group of options with 
additional relational data.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/dgChbxIsY24J.
To post to this group, send email to django-users@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: Improperly Configured Remote User Middleware

2011-07-27 Thread John
I did check here before posting, clearly not well enough, but I was
mostly googling for django improperly configured remote user and
similar stuff. Thanks for the link to the bug. It looks like it was
fixed, but not committed.

On Jul 27, 7:56 pm, Karen Tracey  wrote:
> Did you try searching this list for RemoteUserMiddleware before banging your
> head too hard against the wall on this one? I know this problem of
> RemoteUserMiddleware masking other errors has come up at least twice on this
> list in the past. It has also hopefully been fixed, 
> seehttps://code.djangoproject.com/ticket/15671
>
> Karen
> --http://tracey.org/kmt/

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Improperly Configured Remote User Middleware

2011-07-27 Thread Karen Tracey
Did you try searching this list for RemoteUserMiddleware before banging your
head too hard against the wall on this one? I know this problem of
RemoteUserMiddleware masking other errors has come up at least twice on this
list in the past. It has also hopefully been fixed, see
https://code.djangoproject.com/ticket/15671

Karen
-- 
http://tracey.org/kmt/

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Extending the ManyToMany relation, maybe a bad idea

2011-07-27 Thread Joshua Russo
My problem is that I have multiple values and I need to associate the list 
of extra fields with selected relations for the ManyToMany relation. Below 
is a simplified version of what my setup is. 

I want to create an edit form for Organization, but I'm struggling with how 
best to save (and re-retrieve for display) the descr field in 
OrganizationItem. I don't see how adding fields to the OrganizationForm will 
accomplish this.

# Models

class Organization(models.Model):
name  = models.CharField("Organization's name", max_length=100)
items = models.ManyToManyField(ListItem, through='OrganizationItem')

class OrganizationItem(models.Model):
organization = models.ForeignKey(Organization)
item   = models.ForeignKey(ListItem)
descr  = models.TextField("Description", blank=True)

class ListItem(models.Model):
name = models.CharField("Name", max_length=200)
order= models.IntegerField("Order")
extraInfo = models.BooleanField("Requires extra information")
multiLineInfo = models.BooleanField("The display should use a multi-line 
edit box instead of a single line edit")
descrLabel= models.CharField("Extra information label", 
max_length=50,
blank=True)

# ModelForm

class OrganizationForm(ModelForm):
class Meta:
model = Organization


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/i4f72wAdJqkJ.
To post to this group, send email to django-users@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: Doesn't render templates any longer

2011-07-27 Thread Doug Ballance
 def main(request):
 context=Context()
     this_is_the_template_object = loader.get_template("main/
start.html")
 
this_is_the_template_rendered=this_is_the_template_object.render(context)
     return HttpResponse(this_is_the_template_rendered)


What you are feeding HttpResponse is the object rather than the
rendered template.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Extending the ManyToMany relation, maybe a bad idea

2011-07-27 Thread Shawn Milochik
You can override the ModelForm.

Add the fields to the ModelForm. Set the initial values by overriding
__init__, and save them by overriding the save() method.

Should be pretty simple.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: USE_I18N vs. USE_L10N

2011-07-27 Thread Lachlan Musicman
On Wed, Jul 27, 2011 at 16:53, kenneth gonsalves  wrote:
> On Tue, 2011-07-26 at 15:09 +0100, Tom Evans wrote:
>> I strongly disagree, i18n and l10n have explicit and well known
>> technical meanings, dating from the late 80s. It is right and proper
>> to use those names in django, as they are used in every other project
>> under the sun.
>
> +1

And mine makes it +2



-- 
The butter lamb, also known as a buttered lamb, is a traditional
butter sculpture accompanying the Easter meal for many Slovenian and
Polish Catholics. Butter is shaped into a lamb either by hand or in a
lamb-shaped mould. Frequently the eyes are represented by peppercorns
and a white banner with a red cross on a toothpick is placed on its
back. (via http://bestofwikipedia.tumblr.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-users@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: Extending the ManyToMany relation, maybe a bad idea

2011-07-27 Thread Joshua Russo
Someone tell me where I'm going wrong conceptually here, I feel like I'm 
making this too hard.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/T5m8OIVMyusJ.
To post to this group, send email to django-users@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: Extending the ManyToMany relation, maybe a bad idea

2011-07-27 Thread Joshua Russo
I am using the through keyword. I'm just trying to figure out the 
most efficient way to create a form field and widget to update the data.

What I'm struggling with is how a ManyToMany field with an intermediate 
table containing extra fields fits into the ModelForm saving. I'm just not 
sure where to save the extra field data, how best to collect it in the form, 
or how I would handle re-retrieving of the extra fields. The only  thing 
I've created so far is an extension of the ModelMultipleChoice field that 
creates a custom choices structure and an accompanying widget that extends 
CheckboxSelectMultiple. This will display the structure, but what's the best 
practice here for saving and re-displaying?


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/BcS0YvmaCjwJ.
To post to this group, send email to django-users@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: Improperly Configured Remote User Middleware

2011-07-27 Thread John
Just some further info for anyone who may come across this in the
future, this happened to me a few more times. After the third time it
happened I was hitting my head against the wall and finally noticed a
simple error in a signal handler I was importing into models.py. After
fixing that bug the configuration error went away and I was able to
continue developing the site. So when I said in the second post that I
changed something minor unrelated to the issue, I probably fixed a bug
that was crashing the authentication middleware.

So I believe the issue is:
The middleware files are processed in order
The authentication middleware needs models and so models.py is
imported
The import of models.py fails
The authentication middleware fails to load models properly and so
it fails
The remote user middleware checks for the authentication
middleware which is not properly loaded
It throws the error with message 'remote user middleware needs
authentication middleware...' masking the actual cause of the issue

I am just guessing, I haven't looked at much of the Django internals,
but I am hoping that my experience will be helpful for someone else.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Doesn't render templates any longer

2011-07-27 Thread Max Bachl
Hi all!
I've encountered a strange bug today.
I want to return an HTTP response with this code:

def main(request):
t = loader.get_template("main/start.html")
return HttpResponse(t)

However, the only result I get is



<'>
and the rest of the html file has gone. The same error occurs with
every other file as well. I have tried everything.

Max

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Doesn't render templates any longer

2011-07-27 Thread Max Bachl
Hi all!
I've encountered a strange bug today.
I want to return an HTTP response with this code:

def main(request):
t = loader.get_template("main/start.html")
return HttpResponse(t)

However, the only result I get is



<'>
and the rest of the html file has gone. The same error occurs with
every other file as well. I have tried everything.

Max

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Extending Reusable App Models

2011-07-27 Thread Django Grappelli
Hi All,
I'm working with a reusable Django application which defines a model that
I'd like to extend.  I've read through the documentation on model
inheritancebut
haven't found what I'm looking for.  I'd like to be able to subclass
the
model so as to add a few fields to it, but I only want to create one table
for the model.  Is there any way around this?
DG

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Doesn't render templates any longer

2011-07-27 Thread Max Bachl
Hi all!
I've encountered a strange bug today.
I want to return an HTTP response with this code:

def main(request):
t = loader.get_template("main/start.html")
return HttpResponse(t)

However, the only result I get is



<'>
and the rest of the html file has gone. The same error occurs with
every other file as well. I have tried everything.

Max

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Admin - change ForeignKey display text

2011-07-27 Thread galgal


How can I change the display text in select while selecting a field which is 
as ForeignKey? I need to display not only the name of FK, but also name of 
it's parent.

Anybody can give a clue?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/hTxrcKjq-f0J.
To post to this group, send email to django-users@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: Django + PyPy = ?

2011-07-27 Thread Dmitry Pisklov
That's basically the information I'm trying to find. PyPy docs says nothing 
about that, and they doesn't mention any setup process at all - all that I 
need to do according to their site is "unpack and run - and don't touch 
anything!"... And it simply works for simple python stuff... But not for 
django. And I'm pretty sure it's not a django problem - I'm just trying to 
find here someone who tried running django on pypy and succeeded.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/OY8G3ppuqcgJ.
To post to this group, send email to django-users@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: Built-in template tags and filters

2011-07-27 Thread Uffe
Many thanks, great help!

I'm developing with google apps, and I had no idea that they django was that 
much out of date.

Greetings,

Uffe.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/AttGHxCa8gIJ.
To post to this group, send email to django-users@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.



serving static files

2011-07-27 Thread Shawn Milochik

I want to allow certain users to download files uploaded by other users.

I found django-protected-files[1] and django-private-files[2], both of 
which look like they do the job. The latter is more recent and is on 
Read The Docs, so it's probably the way to go.


Before I start reviewing the code and implementing, does anyone have any 
suggestions? Is there a "top dog" for this need?


Thanks,
Shawn


[1] https://github.com/lincolnloop/django-protected-files
[2] https://bitbucket.org/vvangelovski/django-private-files/src

--
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: object value distinct for ForeignKey

2011-07-27 Thread Ian Clelland
On Wed, Jul 27, 2011 at 9:29 AM, Ian Clelland  wrote:

>
>
> On Mon, Jul 25, 2011 at 11:29 AM, Alfredo Alessandrini <
> alfreal...@gmail.com> wrote:
>
>> Hi,
>>
>> I've a model testDB with a foreignkey "country" related to another
>> database.
>>
>> I need to retrieve the unique value of country.common_name.
>>
>> With this
>>
>> country_list = testDB.objects.values('country').distinct
>>
>> I can retrieve the unique value, but only the ID.
>>
>> In [63]: testDB.objects.values('country').distinct
>> Out[63]: > {'country': 0L}, {'country': 0L}, {'country': 0L}, {'country': 0L},
>> {'country': 0L}, {'country': 0L}, {'country': 0L}, {'country': 0L},
>> {'country': 0L}, {'country': 0L}, {'country': 0L}, {'country': 0L},
>> {'country': 0L}, {'country': 0L}, {'country': 0L}, {'country': 0L},
>> {'country': 0L}, {'country': 0L}, {'country': 0L}, '...(remaining
>> elements truncated)...']>
>>
>> How can I  retrieve the attribute "common_name" of the country object?
>>
>
> The "" is usually a clue that what you have retrieved is
> actually a method, and you haven't called that method yet.
>
> Try:
> testDB.objects.values('country').distinct()
>
> (Although you should probably also read the note here:
> https://docs.djangoproject.com/en/1.3/ref/models/querysets/#distinct to
> see why you might want to  be writing
> testDB.objects.order_by().values('country').distinct() )
>
>

And this time, I'll actually respond after reading the last line of your
question -- if what you want is a list of distinct country *names*, where
the name is a field on the country object, you are looking for somethng like
this:

testDB.objects.order_by().values('country__common_name').distinct()


-- 
Regards,
Ian Clelland


-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: object value distinct for ForeignKey

2011-07-27 Thread Ian Clelland
On Mon, Jul 25, 2011 at 11:29 AM, Alfredo Alessandrini  wrote:

> Hi,
>
> I've a model testDB with a foreignkey "country" related to another
> database.
>
> I need to retrieve the unique value of country.common_name.
>
> With this
>
> country_list = testDB.objects.values('country').distinct
>
> I can retrieve the unique value, but only the ID.
>
> In [63]: testDB.objects.values('country').distinct
> Out[63]:  {'country': 0L}, {'country': 0L}, {'country': 0L}, {'country': 0L},
> {'country': 0L}, {'country': 0L}, {'country': 0L}, {'country': 0L},
> {'country': 0L}, {'country': 0L}, {'country': 0L}, {'country': 0L},
> {'country': 0L}, {'country': 0L}, {'country': 0L}, {'country': 0L},
> {'country': 0L}, {'country': 0L}, {'country': 0L}, '...(remaining
> elements truncated)...']>
>
> How can I  retrieve the attribute "common_name" of the country object?
>

The "" is usually a clue that what you have retrieved is
actually a method, and you haven't called that method yet.

Try:
testDB.objects.values('country').distinct()

(Although you should probably also read the note here:
https://docs.djangoproject.com/en/1.3/ref/models/querysets/#distinct to see
why you might want to  be writing
testDB.objects.order_by().values('country').distinct() )


>
> thanks in advance,
>
> Alfredo
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Regards,
Ian Clelland


-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how do I update only specific fields in model

2011-07-27 Thread Josh
Thanks for the replys. The more I learn about Django, the more I start to 
apreciate it. I still have a lot to learn, but compared with Drupal I 
already feel more comfortable about Django because there is much more 
control. 

This is my second Django week, but sometimes I seem to get stuck at simple 
things because I don't quite understand how Django work internally. I really 
apreciate the effort taken to answeri silly questions ;-)


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/XW72Deji4PEJ.
To post to this group, send email to django-users@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: Include Django form in PHP based website

2011-07-27 Thread Brian Bouterse
Where I work, we mix django into PHP sites often since most of our customers
already have PHP web sites, but want to pay us to extend them with new
functionality.  I do this by setting up a django project on another
apache/uwsgi/nginx virtual host which routes specific parts of the
application to Django and away from PHP.  You can do all of this with a
single domain, and on a single machine.  This way the requests never even
are sent to the PHP app for certain sections of the URL space.  Thus you can
replace sections of a PHP app with Django functionality.  You will need to
recreate the look and feel on the django side though.  Sometimes that can be
a pain to get perfect and it leads to a look-and-feel consistency
maintainence problem over time.  One way to avoid that pain is to have the
PHP site include blocks of functionality from the django application through
something like an iframe.  This minimizes the look and feel consistence
since most every page is loaded from PHP.

Brian

On Wed, Jul 27, 2011 at 9:34 AM, brian wrote:

> I'm learning Django and was hoping to get some advice on an
> application I want to try.
>
> I'm trying to create a Django form that is included in a php based
> website.
>
> I'm working on a php based website that has a 'contact us' form that
> was created with http://wufoo.com/.  In the php website there is a
> little code to include the wufoo form.  The form is created in wufoo
> and they manage the e-mails and storing the data.
>
> I want to replace the wufoo form with my Django form.  My plan was to
> host the Django form on a new domain.  My reason behind wanting to use
> Django is so that when the contact is submitted I can store the info
> in a database, send an e-mail, and write the data to another program.
> I don't care about wufoo's automatic form building; My plan is to hand
> write the form code.
>
> I bought the book 'The Definitive Guide to Django: Web Development
> Done Right' and I've read about half of it.  It seems creating the
> form is really easy but I'm not sure the best way to include that form
> in the php website.
>
> Do you have any suggestions about creating a Django form that will be
> included in a php website?  In the php website, I'd prefer not to use
> javascript.
>
> Brian
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Brian Bouterse
ITng Services

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Include Django form in PHP based website

2011-07-27 Thread brian
I'm doing this to add features like better submitted data management
and writing the data to another program.

Brian

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Optimization of a Large QuerySet iteration

2011-07-27 Thread bruno desthuilliers
On Jul 26, 4:59 pm, nixlists  wrote:
> On Tue, Jul 26, 2011 at 7:42 AM, Roman Klesel 
> wrote:
>
> ...
>
> > The main question you may ask yourself may be whether or not you
> > really want to have django do the whole calculation thing. Many
> > database engines have very powerful aggregation capabilities, support
> > for stored procedures, functions etc.
> > Some of the aggregation features are available through the django orm.
>
> Thanks,
>
> Is it a best practice to take a bunch of code out to the stored
> procedures as much as possible, or the opposite is true with Django?

It all depends on your project's requirements. A generic app should be
as db-agnostic as possible (that is, should work on any DB you can use
with Django), which may make stored procs somewhat unpractical. If
it's a specific, custom app and the specs says "it will run on this
exact DB, period", then stored procs may be fine (just make sure the
customer / DBA is ok...).

This being said, you can already do a lot with standard SQL functions
and aggregation.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how do I update only specific fields in model

2011-07-27 Thread bruno desthuilliers
On Jul 27, 1:53 pm, Josh  wrote:

Daniel already answered, just a couple observations:

> 1. the id of the record is not known.

Given your question ("update (...) fields in a model", which I assume
mean : "update (...) fields in a model _instance_"), you obviously
know the pk either directly (passed as argument etc), indirectly (you
have some lookup that will retrieve the model instance), or of course
thru the instance itself (if you already have it).

> 2. Using the samples in the query-documentation. Create another query to get
> a single object in a queryset using:

> n = SomeModel.objects.get(id=myid)
> Somemodel.objects.filter(pk=n).update(somefield=newfielddata)

the "pk" lookup shortcut expected a litteral value, not a model
instance, so, assuming your model's id field is the pk (which is
usually the case), this should be:

  n = SomeModel.objects.get(id=myid)
  Somemodel.objects.filter(pk=n.id).update(somefield=newfielddata)

which is a overcomplicated (and rather inefficient) way to write:

  Somemodel.objects.filter(pk=myid).update(somefield=newfielddata)

> m.save()

Did you mean 'n' ? If yes, a call to n.save() at this point will
overwrite the previous update.



> I was thinking to try a different approach. When a record exists, retrieve
> all existing data and add this to the .save(). This seems like a pretty
> cumbersome way to achieve updating a few fields.

Indeed !-)

> What is the best way to
> achieve this?

Depends on quite a few things. Queryset.update is atomic - which can
avoids some problems with concurrent access - and is quite fast. OTHO,
it won't trigger the pre_save and post_save signals, nor even call on
your model's save method, so if your code relies on either a custom
save method and/or pre/post save signals, you might screw it up.

Most often, you'll be safer using Daniel's solution for most things
and only using Queryset.update for batch updates if and when you know
you don't have any python code triggered by yourmodel.save()

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Include Django form in PHP based website

2011-07-27 Thread Andre Terra
Why?

On Wed, Jul 27, 2011 at 10:34 AM, brian wrote:

> I'm learning Django and was hoping to get some advice on an
> application I want to try.
>
> I'm trying to create a Django form that is included in a php based
> website.
>
> I'm working on a php based website that has a 'contact us' form that
> was created with http://wufoo.com/.  In the php website there is a
> little code to include the wufoo form.  The form is created in wufoo
> and they manage the e-mails and storing the data.
>
> I want to replace the wufoo form with my Django form.  My plan was to
> host the Django form on a new domain.  My reason behind wanting to use
> Django is so that when the contact is submitted I can store the info
> in a database, send an e-mail, and write the data to another program.
> I don't care about wufoo's automatic form building; My plan is to hand
> write the form code.
>
> I bought the book 'The Definitive Guide to Django: Web Development
> Done Right' and I've read about half of it.  It seems creating the
> form is really easy but I'm not sure the best way to include that form
> in the php website.
>
> Do you have any suggestions about creating a Django form that will be
> included in a php website?  In the php website, I'd prefer not to use
> javascript.
>
> Brian
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Include Django form in PHP based website

2011-07-27 Thread brian
I'm learning Django and was hoping to get some advice on an
application I want to try.

I'm trying to create a Django form that is included in a php based
website.

I'm working on a php based website that has a 'contact us' form that
was created with http://wufoo.com/.  In the php website there is a
little code to include the wufoo form.  The form is created in wufoo
and they manage the e-mails and storing the data.

I want to replace the wufoo form with my Django form.  My plan was to
host the Django form on a new domain.  My reason behind wanting to use
Django is so that when the contact is submitted I can store the info
in a database, send an e-mail, and write the data to another program.
I don't care about wufoo's automatic form building; My plan is to hand
write the form code.

I bought the book 'The Definitive Guide to Django: Web Development
Done Right' and I've read about half of it.  It seems creating the
form is really easy but I'm not sure the best way to include that form
in the php website.

Do you have any suggestions about creating a Django form that will be
included in a php website?  In the php website, I'd prefer not to use
javascript.

Brian

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: snippet

2011-07-27 Thread Stuart MacKay

Rahul,

Not everything posted to djangosnippets is working code. The ratings and 
number of comments is your best guide as to the quality of the solution. 
If you use your favourite search engine for "django admin drag and drop" 
you have lots of alternatives - snippet 2306 does not show up until the 
bottom of the second page.


Stuart MacKay
Lisbon, Portugal


Tried this snippet but not working

http://djangosnippets.org/snippets/2306/

Anyone else tried it, I would like to drag and drop rows on django admin.

Thanks.

RJ
--
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


--
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to make jQuery sliders based on model IntegerField?

2011-07-27 Thread urukay
Hi,

basically, it's not a Django issue. You can display standard integer
field in your form, but in your template you will use JQuery Slider to
alter it so the field will be displayed as a slider. And when user
moves the slider, you will write down the value into the integer
field.

Radovan
http://www.yau.sk

On 27. Júl, 13:00 h., Gagiel  wrote:
> Hello all,
>
> I am wondering how can I display a jQuery slider for users to choose
> from 1-100 when I make a models.IntegerField? Is there a plug-in or
> some snippets I can refer to?
>
> --
> This email is brought to you --
> by Gagiel Z at Gmail.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Optimization of a Large QuerySet iteration

2011-07-27 Thread Roman Klesel
2011/7/26 nixlists :

> Is it a best practice to take a bunch of code out to the stored
> procedures as much as possible, or the opposite is true with Django?

I don't want to comment on whether it's best practice or not ...

I was thinking about efficiency:
If the data processing gets too slow doing it with django, shipping
the task to the database could improve things.

On the other hand, if the speed is not the main issue. Keeping things
simple and in one place is also nice.

I just wanted to point out that usually databases are capable of doing
these things very efficiently.

Regards Roman

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how do I update only specific fields in model

2011-07-27 Thread Josh
You already gave the answer. I just tried your solution and it worked.  I 
was trying a wrong approach and was making it much more complex than it 
really is. My approach caused existing values to be overwritten by 
Null-values and only inserting the new values.

Thanks for answering a newbie question.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/oagTvQN3dT8J.
To post to this group, send email to django-users@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: how do I update only specific fields in model

2011-07-27 Thread Daniel Roseman
On Wednesday, July 27, 2011 12:53:52 PM UTC+1, Josh wrote:
>
> I want to update only specific fields in a model and keep the old values in 
> other fields. I've been working on this for a few days but I run out of 
> possible solutions.As far as I can see from the documentation and internet 
>  there isn't an easy solution to do this.  I'm new at Django, so I might 
> overlook the obvious.  
>
> Ticket https://code.djangoproject.com/ticket/4102 seems to indicate that 
> this is an issue. I'm too inexperienced with django to try patching it and I 
> prefer another way using standard Django 1.3
>
> I've tried the following:
>
> * .add() only inserts the new data and existing fields are overwritten and 
> 'NULL' in the database
> * do it through .update() in query using the following procedure and pseudo 
> code.
> 1. the id of the record is not known. Create a queryset .objects.all() and 
> store all id's as values in a dictionary with another unique in the model as 
> a key to retrieve the matching id. At first I used the other unique 
> CharField as a PK, but that gave errors in Postgres
> 2. Using the samples in the query-documentation. Create another query to 
> get a single object in a queryset using:
> n = SomeModel.objects.get(id=myid)
> Somemodel.objects.filter(pk=n).update(somefield=newfielddata)
> m.save()
> This creates errors, so that doesn't work either.
>
> I was thinking to try a different approach. When a record exists, retrieve 
> all existing data and add this to the .save(). This seems like a pretty 
> cumbersome way to achieve updating a few fields. What is the best way to 
> achieve this?
>


It's not at all clear what your problem is. Obviously, updating a field in a 
model is something we all do all the time. Your question doesn't say what's 
wrong with just doing:

obj = MyModel.objects.get(criteria=whatever)
obj.myfield = mynewvalue
obj.save()

--
DR.

>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/53BpudnNd8EJ.
To post to this group, send email to django-users@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.



how do I update only specific fields in model

2011-07-27 Thread Josh
I want to update only specific fields in a model and keep the old values in 
other fields. I've been working on this for a few days but I run out of 
possible solutions.As far as I can see from the documentation and internet 
 there isn't an easy solution to do this.  I'm new at Django, so I might 
overlook the obvious.  

Ticket https://code.djangoproject.com/ticket/4102 seems to indicate that 
this is an issue. I'm too inexperienced with django to try patching it and I 
prefer another way using standard Django 1.3

I've tried the following:

* .add() only inserts the new data and existing fields are overwritten and 
'NULL' in the database
* do it through .update() in query using the following procedure and pseudo 
code.
1. the id of the record is not known. Create a queryset .objects.all() and 
store all id's as values in a dictionary with another unique in the model as 
a key to retrieve the matching id. At first I used the other unique 
CharField as a PK, but that gave errors in Postgres
2. Using the samples in the query-documentation. Create another query to get 
a single object in a queryset using:
n = SomeModel.objects.get(id=myid)
Somemodel.objects.filter(pk=n).update(somefield=newfielddata)
m.save()
This creates errors, so that doesn't work either.

I was thinking to try a different approach. When a record exists, retrieve 
all existing data and add this to the .save(). This seems like a pretty 
cumbersome way to achieve updating a few fields. What is the best way to 
achieve this?






-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/9zf4wZZ0VdsJ.
To post to this group, send email to django-users@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.



How to make jQuery sliders based on model IntegerField?

2011-07-27 Thread Gagiel
Hello all,

I am wondering how can I display a jQuery slider for users to choose
from 1-100 when I make a models.IntegerField? Is there a plug-in or
some snippets I can refer to?

-- 
This email is brought to you --
by Gagiel Z at Gmail.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: any recipes for 'live' updating a site with model changes

2011-07-27 Thread Gelonida N
On 07/27/2011 11:26 AM, bruno desthuilliers wrote:
> 
> 
> On Jul 27, 10:04 am, Uros Trebec  wrote:
>> Hi,
>>
>> for your DB migration problem you should take a look at South[0].
> 
> +1
> 
> I've just started using it and wonder why I spent so much time doing
> things the painfull and error-prone manual way...
> 
>> As for your 'under maintenance' step you will have to do that manually
> 
> Here are two examples of doing it using apache rewrite rules -
> possibly the most common solution, which I also used on most projects
> (whether PHP, Django, Zope or whatever) so far:
> 
> http://garthhumphreys.com/2011/06/11/painless-django-maintenance-mode-with-fabric/
> http://zebert.blogspot.com/2007/12/maintenance-mode-for-apache.html
> 
> For a latest Django project I use a in-house fork of django-
> maintenance-mode. It still have a few quirks I hope to fix soon so we
> can publish it.
> 

Thanks.
Will look into the rewrite rules.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: any recipes for 'live' updating a site with model changes

2011-07-27 Thread Gelonida N
Thanks a lot everybody.

Will look into south..


On 07/27/2011 10:04 AM, Uros Trebec wrote:
> Hi,
> 
> for your DB migration problem you should take a look at South[0].
> As for your 'under maintenance' step you will have to do that manually
> or use some kind of a tool to automate it, as well as other steps for
> the upgrade. There are many such tools, Fabric[1] and Chef[2] being
> two of the most popular.
> 
> [0] http://south.aeracode.org/docs/
> [1] http://docs.fabfile.org/en/1.2.0/index.html
> [2] http://www.opscode.com/chef/
> 

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Recommended locations for templates?

2011-07-27 Thread bruno desthuilliers
On Jul 27, 9:05 am, Rodney Topor  wrote:
> What is the recommended best practice for locating templates in a
> project directory?

Depends...

>  In particular, which of the following two
> structures is considered better?
>
> 1.  project/templates/{app1,app2,...}
>
> 2. project/{app1/templates, app2/templates,...}

The convention for the second scheme is:
project/{app1/templates/app1/, app2/templates/app2,...}

Out of the box, Django will first look for the first scheme, and
fallback on the second. For "pluggable" apps, you should provide
default, minimal templates with the app (so using scheme 2), and let
the app user override them (using scheme 1) as needed.

For project-specific apps, since you'll have to use project-wide
templates for your base templates and pluggable apps override, scheme
2 doesn't really makes sense IMHO.

My 2 cents...

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: any recipes for 'live' updating a site with model changes

2011-07-27 Thread bruno desthuilliers


On Jul 27, 10:04 am, Uros Trebec  wrote:
> Hi,
>
> for your DB migration problem you should take a look at South[0].

+1

I've just started using it and wonder why I spent so much time doing
things the painfull and error-prone manual way...

> As for your 'under maintenance' step you will have to do that manually

Here are two examples of doing it using apache rewrite rules -
possibly the most common solution, which I also used on most projects
(whether PHP, Django, Zope or whatever) so far:

http://garthhumphreys.com/2011/06/11/painless-django-maintenance-mode-with-fabric/
http://zebert.blogspot.com/2007/12/maintenance-mode-for-apache.html

For a latest Django project I use a in-house fork of django-
maintenance-mode. It still have a few quirks I hope to fix soon so we
can publish 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-users@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: any recipes for 'live' updating a site with model changes

2011-07-27 Thread Uros Trebec
Hi,

for your DB migration problem you should take a look at South[0].
As for your 'under maintenance' step you will have to do that manually
or use some kind of a tool to automate it, as well as other steps for
the upgrade. There are many such tools, Fabric[1] and Chef[2] being
two of the most popular.

[0] http://south.aeracode.org/docs/
[1] http://docs.fabfile.org/en/1.2.0/index.html
[2] http://www.opscode.com/chef/

Good luck,
Uros


On Jul 27, 12:04 am, Gelonida N  wrote:
> Hi,
>
> Let's imagine I have a web server running with a Django application.
>
> Now I want to install an update (with a modified model)
>
> Is there any recommended way to upgrade such a server?
> Are there any tools helping with such upgrades or with creating upgrade
> scripts?
>
> If I had to do it 'manually' this is roughly what I'd do:
> - reconfigure the web server to redirect to an 'under maintenance' site
> - Before unistalling any new code:
>         dump all tables
> - install the new version
> - start an upgrade function, which deletes all tables and repopulates
> them from the dumps with some potential conversions.
>
> Thanks in advance for suggestions or examples of projects which handle
> updates more or less on the fly.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Recommended locations for templates?

2011-07-27 Thread Mike Dewhirst

On 27/07/2011 5:05pm, Rodney Topor wrote:

What is the recommended best practice for locating templates in a
project directory?  In particular, which of the following two
structures is considered better?

1.  project/templates/{app1,app2,...}


This is better if you have a separate team editing templates or it suits 
you to keep all templates in a single root.


2. project/{app1/templates, app2/templates,...}


This is better when you have lotsa apps and you are editing templates 
yourself




If some template is independent of the particular apps in a project,
is it OK to use structure 2 together with a templates directory in the
project directory?

Yes.

You can rearrange the following to suit your needs. If any template 
isn't found using the the first loader, django tries the second one.


TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader'
}

hth

Mike


Thanks,
Rodney



--
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Recommended locations for templates?

2011-07-27 Thread Rodney Topor
What is the recommended best practice for locating templates in a
project directory?  In particular, which of the following two
structures is considered better?

1.  project/templates/{app1,app2,...}

2. project/{app1/templates, app2/templates,...}

If some template is independent of the particular apps in a project,
is it OK to use structure 2 together with a templates directory in the
project directory?

Thanks,
Rodney

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Managing static files - beginner's question

2011-07-27 Thread Rodney Topor
Thanks John.  That seems to work.  Good.  No need to define
TEMPLATE_CONTEXT_PROCESSORS at all, at least initially while I'm still
using the development server.  But it does raise a couple of other
questions:

If I want to use the same style sheet say for templates in all apps in
a project, can I put the style sheet in a /static/ directory in the
project directory?  If the STATICSFILES_DIR contains several such
local directories (project, one in each app), do I have to use
distinct names in each static directory to avoid conflicts?

I've used this PATH = os.path.join(os.path.dirname(__file__) technique
before.  It's incredibly useful.  Why isn't it provided by default
when the settings.py file is created?

Thanks again.
Rodney

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Geographic Data on Django

2011-07-27 Thread kenneth gonsalves
On Wed, 2011-07-27 at 08:18 +1200, Gmail - neonmark wrote:
> Check out this site - with source - uses postgis and does something 
> similar, perhaps, to what you want.
> https://github.com/openplans/fixcity 

geodjango comes with django.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: USE_I18N vs. USE_L10N

2011-07-27 Thread kenneth gonsalves
On Tue, 2011-07-26 at 15:09 +0100, Tom Evans wrote:
> I strongly disagree, i18n and l10n have explicit and well known
> technical meanings, dating from the late 80s. It is right and proper
> to use those names in django, as they are used in every other project
> under the sun. 

+1

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: drag and drop rows on django admin

2011-07-27 Thread Derek
On Jul 26, 11:03 am, Tom Evans  wrote:
> On Tue, Jul 26, 2011 at 6:32 AM, rahul jain  wrote:
> > Tried this snippet but not working
>
> >http://djangosnippets.org/snippets/2306/
>
> > Anyone else tried it, I would like to drag and drop rows on django admin.
>
> > Thanks.
>
> > RJ
>
> 1) Resending the same message with a different subject within such a
> short space of time is considered rude. People are busy, and will help
> you as and when they can, be patient. If you can't be patient, people
> probably won't help you.
>
> 2) "Tried  but it doesn't work" is useless. What did you try? Where
> did you put the snippet? What happened? What did you expect to happen?
> What were the exact error messages (if any)?
>
> 3) The comments for that snippet clearly says that it is for grapelli.
> Grapelli is not django admin, it is a replacement for django admin.
> It's not clear from your post whether you are even using grapelli.

Tom is being very polite here... he could just have pointed you to:
https://code.djangoproject.com/wiki/UsingTheMailingList#Donts:

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.