Re: django: Two generic view in same template

2013-04-05 Thread Russell Keith-Magee
Hi Dusan, I think you've posted this to the wrong mailing list. Django-developers is for people who want to contribute to Django itself. If you've got a general usage question, you need to post to Django-users. Yours, Russ Magee %-) On Sat, Apr 6, 2013 at 2:24 AM, Dusan Ristic

django: Two generic view in same template

2013-04-05 Thread Dusan Ristic
I need some advice about generic views and template in Django. I am trying to figure out how it's works. I want implement one page where I would like to display two generic view as CreateView and DeleteView. For example: *models.py* class model(models.Model): name =

Re: model query get_or_create() thread safety and uniqueness -- proposal for transactional commit before final get

2013-04-05 Thread Aymeric Augustin
On 5 avr. 2013, at 18:09, Matteius wrote: > I don't know about the Django 1.6 transaction changes yet, but I am curious > of it will break my managed transaction blocks in existing Django 1.3.x code. You can read about the new transaction management in the dev docs:

Re: model query get_or_create() thread safety and uniqueness -- proposal for transactional commit before final get

2013-04-05 Thread Matteius
Hi Amymeric, That makes sense about the different (and default) MySQL transactional mode. I don't know about the Django 1.6 transaction changes yet, but I am curious of it will break my managed transaction blocks in existing Django 1.3.x code. For example, to handle this get_or_create

Re: ALLOWED_HOSTS : Cannot allow hosts with single label

2013-04-05 Thread Stan
On Friday, April 5, 2013 12:06:17 PM UTC+2, Florian Apolloner wrote: > > Hi, > > it's hard to say anything without knowing your real alias, the tests work > for me as soon as I remove the underscore which is indeed not allowed in > hostnames! > It also has an underscore and I didn't knew it

Re: ALLOWED_HOSTS : Cannot allow hosts with single label

2013-04-05 Thread Florian Apolloner
Hi, it's hard to say anything without knowing your real alias, the tests work for me as soon as I remove the underscore which is indeed not allowed in hostnames! Regards, Florian -- You received this message because you are subscribed to the Google Groups "Django developers" group. To

Re: ALLOWED_HOSTS : Cannot allow hosts with single label

2013-04-05 Thread Thiago Avelino
Hi Stan, read: https://docs.djangoproject.com/en/dev/internals/contributing/bugs-and-features/#reporting-bugs Cheers, Thiago Avelino On Fri, Apr 5, 2013 at 4:56 AM, Stan wrote: > Hi, > > Just migrating an application from 1.4.2 to 1.4.5 and I was wondering why >

ALLOWED_HOSTS : Cannot allow hosts with single label

2013-04-05 Thread Stan
Hi, Just migrating an application from 1.4.2 to 1.4.5 and I was wondering why some of my clients that use my services are now rejected. In fact they do use an alias in their PHP and do some DNS magic (alias -> my_ip) instead of using the real hosts (dev, prod etc). The problem is they use an

Re: model query get_or_create() thread safety and uniqueness -- proposal for transactional commit before final get

2013-04-05 Thread Aymeric Augustin
On 5 avr. 2013, at 05:23, Matteius wrote: > Django's get_or_create does a Get, failing that a create, failing that a > rollback and another get. For some reason in MySQL, and to me conceptually > the code roll back to prior to the commit when the other thread wins in the