Re: Research: Translations od documentation

2015-02-26 Thread Russell Keith-Magee
On Thu, Feb 26, 2015 at 9:51 PM, Tomáš Ehrlich wrote: > Hi Tim, > I'm aware that it's possible to translate Django documentation. I also > know that it's translated to french only. > > My question is one step behind: Does it makes sense to translate Django >

Re: Can the new `Prefetch` solve my problem?

2015-02-26 Thread James Schneider
Heh, I just realized that aRkadeFR had replied with a similar idea to use a property. At least I know I'm not too far off on my thinking. :-D -James On Thu, Feb 26, 2015 at 11:02 AM, James Schneider wrote: > Whoops, accidentally sent that last one too early, here's the

Re: Can the new `Prefetch` solve my problem?

2015-02-26 Thread James Schneider
Whoops, accidentally sent that last one too early, here's the continuation: However, that probably doesn't buy you much since you are still doing an extra query for every Desk you pull from your original query. Funny enough, I was googling around for an answer here, and stumbled across this:

Re: Can the new `Prefetch` solve my problem?

2015-02-26 Thread James Schneider
Yep, looks like I misunderstood. So, you want to have something like this pseudo code: desks = Desk.objects.filter() for desk in desks: print desk.favorite_or_nearby_chairs And have favorite_or_nearby_chairs be pre-populated with your Chair queryset mentioned earlier? Due to the nature of

Re: Model field with default value and choices is always reported as changed, even if unchanged

2015-02-26 Thread Carsten Fuchs
Hi, Am 25.02.2015 um 19:11 schrieb Carsten Fuchs: the parent model's History view claims that field "monat" of TestModel has been changed, I got at least a little bit further: This is easily reproducible in a minimal project/app test case with SQLite exactly as described in Django's intro

Re: Using Signals - request_finished

2015-02-26 Thread Rootz
thanks it worked On Thursday, February 26, 2015 at 5:54:02 AM UTC-5, Rodrigo Zayit wrote: > > put on your __init__.py file: > > from signals import request_finished_callback > > I guess it'll work. > > > Atenciosamente, > Rodrigo de Oliveira > > On Wed, Feb 25, 2015 at 6:21 PM, Rootz

Re: Migrations force me to have, forever, any name/reference I use in field validators=, choices=, whatever, valid forever (even if the requirements change).

2015-02-26 Thread Carsten Fuchs
Hi all, Am 26.02.2015 um 13:54 schrieb Tim Graham: Yes, it's expected behavior. Please see the documentation on the topic: https://docs.djangoproject.com/en/stable/topics/migrations/#historical-models I have not yet tried this, but won't squashing migrations as a side effect also get us rid

Re: Migrations force me to have, forever, any name/reference I use in field validators=, choices=, whatever, valid forever (even if the requirements change).

2015-02-26 Thread Carl Meyer
On 02/26/2015 08:41 AM, Carsten Fuchs wrote: > Hi all, > > Am 26.02.2015 um 13:54 schrieb Tim Graham: >> Yes, it's expected behavior. Please see the documentation on the topic: >> https://docs.djangoproject.com/en/stable/topics/migrations/#historical-models >> > > I have not yet tried this, but

Re: Research: Translations od documentation

2015-02-26 Thread Tomáš Ehrlich
Hi Tim, I'm aware that it's possible to translate Django documentation. I also know that it's translated to french only. My question is one step behind: Does it makes sense to translate Django documentation and (more important) keep it updated? Would anyone use it? Is English language the

Re: Best django domain host for signup page

2015-02-26 Thread Rodrigo Zayit
If you know how to setup a server, I recommend DigitalOcean - They have tutorials to help you to setup the server. Cheers, Rodrigo Atenciosamente, Rodrigo de Oliveira On Thu, Feb 26, 2015 at 10:25 AM, Harish Pentapalli

Best django domain host for signup page

2015-02-26 Thread Harish Pentapalli
Hello guys, I am new to django community. I am creating a website in django,html5. I would like to know the best and cheapest domain hosts for my website, with the best support and to django. Thank you -- You received this message because you are subscribed to the Google Groups "Django

Re: Migrations force me to have, forever, any name/reference I use in field validators=, choices=, whatever, valid forever (even if the requirements change).

2015-02-26 Thread Tim Graham
Yes, it's expected behavior. Please see the documentation on the topic: https://docs.djangoproject.com/en/stable/topics/migrations/#historical-models On Wednesday, February 25, 2015 at 3:25:19 PM UTC-5, Luis Masuelli wrote: > > I have an issue with migrations. > > Suppose I declare (in my

Re: MySQLdb Missing Module errors

2015-02-26 Thread Tim Graham
You're using an incorrect package name for MySQLdb. It should be: pip install MySQL-python However, we currently recommend using mysqlclient as it's actively maintained. The officially supported MySQL drivers are documented here:

Re: Chained foreign Key

2015-02-26 Thread Jorge Andrés Vergara Ebratt
Hey, there is a python package you can install in Django called django-smart-selects its documentation is pretty easy to follow On Thu, Feb 26, 2015 at 7:23 AM Arumuga Odhuvar Sekkizhar < vaariyar2...@gmail.com> wrote: > Good Morning, > > Can I get the code or

