Re: Ignoring empty forms in a formset

2012-04-25 Thread Martin Tiršel
Thanks, form.has_changed() seems to be the way. But I don't understand the empty_permitted attribute, it is usable only with ModelForm? I am using the formset only for mass form processing not for inserting/updating models. Martin On Wednesday, April 25, 2012 2:35:20 PM UTC+2, Tom Evans wrote:

Re: Soap web services with Soaplib in Django

2012-04-25 Thread Mario Gudelj
It's probably a problem with what you're passing to the template or what you have in your template. You should supply some actual code from your view and your template. -m On 25 April 2012 15:01, Meenakshi Ithape wrote: > I used the Soap web services with Soaplib in Django, for that i take > th

Re: Confused about GeoDjango and PostGIS

2012-04-25 Thread vishy
thanks. This is what I have done. On Apr 26, 9:57 am, Jani Tiainen wrote: > 25.4.2012 19:17, vishy kirjoitti: > > > Hi, > > > I need to do spatial queries like find places within 5 miles of a > > location given in latitude and longitude. So, I am thinking of > > exploring PostGIS and GeoDjango. I

Re: Confused about GeoDjango and PostGIS

2012-04-25 Thread Jani Tiainen
25.4.2012 19:17, vishy kirjoitti: Hi, I need to do spatial queries like find places within 5 miles of a location given in latitude and longitude. So, I am thinking of exploring PostGIS and GeoDjango. I have installed both. Now, I already have a database which has a table for places with latitude

Problem with accessing Audio files from server.

2012-04-25 Thread atul khairnar
Hi, I am writing Internet Radio App using Django. When i load the stream page in the browser (i.e. play_page.html) server does not stream the audio file at all. I have following settings in my project. MEDIA_ROOT = '/home/atul/Atul/django_radio/' MEDIA_URL = '' Audio File's Model: class Audio(mo

Re: deploying django - including third party apps

2012-04-25 Thread Daniel Sokolowski
If you have shell access you could do a virtualenv/pip combo install. From: luke lukes Sent: Wednesday, April 25, 2012 11:14 AM To: django-users@googlegroups.com Subject: deploying django - including third party apps hi everyone. i'm developing a simple CRUD django app and my idea is to host i

Re: Django deployment practices -- do people use setup.py?

2012-04-25 Thread Daniel Sokolowski
Thank you for taking the time to explain; I've reached a similar 'readme' approach here but was hoping for a better solution. -Original Message- From: Andrew Cutler Sent: Tuesday, April 24, 2012 8:21 AM To: django-users@googlegroups.com Subject: Re: Django deployment practices -- do pe

