Re: Geographic Data on Django

2011-07-27 Thread kenneth gonsalves
On Wed, 2011-07-27 at 08:18 +1200, Gmail - neonmark wrote: > Check out this site - with source - uses postgis and does something > similar, perhaps, to what you want. > https://github.com/openplans/fixcity geodjango comes with django. -- You received this message because you are subscribed to

Re: Managing static files - beginner's question

2011-07-27 Thread Rodney Topor
Thanks John. That seems to work. Good. No need to define TEMPLATE_CONTEXT_PROCESSORS at all, at least initially while I'm still using the development server. But it does raise a couple of other questions: If I want to use the same style sheet say for templates in all apps in a project, can I p

Recommended locations for templates?

2011-07-27 Thread Rodney Topor
What is the recommended best practice for locating templates in a project directory? In particular, which of the following two structures is considered better? 1. project/templates/{app1,app2,...} 2. project/{app1/templates, app2/templates,...} If some template is independent of the particular

Re: Recommended locations for templates?

2011-07-27 Thread Mike Dewhirst
On 27/07/2011 5:05pm, Rodney Topor wrote: What is the recommended best practice for locating templates in a project directory? In particular, which of the following two structures is considered better? 1. project/templates/{app1,app2,...} This is better if you have a separate team editing te

Re: any recipes for 'live' updating a site with model changes

2011-07-27 Thread Uros Trebec
Hi, for your DB migration problem you should take a look at South[0]. As for your 'under maintenance' step you will have to do that manually or use some kind of a tool to automate it, as well as other steps for the upgrade. There are many such tools, Fabric[1] and Chef[2] being two of the most pop

Re: any recipes for 'live' updating a site with model changes

2011-07-27 Thread bruno desthuilliers
On Jul 27, 10:04 am, Uros Trebec wrote: > Hi, > > for your DB migration problem you should take a look at South[0]. +1 I've just started using it and wonder why I spent so much time doing things the painfull and error-prone manual way... > As for your 'under maintenance' step you will have to

Re: Recommended locations for templates?

