Re: Django ORM generate inefficient SQL

2014-08-28 Thread Alex Lebedev
I have created a ticket - https://code.djangoproject.com/ticket/23383 Should I try to proceed my investigations and create a patch? пятница, 29 августа 2014 г., 11:50:01 UTC+6 пользователь Simon Charette написал: > > I think you should create a single issue >

Re: Django ORM generate inefficient SQL

2014-08-28 Thread Simon Charette
I think you should create a single issue pointing to the fact that only selected columns (either through values() or only()) should be grouped by, regardless of the backend. I suggest you include your initial post body in the report. Thanks! Le vendr

Re: Django admin can't display user detail view: 500 error

2014-08-28 Thread Babatunde Akinyanmi
Hi Amarshall? We need more information. Give us the traceback On 29 Aug 2014 01:22, "amarshall" wrote: > I've deployed my django application using Nginx and uWSGI. > > In development I can login to my django admin-> users-> [username] and it > shows the users information. However in development o

Re: Djamgo wizard problem

2014-08-28 Thread Babatunde Akinyanmi
Hi Mihai, Ee can't help you without enough information. You need to at least give the traceback of the error On 28 Aug 2014 21:28, "Mihai Andrei Gabara" wrote: > Hi! who can help me with "wizard" problem. i have 7 steps. every step have > the "next" and "back" buttons. the back button works up to

Re: Django ORM generate inefficient SQL

2014-08-28 Thread Alex Lebedev
Yes, I guess, in this case it should be able to group only by `auth_group`.`id` for each database backend. Should I create ticket(s) about the issue on MySQL and/or the issue of columns in "group by" statement, or would you like to do it yourself? четверг, 28 августа 2014 г., 20:36:19 UTC+6 поль

Re: Widget for simple (not input) text

