onetoone field and memory issue

2013-11-26 Thread John Carlo
Hello everybody, I have a memory issue and I'm looking for some suggestions. I have the following model class Entity(models.Model): item= models.OneToOneField(Bigdata, blank = True,null=True) Bigdata is a table with 150.000+ items In the admin interface, when I try to add a new Entity

Re: onetoone field and memory issue

2013-11-26 Thread James Bennett
https://docs.djangoproject.com/en/1.6/ref/contrib/admin/#django.contrib.admin.ModelAdmin.raw_id_fields -- 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-use

Re: onetoone field and memory issue

2013-11-26 Thread John Carlo
great, now it works like a sharm Thank you very very much! 2013/11/26 James Bennett > > https://docs.djangoproject.com/en/1.6/ref/contrib/admin/#django.contrib.admin.ModelAdmin.raw_id_fields > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Dja

Other side of a ManyToManyField through self field

2013-11-26 Thread Jean-Baptiste Pressac
Hello, I have a Person model with a ManyToManyField with itself through a Relation model to declare relations like Paul is Julie's uncle : class Relations(models.Model): id_person= models.ForeignKey('Person', related_name='relation_id_person') id_relation = models.ForeignKey('Person',

Re: How do I display the human readable name of a choice?

2013-11-26 Thread Aniket Zamwar
This function gets for a specific information stored in the instance of the model. If I want to display as a drop down in the template all the human readable names in the choices can I do that ? Also, Before storing it to DB, how to convert it back to human redable to short version mentioned in

Re: Form cleaned_data

2013-11-26 Thread Daniel Roseman
On Monday, 25 November 2013 21:42:51 UTC, Timothy W. Cook wrote: > > On Mon, Nov 25, 2013 at 8:22 AM, Daniel Roseman > > > wrote: > > On Sunday, 24 November 2013 18:46:21 UTC, Timothy W. Cook wrote: > >> > >> On Sun, Nov 24, 2013 at 4:38 PM, Daniel Roseman > > >> wrote: > > > > > No, `f` i

lambda callable in foreignkey default

2013-11-26 Thread Philippe Raoult
I ran into a strange issue today when trying to use a lambda function for the default value of a ForeignKey. my original code was this, and I expected it would look for RestaurantType instances whenever I would try to create a Restaurant: type_of_restaurant = models.ForeignKey(RestaurantType, d

MultiValueDictKeyError editing inlineformset

2013-11-26 Thread Ariel Calzada
hi i'm getting MultiValueDictKeyError while editing InlineFormset any idea? Regards, -- Ariel Calzada Homepage: http://www.000paradox000.com Blog: http://blog.000paradox000.com "If I had asked people what they wanted, they would have said faster horses." -- Henry Ford -- You received this m

Re: MultiValueDictKeyError editing inlineformset

2013-11-26 Thread Daniel Roseman
On Tuesday, 26 November 2013 12:43:56 UTC, Ariel Calzada wrote: > > hi i'm getting MultiValueDictKeyError while editing InlineFormset any idea? > > Regards, > > -- > Ariel Calzada > Homepage: > http://www.000paradox000.com

Re: Render User Selected Communities (as Checkboxes) in Multiple Choice Form

2013-11-26 Thread JJ Zolper
I know it's sort of a need by case basis but has anyone tried to do this before? Has anyone tried to render the choices a user has selected previously by rendering checked check boxes on a multiple choice field? Thanks, JJ -- You received this message because you are subscribed to the Google

Re: Filtering by month doesn't work

2013-11-26 Thread Vojtěch Tranta
I am no using that condition, I am absolutely sure that I have november dates in my DB (i am using MySQL). I tried everything in terms of using datetime to compare db month with, no luck so far Dne úterý, 26. listopadu 2013 3:54:09 UTC+1 Начаров Михаил napsal(a): > > Hi Tranta. > In my projec

Re: Filtering by month doesn't work

2013-11-26 Thread Vojtěch Tranta
from django.db import models from django.contrib.auth.models import User from student import Student from eventtype import EventType from django import forms import datetime class Event(models.Model): user = models.ForeignKey(User) student = models.ForeignKey(Student) place = models.CharField(max_

Re: Call for Sponsors: Django Weekend Cardiff

2013-11-26 Thread Daniele Procida
On Sat, Nov 23, 2013, Daniele Procida wrote: >[With apologies to those who will inevitably see this message in more >than one group or list.] > >In 2014 Cardiff will hold the first-ever Django conference in the UK. Tickets are now on sale! There's information about

Re: Filtering by month doesn't work

2013-11-26 Thread Leonardo Giordani
Are you sure that filtering using a string is the same as filtering using an int? I think that Django doesn't automatically convert it. So the condition events = Event.objects.filter(end__month='11') should be events = Event.objects.filter(end__month=11) Indeed documentation

DjangoProject.com community feeds

2013-11-26 Thread Silvio
Hi there, I used the form here: https://www.djangoproject.com/community/add/blogs/ to add my blog feed a while ago. But it was never added. Does anyone still check those feed submissions? The actual blog: Name: Silvio on Django Feed URL: https://www.silviogutierrez.com/blog/tags/django/feed/ H

How to add timezone support in Django (1.5) admin

2013-11-26 Thread Carlos Villavicencio
I am using django 1.5 with pytz. Currently all the datetimes stored in the database are in UTC. The frontend application is timezone aware (users worldwide), that means that I store the user timezone in his profile. Administration is using the default timezone as in settings.py (UTC). What ab

Re: DjangoProject.com community feeds

2013-11-26 Thread tim
Your feed was approved on Oct. 14. I'm not sure why your recent entries haven't appeared. On Tuesday, November 26, 2013 4:14:48 PM UTC-5, Silvio wrote: > > Hi there, > > I used the form here: https://www.djangoproject.com/community/add/blogs/to > add my blog feed a while ago. But it was never ad

ManyToMany and "set" function

2013-11-26 Thread Vanni Brutto
Hi, i have a model with a m2m: class PiattoPersonalizzato(models.Model): descrizione = models.CharField(max_length=80) categoria = models.ForeignKey(Categoria) numero = models.IntegerField(default=1) ingredienti = models.ManyToManyField(Ingrediente,default=None,null=True,blank=