2011-07-27 Thread bruno desthuilliers
On Jul 27, 9:05 am, Rodney Topor wrote: > What is the recommended best practice for locating templates in a > project directory? Depends... >  In particular, which of the following two > structures is considered better? > > 1.  project/templates/{app1,app2,...} > > 2. project/{app1/templates, ap

Re: any recipes for 'live' updating a site with model changes

2011-07-27 Thread Gelonida N
Thanks a lot everybody. Will look into south.. On 07/27/2011 10:04 AM, Uros Trebec wrote: > Hi, > > for your DB migration problem you should take a look at South[0]. > As for your 'under maintenance' step you will have to do that manually > or use some kind of a tool to automate it, as well as

Re: any recipes for 'live' updating a site with model changes

2011-07-27 Thread Gelonida N
On 07/27/2011 11:26 AM, bruno desthuilliers wrote: > > > On Jul 27, 10:04 am, Uros Trebec wrote: >> Hi, >> >> for your DB migration problem you should take a look at South[0]. > > +1 > > I've just started using it and wonder why I spent so much time doing > things the painfull and error-prone

How to make jQuery sliders based on model IntegerField?

2011-07-27 Thread Gagiel
Hello all, I am wondering how can I display a jQuery slider for users to choose from 1-100 when I make a models.IntegerField? Is there a plug-in or some snippets I can refer to? -- This email is brought to you -- by Gagiel Z at Gmail. -- You received this message because you are subscribed to

how do I update only specific fields in model

2011-07-27 Thread Josh
I want to update only specific fields in a model and keep the old values in other fields. I've been working on this for a few days but I run out of possible solutions.As far as I can see from the documentation and internet there isn't an easy solution to do this. I'm new at Django, so I might

Re: how do I update only specific fields in model

2011-07-27 Thread Daniel Roseman
On Wednesday, July 27, 2011 12:53:52 PM UTC+1, Josh wrote: > > I want to update only specific fields in a model and keep the old values in > other fields. I've been working on this for a few days but I run out of > possible solutions.As far as I can see from the documentation and internet > the

Re: how do I update only specific fields in model

2011-07-27 Thread Josh
You already gave the answer. I just tried your solution and it worked. I was trying a wrong approach and was making it much more complex than it really is. My approach caused existing values to be overwritten by Null-values and only inserting the new values. Thanks for answering a newbie quest

Re: Optimization of a Large QuerySet iteration

2011-07-27 Thread Roman Klesel
2011/7/26 nixlists : > Is it a best practice to take a bunch of code out to the stored > procedures as much as possible, or the opposite is true with Django? I don't want to comment on whether it's best practice or not ... I was thinking about efficiency: If the data processing gets too slow doi

Re: How to make jQuery sliders based on model IntegerField?

2011-07-27 Thread urukay
Hi, basically, it's not a Django issue. You can display standard integer field in your form, but in your template you will use JQuery Slider to alter it so the field will be displayed as a slider. And when user moves the slider, you will write down the value into the integer field. Radovan http:/

Re: snippet

2011-07-27 Thread Stuart MacKay
Rahul, Not everything posted to djangosnippets is working code. The ratings and number of comments is your best guide as to the quality of the solution. If you use your favourite search engine for "django admin drag and drop" you have lots of alternatives - snippet 2306 does not show up until

Include Django form in PHP based website

2011-07-27 Thread brian
I'm learning Django and was hoping to get some advice on an application I want to try. I'm trying to create a Django form that is included in a php based website. I'm working on a php based website that has a 'contact us' form that was created with http://wufoo.com/. In the php website there is

Re: Include Django form in PHP based website

2011-07-27 Thread Andre Terra
Why? On Wed, Jul 27, 2011 at 10:34 AM, brian wrote: > I'm learning Django and was hoping to get some advice on an > application I want to try. > > I'm trying to create a Django form that is included in a php based > website. > > I'm working on a php based website that has a 'contact us' form that

Re: how do I update only specific fields in model

2011-07-27 Thread bruno desthuilliers
On Jul 27, 1:53 pm, Josh wrote: Daniel already answered, just a couple observations: > 1. the id of the record is not known. Given your question ("update (...) fields in a model", which I assume mean : "update (...) fields in a model _instance_"), you obviously know the pk either directly (pass

Re: Optimization of a Large QuerySet iteration

2011-07-27 Thread bruno desthuilliers
On Jul 26, 4:59 pm, nixlists wrote: > On Tue, Jul 26, 2011 at 7:42 AM, Roman Klesel > wrote: > > ... > > > The main question you may ask yourself may be whether or not you > > really want to have django do the whole calculation thing. Many > > database engines have very powerful aggregation capab

Re: Include Django form in PHP based website

2011-07-27 Thread brian
I'm doing this to add features like better submitted data management and writing the data to another program. Brian -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscri

Re: Include Django form in PHP based website

2011-07-27 Thread Brian Bouterse
Where I work, we mix django into PHP sites often since most of our customers already have PHP web sites, but want to pay us to extend them with new functionality. I do this by setting up a django project on another apache/uwsgi/nginx virtual host which routes specific parts of the application to D

Re: how do I update only specific fields in model

2011-07-27 Thread Josh
Thanks for the replys. The more I learn about Django, the more I start to apreciate it. I still have a lot to learn, but compared with Drupal I already feel more comfortable about Django because there is much more control. This is my second Django week, but sometimes I seem to get stuck at sim

Re: object value distinct for ForeignKey

2011-07-27 Thread Ian Clelland
On Mon, Jul 25, 2011 at 11:29 AM, Alfredo Alessandrini wrote: > Hi, > > I've a model testDB with a foreignkey "country" related to another > database. > > I need to retrieve the unique value of country.common_name. > > With this > > country_list = testDB.objects.values('country').distinct > > I c

Re: object value distinct for ForeignKey

2011-07-27 Thread Ian Clelland
On Wed, Jul 27, 2011 at 9:29 AM, Ian Clelland wrote: > > > On Mon, Jul 25, 2011 at 11:29 AM, Alfredo Alessandrini < > alfreal...@gmail.com> wrote: > >> Hi, >> >> I've a model testDB with a foreignkey "country" related to another >> database. >> >> I need to retrieve the unique value of country.co

serving static files

2011-07-27 Thread Shawn Milochik
I want to allow certain users to download files uploaded by other users. I found django-protected-files[1] and django-private-files[2], both of which look like they do the job. The latter is more recent and is on Read The Docs, so it's probably the way to go. Before I start reviewing the code

Re: Built-in template tags and filters

2011-07-27 Thread Uffe
Many thanks, great help! I'm developing with google apps, and I had no idea that they django was that much out of date. Greetings, Uffe. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups

Re: Django + PyPy = ?

2011-07-27 Thread Dmitry Pisklov
That's basically the information I'm trying to find. PyPy docs says nothing about that, and they doesn't mention any setup process at all - all that I need to do according to their site is "unpack and run - and don't touch anything!"... And it simply works for simple python stuff... But not for

Admin - change ForeignKey display text

2011-07-27 Thread galgal
How can I change the display text in select while selecting a field which is as ForeignKey? I need to display not only the name of FK, but also name of it's parent. Anybody can give a clue? -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Doesn't render templates any longer

2011-07-27 Thread Max Bachl
Hi all! I've encountered a strange bug today. I want to return an HTTP response with this code: def main(request): t = loader.get_template("main/start.html") return HttpResponse(t) However, the only result I get is <'> and the rest of the html file has gone. The same error occu

Extending Reusable App Models

2011-07-27 Thread Django Grappelli
Hi All, I'm working with a reusable Django application which defines a model that I'd like to extend. I've read through the documentation on model inheritancebut haven't found what I'm looking for. I'd like to be able to s

Doesn't render templates any longer

2011-07-27 Thread Max Bachl
Hi all! I've encountered a strange bug today. I want to return an HTTP response with this code: def main(request): t = loader.get_template("main/start.html") return HttpResponse(t) However, the only result I get is <'> and the rest of the html file has gone. The same error occu

Doesn't render templates any longer

2011-07-27 Thread Max Bachl
Hi all! I've encountered a strange bug today. I want to return an HTTP response with this code: def main(request): t = loader.get_template("main/start.html") return HttpResponse(t) However, the only result I get is <'> and the rest of the html file has gone. The same error occu

Re: Improperly Configured Remote User Middleware

2011-07-27 Thread John
Just some further info for anyone who may come across this in the future, this happened to me a few more times. After the third time it happened I was hitting my head against the wall and finally noticed a simple error in a signal handler I was importing into models.py. After fixing that bug the co

Re: Extending the ManyToMany relation, maybe a bad idea

2011-07-27 Thread Joshua Russo
I am using the through keyword. I'm just trying to figure out the most efficient way to create a form field and widget to update the data. What I'm struggling with is how a ManyToMany field with an intermediate table containing extra fields fits into the ModelForm saving. I'm just not sure wher

Re: Extending the ManyToMany relation, maybe a bad idea

2011-07-27 Thread Joshua Russo
Someone tell me where I'm going wrong conceptually here, I feel like I'm making this too hard. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/T5m8OIVMyusJ

Re: USE_I18N vs. USE_L10N

2011-07-27 Thread Lachlan Musicman
On Wed, Jul 27, 2011 at 16:53, kenneth gonsalves wrote: > On Tue, 2011-07-26 at 15:09 +0100, Tom Evans wrote: >> I strongly disagree, i18n and l10n have explicit and well known >> technical meanings, dating from the late 80s. It is right and proper >> to use those names in django, as they are used

Re: Extending the ManyToMany relation, maybe a bad idea

2011-07-27 Thread Shawn Milochik
You can override the ModelForm. Add the fields to the ModelForm. Set the initial values by overriding __init__, and save them by overriding the save() method. Should be pretty simple. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Doesn't render templates any longer

2011-07-27 Thread Doug Ballance
def main(request): context=Context()     this_is_the_template_object = loader.get_template("main/ start.html") this_is_the_template_rendered=this_is_the_template_object.render(context)     return HttpResponse(this_is_the_template_rendered) What you are feeding HttpResponse is the object

Re: Extending the ManyToMany relation, maybe a bad idea

2011-07-27 Thread Joshua Russo
My problem is that I have multiple values and I need to associate the list of extra fields with selected relations for the ManyToMany relation. Below is a simplified version of what my setup is. I want to create an edit form for Organization, but I'm struggling with how best to save (and re-re

Re: Improperly Configured Remote User Middleware

2011-07-27 Thread Karen Tracey
Did you try searching this list for RemoteUserMiddleware before banging your head too hard against the wall on this one? I know this problem of RemoteUserMiddleware masking other errors has come up at least twice on this list in the past. It has also hopefully been fixed, see https://code.djangopro

Re: Improperly Configured Remote User Middleware

2011-07-27 Thread John
I did check here before posting, clearly not well enough, but I was mostly googling for django improperly configured remote user and similar stuff. Thanks for the link to the bug. It looks like it was fixed, but not committed. On Jul 27, 7:56 pm, Karen Tracey wrote: > Did you try searching this l

Re: Extending the ManyToMany relation, maybe a bad idea

2011-07-27 Thread Joshua Russo
Ok, so I can retrieve this extra data in the __init__ of the model form, but it seems like I will need to skip all of the cleaning and automatic validation of the form; because the data, to be displayed with the associated checkbox will have to be included with the items field in the Organizati

Re: Improperly Configured Remote User Middleware

2011-07-27 Thread Karen Tracey
On Wed, Jul 27, 2011 at 9:50 PM, John wrote: > I did check here before posting, clearly not well enough, but I was > mostly googling for django improperly configured remote user and > similar stuff. Thanks for the link to the bug. It looks like it was > fixed, but not committed. > > It was not di

Re: Django open source cashflow management app

2011-07-27 Thread zodman
the app is back :) On Tue, Jul 26, 2011 at 6:48 AM, Derek wrote: > On Jul 25, 8:51 pm, zodman wrote: >> http://misgastos.zodman.com.mxits on spanish sorry. >> >> https://github.com/zodman/misgastos/ >> >> On Sun, Jul 24, 2011 at 8:44 AM, mf wrote: >> > Does anyone knows about an open source cas

Problem With Templatetags

2011-07-27 Thread Showket Bhat
Hi All, I am using templatetags to create one tag.. I created the folder templatetags and created 2 files in it.. __init__.py which is empty and another temp_tags.py.. where i put one method temp_tags.py from django import template register = template.Library() register.filte

Re: Problem With Templatetags

2011-07-27 Thread nicolas HERSOG
Hi, I m new in django too but i ll try to help you. In your tem_tag.py can you add : @register.simle_tag just before you def you tag, just like this : @register.simle_tag def my_tag(): return blablabla On Thu, Jul 28, 2011 at 8:17 AM, Showket Bhat wrote: > Hi All, > > I am using templatet

Re: Problem With Templatetags

2011-07-27 Thread nicolas HERSOG
mistype, it's @register.simple_tag and not @register.simle_tag of course ... sorry On Thu, Jul 28, 2011 at 8:39 AM, nicolas HERSOG wrote: > Hi, I m new in django too but i ll try to help you. > > In your tem_tag.py can you add : @register.simle_tag just before you def > you tag, just like this

Re: Problem With Templatetags

2011-07-27 Thread Showket Bhat
Thanks For ur Assistance.. But That Dosen't Helped me... Need Some Other Solution.. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to