(List objects(Recently Added - Most Common

2012-04-25 Thread mohamed wagdy
please i want a help I have some object stored in a databaseand i want to make List of this object (Recently Added object - and Most Common) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gro

Unable to get result using distance query

2012-04-25 Thread vishy
Hi, I am using PointField to store longitude and latitude with SRID 4326. All my places are in USA. Now, given a reference point, I do lat = "41.881944" lng = "-87.627778" ref_pnt = fromstr("POINT(%s %s)" % (lng, lat)) distance_from_point = {'m':'50'} r_gis

Re: generic view 'create_object' inssue

2012-04-25 Thread Carlos Aboim
No answers yet? Can anyone help me?! Thank you Quarta-feira, 25 de Abril de 2012 8:08:24 UTC-3, Carlos Aboim escreveu: > > I fellows > I am getting a strange behavior from a simple generic view > > The problem is that I can not pass the data in the form to introducing a > new object in the datab

Re: Where are the women?

2012-04-25 Thread Katie Cunningham
If you want a quick code of conduct, check out the one that PyCon US used this year. They borrowed it from another advocacy group, I believe, so it's becoming pretty standard. Katie On Wed, Apr 25, 2012 at 4:07 PM, Jonas Obrist wrote: > Hi everyone, > > I'm one of the organizers of DjangoCon Eur

Re: Where are the women?

2012-04-25 Thread Jonas Obrist
Hi everyone, I'm one of the organizers of DjangoCon Europe 2012 and as Daniele pointed out, it made me sad when seeing the amount of women that submitted a talk. While we have no statistics of a gender breakdown for the tickets sold so far, just glancing at the list of names makes me sad. I wo

Re: Where are the women?

2012-04-25 Thread Katie Cunningham
If you want to get more women to a conference, a few things have been successful on this side of the pond: - Scholarships set aside for female attendees - Specifically invite potential female speakers to talk, or at least submit a talk - Reach out to women-based tech groups, and make sure they

Re: Confused about GeoDjango and PostGIS

2012-04-25 Thread vishy
Yes, I just ran the 2 scripts in my current database - spatial_ref_sys.sql and postgis.sql. Seems to work. I am able to define a geometry column in my current existing table. On Apr 25, 11:03 pm, George Silva wrote: > Yes it can, as long PostGIS is installed. > > > > > > > > > > On Wed, Apr 25,

Re: Confused about GeoDjango and PostGIS

2012-04-25 Thread vishy
thanks On Apr 25, 11:07 pm, Jeff Heard wrote: > It can. I just usually consider it easier to create a new one > On Apr 25, 2012 1:38 PM, "vishy" wrote: > > > > > > > > > So, the existing database cannot be used as a postgis db? > > > On Apr 25, 9:21 pm, Jeff Heard wrote: > > > Create a new spat

Re: Confused about GeoDjango and PostGIS

2012-04-25 Thread vishy
Thanks. On Apr 25, 11:07 pm, Jeff Heard wrote: > It can. I just usually consider it easier to create a new one > On Apr 25, 2012 1:38 PM, "vishy" wrote: > > > > > > > > > So, the existing database cannot be used as a postgis db? > > > On Apr 25, 9:21 pm, Jeff Heard wrote: > > > Create a new spa

Re: Confused about GeoDjango and PostGIS

2012-04-25 Thread Jeff Heard
It can. I just usually consider it easier to create a new one On Apr 25, 2012 1:38 PM, "vishy" wrote: > So, the existing database cannot be used as a postgis db? > > On Apr 25, 9:21 pm, Jeff Heard wrote: > > Create a new spatial database and import the data. That's by far your > > easiest optio

Re: Confused about GeoDjango and PostGIS

2012-04-25 Thread George Silva
Yes it can, as long PostGIS is installed. On Wed, Apr 25, 2012 at 2:37 PM, vishy wrote: > So, the existing database cannot be used as a postgis db? > > On Apr 25, 9:21 pm, Jeff Heard wrote: > > Create a new spatial database and import the data. That's by far your > > easiest option. You'll ne

Re: Canadian Django Meetings?

2012-04-25 Thread CLIFFORD ILKAY
On 04/25/2012 10:25 AM, Daniel Sokolowski wrote: Does anyone know of any upcoming Django meet ups in Canada? Has there been any? Would you come? I am living in Ontario, so Toronto being the venue would seem like a logical choice. There are monthly Django Toronto meetings. To be informed of upc

Re: Overriding an admin widget?

2012-04-25 Thread Roy Smith
Oh, I see what's going on. I marked the field as readonly. Apparently the widget only gets created if the field is editable (I guess that makes sense). On Apr 25, 2012, at 1:28 PM, Roy Smith wrote: > Ooops, forgot to mention, I'm using django 1.4. > > > On Apr 25, 2012, at 12:51 PM, Roy Sm

Re: Confused about GeoDjango and PostGIS

2012-04-25 Thread vishy
So, the existing database cannot be used as a postgis db? On Apr 25, 9:21 pm, Jeff Heard wrote: > Create a new spatial database and import the data.  That's by far your > easiest option.  You'll need to create a POINT column (look at the PostGIS > doc on how to add spatial columns) and then add r

Re: Overriding an admin widget?

2012-04-25 Thread Roy Smith
Ooops, forgot to mention, I'm using django 1.4. On Apr 25, 2012, at 12:51 PM, Roy Smith wrote: > I'm trying to get the admin to give me a thumbnail for an ImageForm. > Following the suggestion at http://djangosnippets.org/snippets/1580/, I've > got the following code: > > from django import

Re: Canadian Django Meetings?

2012-04-25 Thread Kurtis
If I have enough notice to get a Passport and it landed on a weekend where I was free -- I wouldn't mind taking that trip. I've always wanted to see Toronto anyways :P On Wednesday, April 25, 2012 10:25:53 AM UTC-4, Daniel Sokolowski wrote: > > Does anyone know of any upcoming Django meet ups in

Overriding an admin widget?

2012-04-25 Thread Roy Smith
I'm trying to get the admin to give me a thumbnail for an ImageForm. Following the suggestion at http://djangosnippets.org/snippets/1580/, I've got the following code: from django import forms from django.contrib import admin from django.db import models from django.utils.safestring import mark

Re: why django document does not specify how to use non-global middleware

2012-04-25 Thread Marcin Tustin
Just because you used to do it in Struts, it does not mean that it is the best, or even a good, way to do it in django. On Wed, Apr 25, 2012 at 17:26, DanYun Liu wrote: > I am new to django, before django I used struts2 to build web application. > It is common that we need to apply some middlewa

why django document does not specify how to use non-global middleware

2012-04-25 Thread DanYun Liu
I am new to django, before django I used struts2 to build web application. It is common that we need to apply some middleware to a part of views and others not. I didn't find any userful information on the django site, so I searched the stackoverflow and got the right answer. http://stackoverflow.

Re: Just sharing my Skype username

2012-04-25 Thread Daniel Sokolowski
On related note: for quick and dirty screen sharing there is join.me; works amazingly with an IRC chat. From: Kurtis Sent: Wednesday, April 25, 2012 11:56 AM To: django-users@googlegroups.com Subject: Just sharing my Skype username Hey guys/girls, I want to share my Skype username in case

Re: Confused about GeoDjango and PostGIS

2012-04-25 Thread Jeff Heard
Create a new spatial database and import the data. That's by far your easiest option. You'll need to create a POINT column (look at the PostGIS doc on how to add spatial columns) and then add rows either using the ORM or with a spatial query including something like this as part of the insert: G

Confused about GeoDjango and PostGIS

2012-04-25 Thread vishy
Hi, I need to do spatial queries like find places within 5 miles of a location given in latitude and longitude. So, I am thinking of exploring PostGIS and GeoDjango. I have installed both. Now, I already have a database which has a table for places with latitude and longitude. Can I enable this db

Re: Just sharing my Skype username

2012-04-25 Thread Kurtis
No problem at all :) On Wednesday, April 25, 2012 12:04:30 PM UTC-4, Ahmad wrote: > > Thanks Kurtis for sharing your account I have added you to my contacts :) > > On Wed, Apr 25, 2012 at 5:56 PM, Kurtis wrote: > >> Hey guys/girls, >> >> I want to share my Skype username in case anyone needs help