2014-08-28 Thread Yarick Antonov
Yes. Many thanks :) On Friday, August 29, 2014 6:14:10 AM UTC+4, Matt Gushee wrote: > > What do you want to do with this 'widget'? From your description, it > sounds like you could use a normal paragraph element -- which might > look something like this in a Django template: > >{{ some_text

Re: Widget for simple (not input) text

2014-08-28 Thread Matt Gushee
What do you want to do with this 'widget'? From your description, it sounds like you could use a normal paragraph element -- which might look something like this in a Django template: {{ some_text }} Does that not meet your needs? -- Matt Gushee On Thu, Aug 28, 2014 at 5:51 PM, Yarick Antono

Re: How can I create models which only required during tests in Django 1.7c1?

2014-08-28 Thread Yo-Yo Ma
Ugh... same problem here. It seems you can't really create a model in setUp anymore. I'll post a reply, if I find anything. On Wednesday, July 16, 2014 10:17:56 AM UTC-4, Alisue Lambda wrote: > > Hi all. > > Well today I tried Django 1.7c1 with my program and found that the > previous testing s

Django admin can't display user detail view: 500 error

2014-08-28 Thread amarshall
I've deployed my django application using Nginx and uWSGI. In development I can login to my django admin-> users-> [username] and it shows the users information. However in development once I click on a user I get a "server 500" error. I have the same code for both deployment and development.

Widget for simple (not input) text

2014-08-28 Thread Yarick Antonov
Does Django (or HTML itself) contain any sort of TextField, what represent not the form for text input but simple, static not editable text? I mean something like this: http://i.imgur.com/Nv0XN0J.png Is it possible to have a widget for that data, or i can use simple string to do this? -- You r

Djamgo wizard problem

2014-08-28 Thread Mihai Andrei Gabara
Hi! who can help me with "wizard" problem. i have 7 steps. every step have the "next" and "back" buttons. the back button works up to the 4 step, in the next steps, it return me an error. when i finish the steps, it starts a new wizard but i need to change page. -- You received this message be

Re: Constants values and best practices

2014-08-28 Thread Andrew Pinkham
Hi Julian, I think there are a couple options. The easiest would be to store the constants as Python. I would recommend using the choices field, as detailed by the documentation: https://docs.djangoproject.com/en/1.7/ref/models/fields/#choices If you must store your constants as part of the da

Re: Constants values and best practices

2014-08-28 Thread yati sagade
Hi Julian Python 3 introduces enums, which should make this easy: https://docs.python.org/3/library/enum.html In my Python 2 projects, I define a class to club together related constants. Something like, class PurchaseState(object): EGGS = 'eggs' FOO = 'foo' BAR = 'bar

Constants values and best practices

2014-08-28 Thread Julo Waks
Good day! How are you? I have the following situation: In more than one django project I come across the situation where I need to define a model that has a State. So what I usually do is: # Pseudo code here def State (models.Model): name = models.CharField () def Purchase (models.Model):

Re: New user - struggling with database design

2014-08-28 Thread Jason G
Ok - here is where I am stuck now. Any thoughts? If I try to render {{ vessel.CurrentBrew }} in a view, I get something like this: and this errors out: {% for Brew in vessel.CurrentBrew.all %}X{{ Brew.ActualName }}{% endfor %} (1146, "Table 'dbLunawireBrewing.brewlog_vessel_CurrentBrew' does

Re: Django 1.7 not working with mysql-connector-python 1.1.6 & Python 3.3 ?

2014-08-28 Thread cico
And I wish I could upvote your solution to heaven! Thanks for sharing that, why is it not documented anywhere? Sounds like a killing feature.. Cheers! mccc On Saturday, May 10, 2014 1:00:12 AM UTC+2, Richard Esplin wrote: > > Thanks for sharing what you did. I wish PostgreSQL was an option for m

Unhandled Exception on first time deployment (works on home PC)

2014-08-28 Thread Tarik Hamilton
Hi, I'm new to Django. I been having a lot of fun developing it on my home computer, but I wanted to access it everywhere finally. I followed* this *guide from my host, involving virtuale

Re: Django ORM generate inefficient SQL

2014-08-28 Thread Simon Charette
The issue on MySQL should be tracked in another ticket I guess -- you're right that it should be able to GROUP only by `auth_group`.`id`. Le jeudi 28 août 2014 07:28:18 UTC-4, Alex Lebedev a écrit : > > Thanks for the answer! Yes, but this problem occurs regardless of > database backend (I teste

Re: HttpResponse methods difference

2014-08-28 Thread Collin Anderson
It's the same as python file objects write sends data to the response flush makes sure the data you wrote is actually getting sent out, not just buffered for alter tell tells you how much data you've read or written. is where are you in the "file" https://docs.python.org/3/library/io.html -- Yo

Re: HttpResponse methods difference

2014-08-28 Thread marc
As you see in: https://github.com/django/django/blob/master/django/http/response.py#L370 all three methods have different usecases. .write(string) <- adds content .tell() <- returns the length of content .flush() <- just passing, does nothing (since at lease v1.5) Cheers Am Donnerstag, 28. Aug

Re: New user - struggling with database design

2014-08-28 Thread Jason G
Hi Gerald - thanks for the quick reply! Turns out it was just an issue with quotes...not sure I am doing it right just yet, but at least I've passed the error. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group

Re: New user - struggling with database design

2014-08-28 Thread Gerald Klein
their order if I am understanding you right does not effect this, the last part is just a join between the tables, you don't have to create another table On Thu, Aug 28, 2014 at 8:46 AM, Jason G wrote: > Hi all, > > I am building an app to track my home brewing. > > I have two tables, one for

New user - struggling with database design

2014-08-28 Thread Jason G
Hi all, I am building an app to track my home brewing. I have two tables, one for vessels, and another for brews. I want the Brew table to have a pick-list, relation to Vessels so I can say what vessel the brew is in. I also want to render a table that shows all Vessels and what Brew is in ea

Re: Django ORM generate inefficient SQL

2014-08-28 Thread Alex Lebedev
Thanks for the answer! Yes, but this problem occurs regardless of database backend (I tested it on PostgreSQL and MySQL) среда, 27 августа 2014 г., 12:37:00 UTC+6 пользователь Simon Charette написал: > > This is already tracked in #19259 > . > > Le j

Re: django manage.py commands not displaying

2014-08-28 Thread RSS
Thank you, Very much! Yes, that's an ancient manage.py -- 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

Re: response to ajax (jquery) with variables

2014-08-28 Thread Andreas Kuhne
Hi Antonio, import simplejson as json return HttpResponse( json.dumps({ 'array': example }), content_type="application/json" ) That would do the trick. This is returned as JSON. Remember to set the content_type, otherwise the client can get confused. Regards, Andréas 2014-