Re: Research: Translations od documentation

2015-02-26 Thread Tim Graham
Maybe you aren't aware of the existing opportunity to translate Django's documentation? https://docs.djangoproject.com/en/dev/internals/contributing/localizing/#documentation On Thursday, February 26, 2015 at 5:11:21 AM UTC-5, Tomáš Ehrlich wrote: > > Hello, > tonight is regular python/ruby

Getting problem with installation in Django

2015-02-26 Thread abhishek jain
Dear Sir/ Madam, Myself Abhishek want to work on Python framework to develop a web page in python as a fresher, so i have downloaded the python 3.4 and follow the steps from quick install guide as 1- Install Pyhton ( which was verified by click on IDLE (Python 3.4 GUI - 32 bit)) 2- Setup

Django suppotted host

2015-02-26 Thread Harish Pentapalli
Hello guys, I am new to django community. I am creating a website in django,html5. I would like to know the best and cheapest domain hosts for my website, with the best support and to django. Thank you -- You received this message because you are subscribed to the Google Groups "Django

Chained foreign Key

2015-02-26 Thread Arumuga Odhuvar Sekkizhar
Good Morning, Can I get the code or methode in Python Django to how to use Chained foreign Key? That is After I select a State of a Country, in adjacent scroll down box should display *only* the respective district of that state. Not all the district in the country.

Re: Can the new `Prefetch` solve my problem?

2015-02-26 Thread aRkadeFR
got it, so you want to prefetch but not all chairs. I will def follow this thread to see the possibilities of Prefetch :) On 02/26/2015 12:52 PM, Ram Rachum wrote: There may be a big number of chairs, and I don't want all the chairs prefetched. I want to have the database filter them according

Re: Can the new `Prefetch` solve my problem?

2015-02-26 Thread Ram Rachum
There may be a big number of chairs, and I don't want all the chairs prefetched. I want to have the database filter them according to the queryset I specified in a single call, I don't want to filter them in Python or make a new call to filter them. Thanks, Ram. On Thu, Feb 26, 2015 at 1:48 PM,

Re: Can the new `Prefetch` solve my problem?

2015-02-26 Thread aRkadeFR
I may not have completely understand your problem, but why not prefetching all the chairs? and then with the (new) attribute favorite_or_nearby_chairs loading only the favorite or nearby one? like: @property def favorite_or_nearby_chairs(self): for chair in self.chair_set.all():

Re: how to put files in different dirs

2015-02-26 Thread Rodrigo Zayit
Yeah! Or you can write your own method to upload_to. It is easy too. I've made a simple example: https://gist.github.com/rodrigo-zayit/604da297d9c30e7d This example save the pictures in: media/images/products/1/product-slug/randomstring.ext Where "1" is the id of the product's category.

Re: Using Signals - request_finished

2015-02-26 Thread Rodrigo Zayit
put on your __init__.py file: from signals import request_finished_callback I guess it'll work. Atenciosamente, Rodrigo de Oliveira On Wed, Feb 25, 2015 at 6:21 PM, Rootz wrote: > Still not working > > > On Wednesday, February 25, 2015 at 12:55:29 PM UTC-5,

Re: Can the new `Prefetch` solve my problem?

2015-02-26 Thread cool-RR
James, you misunderstood me. There isn't supposed to be a `favorite_or_nearby_chairs` attribute. That's the new attribute I want the prefetching to add to the `Desk` queryset that I need. Also, I don't understand why you'd tell me to add a ` .select_related('nearby_desks')` to my query. Are you

Research: Translations od documentation

2015-02-26 Thread Tomáš Ehrlich
Hello, tonight is regular python/ruby meetup in Brno (Czech republic) about documentation. Last few months I’ve been working on project concerning localization of documents. I would like to know your opinion about localization of documentation: Do you think it would be useful to translate

Re: Edx LDAP Auth setting

2015-02-26 Thread 'Yip Terence' via Django users
Hi M and L, Attached please find the output in /edx/var/log/lms/edx.log Django can't to get the %user value. Config: AUTH_LDAP_USER_SEARCH = LDAPSearch('OU=Users', ldap.SCOPE_SUBTREE,

Re: how to put files in different dirs

2015-02-26 Thread Michael Pöhn
On 26.02.2015 02:30, 163 email wrote: > yes , what i mean is "media files". > there are so many file,may be several thousands ,to be uploaded > from client to server. > if all files in one dir , it'll be slow. > but i don't find any way put files in different dirs just using django. > now i

Re: Gunicorn sock file is missing?

2015-02-26 Thread Erik Cederstrand
> Den 26/02/2015 kl. 07.56 skrev Kaloian : > > Hi Erik, > > No it doesn't start at all, running the gunicorn_start script gives: > > [ERROR] Retrying in 1 second. > [ERROR] Retrying in 1 second. > [ERROR] Retrying in 1 second. > [ERROR] Retrying in 1 second. >