Re: Where are the women?

2012-04-25 Thread Daniele Procida
On Wed, Apr 25, 2012, Hanne Moa wrote: >On 24 April 2012 16:14, Daniele Procida wrote: >> I was looking at again with >excited anticipation, and reading through the talk summaries. >> There are *two* women out of the 24 or so speakers listed, and only >one i

Re: Just sharing my Skype username

2012-04-25 Thread Ahmad Abd Arrahman
Thanks Kurtis for sharing your account I have added you to my contacts :) On Wed, Apr 25, 2012 at 5:56 PM, Kurtis wrote: > Hey guys/girls, > > I want to share my Skype username in case anyone needs help in real-time. > I am typically working when I'm online, so* please don't burden me with > beg

Just sharing my Skype username

2012-04-25 Thread Kurtis
Hey guys/girls, I want to share my Skype username in case anyone needs help in real-time. I am typically working when I'm online, so* please don't burden me with beginner-level questions* -- the Django Docs, Google, Stackoverflow, IRC and this mailing list are a great place for that. Also, if a

Re: form doing a query for each element of foreign key in select

2012-04-25 Thread Tom Evans
On Wed, Apr 25, 2012 at 4:43 PM, Lee Hinde wrote: > > On Apr 25, 2012, at 2:16 AM, Tom Evans wrote: > >> On Wed, Apr 25, 2012 at 5:58 AM, Lee Hinde wrote: >>> I have a table with four or five foreign keys. Using the default form >>> widgets, a foreign key is represented by a single value select.

Re: Canadian Django Meetings?

2012-04-25 Thread Gab
On Wed, Apr 25, 2012 at 10:25 AM, Daniel Sokolowski < daniel.sokolow...@klinsight.com> wrote: > Does anyone know of any upcoming Django meet ups in Canada? Has there > been any? Would you come? > > I am living in Ontario, so Toronto being the venue would seem like a > logical choice. > > Thoughts?

