Re: Mutli-column composite keys

2010-09-19 Thread Preston Holmes
On Sep 19, 1:50 pm, "J. P. Smyth" wrote: > Someone here wrote: > > "Mutli-column composite keys are not currently supported by Django. > Adding support for multi-column keys (primary or otherwise) is > something that has been long discussed, and there is agreement that it > is a desirable featur

Mutli-column composite keys

2010-09-19 Thread J. P. Smyth
Someone here wrote: "Mutli-column composite keys are not currently supported by Django. Adding support for multi-column keys (primary or otherwise) is something that has been long discussed, and there is agreement that it is a desirable feature" My problem is that I absolutely must have multi

Re: change ordering of objects/rows on change list view on admin

2010-09-19 Thread rahul jain
I mean graphically/directly on the UI itself. On Sun, Sep 19, 2010 at 2:29 PM, Sævar Öfjörð wrote: > > http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.ordering > > On Sep 19, 10:56 pm, rahul jain wrote: > > Hi there !, > > > > How to change ordering of o

Re: change ordering of objects/rows on change list view on admin

2010-09-19 Thread Sævar Öfjörð
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.ordering On Sep 19, 10:56 pm, rahul jain wrote: > Hi there !, > > How to change ordering of objects/rows on change list view on admin ? > > --Rahul -- You received this message because you are subscribed to

change ordering of objects/rows on change list view on admin

2010-09-19 Thread rahul jain
Hi there !, How to change ordering of objects/rows on change list view on admin ? --Rahul -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send

Re: {% url %} template and javascript Get with callback

2010-09-19 Thread Steve Holden
On 9/19/2010 12:52 PM, Ben Kraft wrote: > I'm trying to do a javascript post to an internal api and use a > callback to process the JSON result. I'm referencing the api using, > > {% url %}, > > which returns a path url relative to my domain ( /api/... instead of > http://localhost/api/... for t

Re: Strange query string/doubled value?

2010-09-19 Thread Alexis Roda
En/na Benjamin Buch ha escrit: 1: Pass the ValueError like this: if 'picture' in request.GET: try: pictures.insert(0, pictures.pop(int(request.GET['picture']) -1)) except IndexError: pass except ValueError: pass As a rule of thumb

{% url %} template and javascript Get with callback

2010-09-19 Thread Ben Kraft
I'm trying to do a javascript post to an internal api and use a callback to process the JSON result. I'm referencing the api using, {% url %}, which returns a path url relative to my domain ( /api/... instead of http://localhost/api/... for the dev site). The problem is js does not recognize th

Why does extending a class create so much overhead?

2010-09-19 Thread Nick
I'm still a newbie to django but I think I want to start working on my first real project and I'm kind of confused about extending another application's features without creating overhead. I started to investigate flat pages because I planned to have a few flat pages however I wanted to add a few

Strange query string/doubled value?

2010-09-19 Thread Benjamin Buch
Hi, I'm getting the following value-error on a production site (extract from the error message): Traceback (most recent call last): File "/.../django/core/handlers/base.py", line 100, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/.../work/views.py"

Re: Help :django registration - the account activation gives error messages

2010-09-19 Thread failuch
HI All, I still have a problem with the last step of django-registration v 0.8. After I enter the activation code, the registration indeed sets user account to active and even sent me activation signal. But the activation_complete.html template checks the presence of the account variable but can't

Re: django-registration0.8 args on /activation/complete/

2010-09-19 Thread failuch
Use registration signals http://stackoverflow.com/questions/1910359/creating-a-extended-user-profile http://docs.b-list.org/django-registration/0.8/signals.html#registration.signals.user_registered On Aug 20, 1:17 pm, Alex wrote: > Hi, > Thanks for great package - just stuck now on how to updat

Re: Password Field but clear text in UI

2010-09-19 Thread Karen Tracey
On Sun, Sep 19, 2010 at 8:12 AM, Venkatraman S wrote: > Is it possible to have a Password field, but in the UI let the user type > the clear text as it is and not essentially 'hide' it? Simply do not user the PasswordInput widget for your password field. Karen -- http://tracey.org/kmt/ -- Y

Password Field but clear text in UI

2010-09-19 Thread Venkatraman S
Is it possible to have a Password field, but in the UI let the user type the clear text as it is and not essentially 'hide' it? -V- -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.c

Re: Need help selecting a distinct set of values from a queryset

2010-09-19 Thread Uwe Schuerkamp
Sorry to follow up on my own drivel, but I think I've found a solution in the fine django docs: obs = Observation.objects.filter(observer=o.id,location__location_area__area_country__country_abbrev=country_code).values("bird_id").annotate(Count("bird")) seems to do the job nicely for all combinati

Automatically update images

2010-09-19 Thread Aizen
I'd like to implement a functionality in an app of mine, but I don't know how to go about it. What I want is this: I have a model class that uses imagekit to save its images, and I'd like to have the users being able to update the images easily for the vehicles without having to edit each respectiv

Need help selecting a distinct set of values from a queryset

2010-09-19 Thread Uwe Schuerkamp
Hi folks, some of you may remember I'm working on a site for birders where they can enter and keep track of their observations of various birds. Multiple viewings of a species can be entered at different observation locations, so for the ranking page (which considers only the number of distinct s

Re: Auto Increment Primary_Key

2010-09-19 Thread Rakesh Sinha
Thanks. I added the fields and wrote a Db migraton script to populate the primary key and update all foreign key references. Everything works fine except the tests. By just removing "id" from model class application as well as tests work but performance is very slow. I will have a look at south as

Re: Auto Increment Primary_Key

2010-09-19 Thread Rakesh Sinha
Thanks for replying. By rework you mean i need to change the schema. I have production data in the existing table where i have to add the primary key. With approach 1, we have been able to get everything working except tests as it doesnt create the sequence and triggers. Approach 2 works fine but t

Re: Auto Increment Primary_Key

2010-09-19 Thread Shawn Milochik
Did you do any database migrations, or just add the new field? Just adding the new field to the model doesn't undo the groundwork laid by your original syncdb, which has set up the other field as the primary key in the database itself. Although your Django model is the way you want it, your da

Re: Auto Increment Primary_Key

2010-09-19 Thread Mike Dewhirst
This might not work for you but I would consider South. You might be able to rework the schema and migrate the data. On 19/09/2010, at 4:40 PM, "hellowrakesh...@gmail.com" wrote: > Hi, > I am in a trouble and need help. We have an application developed in > Django and has a custom defined

Auto Increment Primary_Key

2010-09-19 Thread hellowrakesh...@gmail.com
Hi, I am in a trouble and need help. We have an application developed in Django and has a custom defined (Char Type) primary key. Due to few new features, we need to change the primary key to a AutoGenerated Key. We manually added a column named id, a sequence and a trigger (same naming convention