Re: Migrating older 1.4 project to 1.9

2016-03-30 Thread Kristofer Pettijohn
I have also upgraded a few apps this way, from 1.5 to 1.9. Keep your eyes on the release notes for each version for big changes. It also helps to have good test cases written so that you can run them upon each upgrade. From: "Gergely Polonkai" To: "Django users"

Re: POSSIBLE BUG: using Coalesce() with __in=[]

2016-03-30 Thread Ryan Prater
Thank you Simon! I'll file a bug and include a link here, including your points. Your source documentation was incredibly helpful. On Wednesday, March 30, 2016 at 12:03:10 PM UTC-5, Simon Charette wrote: > > Hi Ryan, > > I think this should be considered a bug. > > From what I understand the

Why doesn't {{ form.field.value }} return cleaned data?

2016-03-30 Thread Ryan Prater
Say I have a TypedMultipleChoiceField and I'm building a custom select multiple widget in my template. If I want to check a box based on an initial value (ie. default checked options), OR check a box based on form data that has been returned (ie. error state), I would do this: HOWEVER,

Model share question

2016-03-30 Thread moon jo
I'm new to django and have a question regarding model design. For practice, I'm working on a web app - a simplified version of imdb that handles movie and music. I've created 2 apps; Movies and Music. With main models in both having the usual fields (title, release date, rating, artist/actor).

Re: Generate different querysets depending of the website language

2016-03-30 Thread Mathieu Poussin
Hello. I have been doing some tests, here are my results : The Django default language (fallback) is in Spanish in all case No IgnoreHTTPLanguageMiddleware Browser having English has priority URL specified language in Spanish /es/ -> Translated blocks in Spanish -> Language related DB queries

Re: Django Admin actions with select optgroup

2016-03-30 Thread Bernardo Garcia
When you talk about of optgroup you mean the choicegroup? In affirmative case, this can be that you looking .. https://docs.djangoproject.com/en/1.9/ref/models/fields/#choices Also is possible that MultipleSelectField can be useful for you? In affirmative case, this thread can be useful...

Django Admin actions with select optgroup

2016-03-30 Thread Edgar Gabaldi
Hi everybody, Someone know if is possible or have a way to change the default action select by a select with optgroup? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an

Re: Migrating older 1.4 project to 1.9

2016-03-30 Thread Gergely Polonkai
I have already suggested this approach to someone with a similar problem: upgrade one version at a time. I’m sure it is possible to find older versions; 1. upgrade to the next minor release (1.4 => 1.5, etc), 2. do the necessary adjustments, 3. goto 1. It may be a lot of work, but at the end of

Re: POSSIBLE BUG: using Coalesce() with __in=[]

2016-03-30 Thread Simon Charette
Hi Ryan, I think this should be considered a bug. >From what I understand the ORM simply doesn't perform any query in this case as the `pk__in` lookup cannot match any `OrderItem` and result in an `EmptyResultSet` exception[1]. This exception is caught in the `Query.get_aggregation()` method

POSSIBLE BUG: using Coalesce() with __in=[]

2016-03-30 Thread Ryan Prater
It seems that using an empty list when using the `__in=` filter prevents an Aggregate Coalesce from working properly. See below: # Test with matched Queryset. Sum will return 50 OrderItem.objects.filter(pk__in=[1]).aggregate(test=Coalesce(Sum('quantity'), Value(0))) >>> {'test': 50} # Test

Re: hanging django/postgres idle connections

2016-03-30 Thread Ryan Bagwell
I'm also seeing this in two of our apps. Has anybody figured out a solution? Running Django 1.7.11. On Monday, November 23, 2015 at 4:36:23 PM UTC-5, Jon Sandness wrote: > > I'm seeing this same issue in OS X 10.11.1 - interestingly, the hang only > occurs when I run migrations through Jenkins.

Deploy static assets to heroku from local machine - can't open file 'manage.py': [Errno 2] No such file or directory

2016-03-30 Thread Bernardo Garcia
I am trying deploy my assets files to heroku and I get this output in my command line interface: (nrb_dev) ➜ neurorehabilitation_projects git:(master) ✗ heroku run python manage.py collectstaticRunning python manage.py collectstatic on neurorehabilitation up, run.5168 python: can't open

Re: Migrating older 1.4 project to 1.9

2016-03-30 Thread Fred Stluka
Roger, Yeah, I too have a large project that I'll hopefully be migrating from 1.4 to 1.9 soon. It's about 3.5 years worth of work, over 200,000 lines of code in about 1000 Python source file and Django template files. So any tips you come up with will be invaluable. Please post anything you

Re: Digest for django-users@googlegroups.com - 9 updates in 6 topics

2016-03-30 Thread Volkan Erdoğan
thanks 2016-03-30 16:06 GMT+03:00 : > django-users@googlegroups.com > > Google > Groups > >

Re: Migrating older 1.4 project to 1.9

2016-03-30 Thread bobhaugen
We feel your pain. If you do it, and write down how it goes, we would be grateful. https://github.com/valnet/valuenetwork On Tuesday, March 29, 2016 at 4:19:59 PM UTC-5, Roger Dunn wrote: > > I've inherited a moderately large project written 2 years ago using Django > 1.4, and wondering if it