Re: form doing a query for each element of foreign key in select

2012-04-25 Thread Lee Hinde
On Apr 25, 2012, at 2:16 AM, Tom Evans wrote: > On Wed, Apr 25, 2012 at 5:58 AM, Lee Hinde wrote: >> I have a table with four or five foreign keys. Using the default form >> widgets, a foreign key is represented by a single value select. >> >> I noticed, with debug_tool_bar, that a query is bei

Re: Django CRUD questions

2012-04-25 Thread Kurtis Mullins
Check out ModelForms: https://docs.djangoproject.com/en/dev/topics/forms/modelforms/#django.forms.ModelForm Note: I'm not sure which version of Django you are using but you may want to choose a different document-version respectively. Also, check out CreateView, UpdateView, and DeleteView for your

Re: Django CRUD questions

2012-04-25 Thread drewyan
Any useful resources or examples you can suggest would very much appreciated as well. On Wednesday, April 25, 2012 10:18:45 AM UTC-5, drewyan wrote: > > Hi all, > > I'm relatively new at designing web apps and I've been using Django to > set-up a CRUD type application. I recently figured out how

Re: Django questions.

2012-04-25 Thread Kurtis Mullins
Man, I think if you don't know the answers to these questions -- you may not want to apply for that job. Go research and play with NoSQL. Read the documentation on Template Tags -- and realistically, the point of the Templating engine in general. If you don't know about the Data Layer then read the

Re: Slow page in admin

2012-04-25 Thread akaariai
On Apr 25, 4:22 pm, Jonas Ghyllebert wrote: > Hi, > > Thanks for the quick reply. > > when we test the application local, it works like a charm. > But when we deployed it on Google App engine using Cloud SQL, the > application works now and then and this particular page is much slower than > the o

Django CRUD questions

2012-04-25 Thread drewyan
Hi all, I'm relatively new at designing web apps and I've been using Django to set-up a CRUD type application. I recently figured out how perform POST requests from the forms I set-up. I noticed that the data can be changed/updated through the Django admin site or through the Django API using

Re: Django questions.

2012-04-25 Thread Shawn Milochik
On 04/25/2012 11:04 AM, Marcin Tustin wrote: Apologies, these are job application questions: https://www.odesk.com/jobs/Programmers-Python-Django-and-client-side-programming-MySQL_~~c7db577bb2246e77?tot=5000&pos=4&_redirected

deploying django - including third party apps

2012-04-25 Thread luke lukes
hi everyone. i'm developing a simple CRUD django app and my idea is to host it on a free web hosting site that supports django (e.g. alwaysdata.com or heliohost.org). I havent tried locally to deploy it on a web server such as Apache, i've alway used the development server by manage.py runserver

Re: Django questions.

2012-04-25 Thread Marcin Tustin
Apologies, these are job application questions: https://www.odesk.com/jobs/Programmers-Python-Django-and-client-side-programming-MySQL_~~c7db577bb2246e77?tot=5000&pos=4&_redirected On Wed, Apr 25, 2012 at 15:37, Marcin Tustin wrote: > These are plainly your homework questions. I suggest that you

Re: Django questions.

2012-04-25 Thread Marcin Tustin
These are plainly your homework questions. I suggest that you undertake your own research. On Wed, Apr 25, 2012 at 15:20, jacob wrote: > Hello everybody. > > I am a newbie in django development and need your help for some > questions. > > 1. Under what circumstances would you avoid using the Dja

Django questions.

2012-04-25 Thread jacob
Hello everybody. I am a newbie in django development and need your help for some questions. 1. Under what circumstances would you avoid using the Django platform? 2. How do you describe the data layer in Django? Where would you place additional functionality to the domain objects? And where would

Canadian Django Meetings?

2012-04-25 Thread Daniel Sokolowski
Does anyone know of any upcoming Django meet ups in Canada? Has there been any? Would you come? I am living in Ontario, so Toronto being the venue would seem like a logical choice. Thoughts? -- You received this message because you are subscribed to the Google Groups "Django users" group. To p

Re: buildout development vs. deployment

