Re: New way to use URL dispatchers?

2014-10-24 Thread Aliane Abdelouahab
Ah, thank you! i thought that it was introduced long ago (something like 1.6) and is in test period, so it will be officially deprecated after 1.8, and the 1.7 would be the 'hybrid' version that will allow both of them. so now, i can stick with the old one, thank you :) Le samedi 25 octobre

Re: New way to use URL dispatchers?

2014-10-24 Thread Russell Keith-Magee
Hi Aliane, You're getting tripped up by the version number of your documentation, combined with an understanding of the way we handle deprecations. When the documentation says "Deprecated since version 1.8", it means "Version 1.8 introduced this change". Versions 1.7 and earlier *doesn't*

"autocommit cannot be used inside a transaction" error: trying to use a custom form with a CreateView

2014-10-24 Thread Michael
Hi, I get an "autocommit cannot be used inside a transaction" error at the ins.save() line in the model form. I am trying to use a custom form for a CreateView. What does this error exactly mean? Why can't I save the instance? Thanks class MyModelForm(forms.ModelForm): class

New way to use URL dispatchers?

2014-10-24 Thread Aliane Abdelouahab
Hi, in the docs, i only see the 'list' way, so why Django 1.7 dont generate the url by the new way and still use the old way? because i found: Deprecated since version 1.8: urlpatterns should be a plain list of django.conf.urls.url()

Re: migrate does not store default values in the database

2014-10-24 Thread Carl Meyer
On 10/24/2014 05:32 PM, Carl Meyer wrote: > Hi Peter, > > On 10/24/2014 05:26 PM, Peter Coles wrote: >> Should I copy this question over to "django-dev" (do they accept posts >> from non-internal devs)? I've seen people complain in the past about >> reopening or commenting on closed tickets. > >

Re: migrate does not store default values in the database

2014-10-24 Thread Carl Meyer
Hi Peter, On 10/24/2014 05:26 PM, Peter Coles wrote: > Should I copy this question over to "django-dev" (do they accept posts > from non-internal devs)? I've seen people complain in the past about > reopening or commenting on closed tickets. Django core dev here. Yes, the django-developers

Re: migrate does not store default values in the database

2014-10-24 Thread Peter Coles
Should I copy this question over to "django-dev" (do they accept posts from non-internal devs)? I've seen people complain in the past about reopening or commenting on closed tickets. On Friday, October 24, 2014 7:05:41 PM UTC-4, Jon Dufresne wrote: > > On Fri, Oct 24, 2014 at 3:24 PM, Peter

Re: migrate does not store default values in the database

2014-10-24 Thread Jon Dufresne
On Fri, Oct 24, 2014 at 3:24 PM, Peter Coles wrote: > I'm trying out the migrations in Django 1.7 and I was surprised when my > migrations did not set default values in the database. Can someone share the > motivation for this functionality? (more details below) > > This

migrate does not store default values in the database

2014-10-24 Thread Peter Coles
I'm trying out the migrations in Django 1.7 and I was surprised when my migrations did not set default values in the database. Can someone share the motivation for this functionality? (more details below) This was surprising given the documentation I read: 1. the release notes

Problem with Pillow image resize and save

2014-10-24 Thread Daniel Grace
Hi, I am trying to put together some code for resizing an image and storing the resized image on the database, but I am running into some problems having struggled to find some decent examples online. Here is what I have come up with so far, in the model: class UserProfile(models.Model):

Re: Merge two Databases into one

2014-10-24 Thread Larry Martell
On Fri, Oct 24, 2014 at 1:17 PM, Ram Ganesh wrote: > Hi all, > > I want to append my datas from old_db to new_db > they have exactly the same structure, > > I'm trying to Write a Script using Django Manually selecting a database > -Read data from old_db and Write it into

Merge two Databases into one

2014-10-24 Thread Ram Ganesh
Hi all, I want to append my datas from old_db to new_db they have exactly the same structure, I'm trying to Write a Script using Django Manually selecting a database -Read data from old_db and Write it into new_db -But not sure its work fine with maintaining foreign key relationships. what

Re: Slow SQL query

2014-10-24 Thread Larry Martell
On Fri, Oct 24, 2014 at 12:30 PM, Collin Anderson wrote: > Hi All, > > I've been trying to figure out the proper way to index my data or construct > my query so I can query orders in a reasonable amount of time. Is there a > better way to index/query my data? > > orders =

Re: [AGAIN] Inserting further fields of a foreignkey object into change list view

2014-10-24 Thread Collin Anderson
Hello Vittorio, They don't seem bigger to me, but you should be able to change that by including custom CSS. Collin -- 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

Slow SQL query

2014-10-24 Thread Collin Anderson
Hi All, I've been trying to figure out the proper way to index my data or construct my query so I can query orders in a reasonable amount of time. Is there a better way to index/query my data? orders = Order.objects.exclude(status=Order.CART).filter(Q(user=user) | Q(

Re: how to save in inline form total sum

2014-10-24 Thread carlos
Ok, i try en modelA create the total, thank for idea Cheers On Fri, Oct 24, 2014 at 6:34 AM, Collin Anderson wrote: > Hello, > > >> ModelB in inline >> choice men women >> option1 6 4 >> option2 1

Re: View didn't return an HttpResponse object

2014-10-24 Thread Dariusz Mysior
I have in views.py message="Password was changed" return logout_then_login(request, login_url='/login/',extra_context={ 'message': message}) And I want display this message in login.html below {% extends "base_site_dom.html" %} {% block title %} - logowanie {% endblock %} {% block content %}

Re: Is there a way to supress blank lines in the HTML?

2014-10-24 Thread Jon Dufresne
Try adding "import re" to the top to import the Python re module. On Fri, Oct 24, 2014 at 8:35 AM, Daniel Grace wrote: > Thanks people for the info. I was looking for a way to beautify the code, > rather than for performance /

Re: Is there a way to supress blank lines in the HTML?

2014-10-24 Thread Daniel Grace
Thanks people for the info. I was looking for a way to beautify the code, rather than for performance / compression. In particular I came across this when I implemented a template tag which, under certain circumstances returns an empty string. This works well but causes blank lines in the

Re: Is there a way to supress blank lines in the HTML?

2014-10-24 Thread Jon Dufresne
> If you need this for some performance reasons like html compression, you are > doing it wrong. > Instead you could use server-side GZIP compression when serving html which > will do the job much more efficiently. Just a heads up. Compressing dynamic responses over HTTPS is considered insecure

Re: how to save in inline form total sum

2014-10-24 Thread Collin Anderson
Hello, > ModelB in inline > choice men women > option1 6 4 > option2 1 3 > option3 2 1 > > i need save in other field total this sum for example men = 9 and women > total is

Re: Importing models in app config module

2014-10-24 Thread Collin Anderson
Hi Torsten, I believe that's ok. Collin -- 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 email to django-users+unsubscr...@googlegroups.com. To post to this group, send