Re: Queryset Filters

2014-04-08 Thread Jill Green
Thank you for the response. I feared the answered would be no but I wanted to be sure. Sent from my iPhone On Apr 9, 2014, at 12:27 AM, Anssi Kääriäinen wrote: > No, there is no way to do what you want. All filters are implemented as > filters in the DB, Django doesn't know how to execute th

Re: Queryset Filters

2014-04-08 Thread Anssi Kääriäinen
No, there is no way to do what you want. All filters are implemented as filters in the DB, Django doesn't know how to execute them in Python. There was some effort to implement filters also in Python, but there hasn't been any activity on this recently. The only way to do this currently is to i

Queryset Filters

2014-04-08 Thread Jill Green
I apologize if this question has already been asked and answered. I want to know if it's possible to filter out query sets without doing lazy queries or hitting the database again. Basically I have this query: qs= self.filter(a months worth of data) Now if I evaluate this query by doing this:

Re: Django Dynamic Formsets

2014-04-08 Thread Venkatraman S
Actually, there is nothing more to it. Include the js and create the formset_factory and start using it in the template by iterating over it. In the view, post-POST, again iterate over the formsets. Bulk of the work is done by the js and you dont have to do much in django. There is a minor bug in t

Re: GeometryField.geography = True Syntax Help GIS Model

2014-04-08 Thread si . at . sh
Hope you got to the bottom of this, and yes I thought your original question was pretty direct. If you haven't worked it out already and are still trying to get this working (or if anyone else stumbles across this), then essentially yes you would pass in geography=True, just as you would specif

Mock Django FileSystemStorage location?

2014-04-08 Thread galgal
I try to mock FileUpload in django view (admin view). My model looks like that: class BaseImage(models.Model): # create path for uploaded images _storage_path = os.path.abspath(os.path.join( os.path.dirname(__file__), 'secure_media')) _image_storage = FileSystemStora

Re: recommended fcgi way for django 1.6 on windows? Problems with https

2014-04-08 Thread Russell Keith-Magee
On Wed, Apr 9, 2014 at 1:09 AM, anton wrote: > Hi , > > I use: > - windows 7 64 bit > - python 2.7.6 (32bit) > - apache 2.4.9 (32bit vc9 build from apachelounge) > - django 1.6.2 > - flup for fcgi ( noted as prerequisite in django docs) > > I use flup for running django as fcgi, > unfortunat

Re: Error with GeoDjango serializer and ForeignKey field

2014-04-08 Thread Jorge Arevalo
On Sunday, April 6, 2014 11:13:30 PM UTC+2, Jorge Arevalo wrote: > > (Sorry for the cross posting. I'm not sure about the best place to put my > question. So, I put it in StackOverflow too. And I know that a post that > contains just a link to another page can be considered spam. So, I C&P the >

recommended fcgi way for django 1.6 on windows? Problems with https

2014-04-08 Thread anton
Hi , I use: - windows 7 64 bit - python 2.7.6 (32bit) - apache 2.4.9 (32bit vc9 build from apachelounge) - django 1.6.2 - flup for fcgi ( noted as prerequisite in django docs) I use flup for running django as fcgi, unfortunately I have the problem that my django app runs fine with http but

Re: Django admin for public pages

2014-04-08 Thread Jorge Andrés Vergara Ebratt
Depending on the project, I've done projects entirely made of the admin On Apr 8, 2014 11:53 AM, "Andrew Pashkin" wrote: > I'm thinking about using django.contrib.admin for public facing pages. > On the one hand, seems like it is not recommended: > > It's not intended to be a *public* interface t

Django admin for public pages

2014-04-08 Thread Andrew Pashkin
I'm thinking about using django.contrib.admin for public facing pages. On the one hand, seems like it is not recommended: It’s not intended to be a *public* interface to data, nor is it intended to > allow for sophisticated sorting and searching of your data. As we said > early in this chapter,

Re: Django Dynamic Formsets

2014-04-08 Thread Leandro Alves
Hello Venkatraman, Yes.. I saw this one was well... and I want to try it.. but I'm still learning about Formsets... Would you have any basic simple foo example to share? :) Best, Leandro On Tuesday, April 8, 2014 2:48:15 AM UTC+2, Venkatraman.S. wrote: > > Have you tried the jquery formset

Re: Django Dynamic Formsets

2014-04-08 Thread Leandro Alves
Hello Alejandro!!! Man...I swear, if I had it I would be sooo happy to share... :) I still couldn't get a normal Formset example to work.. Do you have any simple foo example to share? hehehe I'm trying from https://docs.djangoproject.com/en/1.6/topics/forms/formsets/. I also tried to make the

Re: Django Dynamic Formsets

2014-04-08 Thread Alejandro Perez
Hey Leandro, I'm looking for something like that and your topic question is rolling in my head.. Could you please share your solution with the community? :D Thanks !!! :) El lunes, 7 de abril de 2014 15:53:13 UTC-4, Leandro Alves escribió: > > Done. :) > > Thanks!!! > > > On Monday, April 7, 201

Re: 1054 Unknown column content_type_id in field list django 1.7b1

2014-04-08 Thread maxwell
The error occurs on record save in django admin. -- 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 grou

1054 Unknown column content_type_id in field list django 1.7b1

2014-04-08 Thread maxwell
Hi. I'm using django 1.7b1. And I made generic relation in my models: class Transaction(models.Model): ... # Generic foreign key content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() content_object = GenericForeignKey('content_type', 'object_

Re: Inlines in admin

2014-04-08 Thread Emanuel
It solves the problem. Thanks Segunda-feira, 7 de Abril de 2014 22:52:15 UTC+1, Marc Aymerich escreveu: > > On Mon, Apr 7, 2014 at 3:04 PM, Emanuel > > wrote: > > Hi all! > > > > I'm have the following models: > > > > Class A(models.Model): > > pass > > > > > > Class Z(models.Mode

Django 1.6 and Multiprocessing

2014-04-08 Thread Doug Gargin
I've been upgrading some Django apps from Django 1.5 to 1.6, and am using Python 2.7.5. One of the apps is a stand-alone app that uses the Django ORM to access a couple of MySQL databases. When it starts up this app spawns some worker tasks via Python's multiprocessing module. These workers als

Re: Saving forms with ManyToMany relationships

2014-04-08 Thread Jason S
Hi, Thanks very much, I can now save the item.component and item.category many to many fields. However I can't save the user as request.user and it still boils down to not quite understanding how to specify a field value to be saved. I've tried variations of my original code and suggestions onli

Relation in Django REST Framework?

2014-04-08 Thread Shoaib Ijaz
I am using serializers.GeoFeatureModelSerializer to serialize Model. I have a queryset that is creating Left Outer Join. I want to serialize related Model fields Here is my Model class LookupTiming(models.Model): day = models.CharField(max_length=7) time_1 = models.TimeField() tim