2012-04-25 Thread Reik Schatz
Hi Tom, great answer, thanks. A lot of other sites mentioned Fabric. I'll definitely check it out. /Reik On Wed, Apr 25, 2012 at 1:22 PM, Tom Evans wrote: > On Wed, Apr 25, 2012 at 11:21 AM, Reikje wrote: > > Hi, I am looking into buildout to deploy a django webapp and all it's > > dependenci

Re: Slow page in admin

2012-04-25 Thread Jonas Ghyllebert
Hi, Thanks for the quick reply. when we test the application local, it works like a charm. But when we deployed it on Google App engine using Cloud SQL, the application works now and then and this particular page is much slower than the others. When there's an error, Django shows the 500 - inte

Re: Slow page in admin

2012-04-25 Thread akaariai
On Apr 25, 3:35 pm, Jonas Ghyllebert wrote: > I'm new to Django and I would like to apologize if it's been asked before. > > I have two models *Region *and *Zip*. In the admin system, Zip is an inline > model in Region > > Whenever i want to add a Region it shows directly 25 listboxes with zips. >

Slow page in admin

2012-04-25 Thread Jonas Ghyllebert
I'm new to Django and I would like to apologize if it's been asked before. I have two models *Region *and *Zip*. In the admin system, Zip is an inline model in Region Whenever i want to add a Region it shows directly 25 listboxes with zips. This however takes a long time to load the page and re

Re: Ignoring empty forms in a formset

2012-04-25 Thread Tom Evans
Hmm. Internally, model formsets do this differently - they are aware of which forms are extra forms, and which forms are existing forms. New forms will have form.empty_permitted=True, unmodified forms will return True from form.has_changed(). This should be enough to skip over blank new forms. Ch

Soap web services with Soaplib in Django

2012-04-25 Thread Meenakshi Ithape
I used the Soap web services with Soaplib in Django, for that i take the help from below link http://djangosnippets.org/snippets/979/ When i run this code through command prompt it runs properly, but when i run it on browser it shows nothing, Can anybody please help me, what should i done wrong?

Re: Ignoring empty forms in a formset

2012-04-25 Thread Martin Tiršel
I am using class based views and my code is: class PayOrdersView(AdminFormSetView): form_class = PayOrderForm template_name = 'internal/orders/pay_orders_form.html' active_item = 'order_pay_orders' context_formset_name = 'pay_orders_formset' extra = 2 def formset_valid(sel

Re: buildout development vs. deployment

2012-04-25 Thread Tom Evans
On Wed, Apr 25, 2012 at 11:21 AM, Reikje wrote: > Hi, I am looking into buildout to deploy a django webapp and all it's > dependencies. I find it quite useful even during development because it > forces you to keep track of your dependencies. A question regarding some > best practices. Lets say I

generic view 'create_object' inssue

2012-04-25 Thread Carlos Aboim
I fellows I am getting a strange behavior from a simple generic view The problem is that I can not pass the data in the form to introducing a new object in the database. Then the urls.py file > http://dpaste.com/hold/732643/ The html form is this > http://dpaste.com/hold/732646/ when

Re: Where are the women?

2012-04-25 Thread Hanne Moa
On 24 April 2012 16:14, Daniele Procida wrote: > I was looking at again with excited > anticipation, and reading through the talk summaries. > > - and > then I had a closer look at the name

buildout development vs. deployment

2012-04-25 Thread Reikje
Hi, I am looking into buildout to deploy a django webapp and all it's dependencies. I find it quite useful even during development because it forces you to keep track of your dependencies. A question regarding some best practices. Lets say I have buildout.cfg and setup.py in my project root and

Re: form doing a query for each element of foreign key in select

2012-04-25 Thread Tom Evans
On Wed, Apr 25, 2012 at 5:58 AM, Lee Hinde wrote: > I have a table with four or five foreign keys. Using the default form > widgets, a foreign key is represented by a single value select. > > I noticed, with debug_tool_bar, that a query is being made for each > element of each foreign key select o

Re: Ignoring empty forms in a formset

2012-04-25 Thread Tom Evans
On Sun, Apr 22, 2012 at 5:44 PM, Martin Tiršel wrote: > Hello, > > I have a formset and some JavaScript to add more forms into this formset. In > a view, I iterate through the formset saving (not a ModelForm just Form with > save method) each form: > > for form in formset: >     form.save() > > Bu