Re: moving to django 1.2.1

2010-07-29 Thread shofty
wasnt there some good stuff on djangoadvent? http://djangoadvent.com/1.2/django-12-and-csrf/ Matt On Jul 28, 2:44 pm, knight wrote: > Does anybody knows a good post or blog about the changes including > csrf? > > On Jul 28, 4:33 pm, Maksymus007 wrote: > > > On Wed, Jul 28, 2010 at 3:29 PM, Mas

Re: moving to django 1.2.1

2010-07-29 Thread Russell Keith-Magee
On Wed, Jul 28, 2010 at 9:29 PM, Massimiliano Ravelli wrote: > On Jul 28, 3:13 pm, knight wrote: >> What are the minimal changes that I need to make in order to work with >> 1.2.1? > > Did you have a look at > http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges > ? As it says at the

Re: moving to django 1.2.1

2010-07-29 Thread Russell Keith-Magee
On Wed, Jul 28, 2010 at 9:33 PM, Maksymus007 wrote: > On Wed, Jul 28, 2010 at 3:29 PM, Massimiliano Ravelli > wrote: >> On Jul 28, 3:13 pm, knight wrote: >>> What are the minimal changes that I need to make in order to work with >>> 1.2.1? >> >> Did you have a look at >> http://code.djangoproje

Re: moving to django 1.2.1

2010-07-29 Thread knight
Thank you all for the links and advises. It really helps me. Regards, Alex A. On Jul 29, 10:32 am, Russell Keith-Magee wrote: > On Wed, Jul 28, 2010 at 9:29 PM, Massimiliano Ravelli > > wrote: > > On Jul 28, 3:13 pm, knight wrote: > >> What are the minimal changes that I need to make in order

Re: ModelChoiceField Question

2010-07-29 Thread Daniel Roseman
On Jul 29, 5:23 am, Carlos Daniel Ruvalcaba Valenzuela wrote: > Hello list, > > I was wondering which would be the best way to handle this situation > with ModelChoiceFields: > > I have a form with a ModelChoiceField, the options presented in this > field may change at the view depending on the us

Re: Python/Django hosting

2010-07-29 Thread kostia
Currently looking at. So many choices! I'm a person with not enough money. What do you think about Canadian https://servqc.net/ one? It is very cheap from the list. I live in Ukraine. For me it is better to pick up European or US host? Kostia -- You received this message because you are subscr

Re: HTTP POST sent from app to Django Server returns 403 Forbidden

2010-07-29 Thread Benedict Verheyen
On 28/07/2010 18:22, Kieran Farr wrote: > Thanks, David -- you're right on, now I just return an HttpResponse > with result code 404. > > Benedict, could you post the view for /management/statistics/top/user/ > yearly/ that is causing the 403? > > Kieran > Yes, here it is. Depending on wether

Re: Best way to present N items in table row for list

2010-07-29 Thread Roald de Vries
Hi Wadim, On Jul 27, 2010, at 6:51 PM, Wadim wrote: Hello. I have a list that i want to present in a table. Each row should have 5 items. For now i create the function that returns me new grouped list, that i use later in a template. def groupListByRow(list): cnt=0 rows=[]

Re: Calculate distance between 2 latitude/longitude Point

2010-07-29 Thread Alexandre González
I going to try it now, but the unique results that I obtain in google searching [1] gd2gcc is this thread :) [1] http://www.google.com/search?hl=en&safe=off&q=gd2gcc&aq=f&aqi=&aql=&oq=&gs_rfai= Did you make some mis

Issue with loading fixtures in tests with multi database in Django 1.2

2010-07-29 Thread Xavier Ordoquy
Hi there. I'm currently working on a project where I use a legacy database with a django one. I've setup the multi database support and it seems to work pretty well. However, I'm getting an issue with testing. I need a fixture to load data to both the legacy and Django's databases. In order to m

dumpdata/loaddata through ssh

2010-07-29 Thread mack the finger
$ ./manage.py dumpdata some_app | ssh prgmr "cat | /srv/proj/manage.py loaddata" I'm trying to send fixtures over to my production server. Is there a one liner that can do this without creating an intermediate file? The above code doesn't seem to work. I get "No fixtures found" returned. -- You

Re: Calculate distance between 2 latitude/longitude Point

2010-07-29 Thread Alexandre González
I've solved translating a JavaScript function to python: from math import * RADIUS = 6371 #Earth's mean raadius in km def distance(origin, destiny): (latitude1, longitude1) = (origin[0], origin[1]) (latitude2, longitude2) = (destiny[0], destiny[1]) dLat = radians(latitude1 - latitud

values with distinct not working as expected

2010-07-29 Thread tuxcanfly
I have this: class Visitor(models.Model): user = models.ForeignKey(User) .. .. I'm trying to get the distinct usernames, so I did this: Visitor.objects.values("user__username").distinct() But this stil gives me duplicate usernames. Of course I could use a flat values_lis

Re: values with distinct not working as expected

2010-07-29 Thread Subhranath Chunder
If you don't want to uniquify yourself, then why not simply do: User.objects.values('username').order_by('username').distinct() or, going the way that were already heading, it would be: Visitor.objects.values('user__username').order_by('user__username'').distinct() Thanks, Subhranath Chunder. O

I live in Ukraine. For me it is better to pick up European or US host?

2010-07-29 Thread KLRUMPF
Kostya, maybe have a look at www.ovh.fr, the language tabs are at the bottom. Lots of *ux flavours, too. Been using them for years, cheap and competent, but I don't know how much they know about django. Karl L. Rumpf Málaga klru...@gmail.com El 29/07/2010 13:05, django-users+nore...@googleg

Re: I live in Ukraine. For me it is better to pick up European or US host?

2010-07-29 Thread Alexander Jeliuc
intoVPS.com eu and us location On Thu, Jul 29, 2010 at 2:51 PM, KLRUMPF wrote: > Kostya, maybe have a look at www.ovh.fr, the language tabs are at the > bottom. Lots of *ux flavours, too. > > Been using them for years, cheap and competent, but I don't know how much > they know about django. > >

through/unique_together usage

2010-07-29 Thread Dave
Hi, In my application I want to enforce a each-image-can-only-be-assigned- to-a-single-patient and believed I'd be able to do this by adding a unique_together=("patient", "image") to the PatientImageRecord definition - summary of my models.py: class ImageCatagory(models.Model): ... class Ima

Re: Python/Django hosting

2010-07-29 Thread Kenneth Gonsalves
On Thursday, July 29, 2010 01:46:33 pm kostia wrote: > Currently looking at. So many choices! > I'm a person with not enough money. > > What do you think about Canadian https://servqc.net/ one? It is very > cheap from the list. > > I live in Ukraine. For me it is better to pick up European or US

Re: generate cache by visiting protected links

2010-07-29 Thread Benedict Verheyen
On 28/07/2010 18:51, Jirka Vejrazka wrote: > > Hi, > > is the statistics user-dependent? > > If not, just create a cron job (or similar, depending on your > platform) that will calculate the statistics every hour and maybe even > create the main blocks of the page to be displayed. > >

Re: I live in Ukraine. For me it is better to pick up European or US host?

2010-07-29 Thread kostia
Thank you guys. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit

error loading sqlite3 module

2010-07-29 Thread jose antunes
Can anyone please help figuring out why I get the following error: django.core.exceptions.ImproperlyConfigured: Error loading sqlite3 module: No module named _sqlite3 Using MySql works fine. But not with sqlite3, Sqlite is installed, and both python/sqlite3 and django/db/backends/sqlite3 exist. i

Re: error loading sqlite3 module

2010-07-29 Thread Alexandre González
You need to install the python sqlite libraries. On Thu, Jul 29, 2010 at 15:27, jose antunes wrote: > Can anyone please help figuring out why I get the following error: > django.core.exceptions.ImproperlyConfigured: Error loading sqlite3 module: > No module named _sqlite3 > > Using MySql works f

Re: generate cache by visiting protected links

2010-07-29 Thread Jirka Vejrazka
>    ret_val = stats_top_callers_per_year(_request) >    cache.set(reverse("stats_top_callers_per_year"), ret_val) Hi, it's your code and I won't try talk you out of it :) However, I don't see any reason why you couldn't call "stats_top_caller_per_year" from an external script, unless you d

Re: Calculate distance between 2 latitude/longitude Point

2010-07-29 Thread Alex Robbins
Geopy has a distance function build in, if you want something a little more widely used/tested: http://code.google.com/p/geopy/wiki/GettingStarted#Calculating_distances Alex On Jul 29, 5:23 am, Alexandre González wrote: > I've solved translating a JavaScript function to python: > > from math imp

Re: generate cache by visiting protected links

2010-07-29 Thread Benedict Verheyen
On 29/07/2010 15:41, Jirka Vejrazka wrote: >>ret_val = stats_top_callers_per_year(_request) >>cache.set(reverse("stats_top_callers_per_year"), ret_val) > > Hi, > > it's your code and I won't try talk you out of it :) > > However, I don't see any reason why you couldn't call > "stats

Re: How to access a MySQL table in Django?

2010-07-29 Thread Alex Robbins
Whenever I have to pull data from legacy databases, I use './manage.py inspectdb > models.py'. That will dump models for the database. Then I rename the models to make more sense, and use the orm to get my data. Alex On Jul 28, 12:58 pm, snipinben wrote: > I have the python-mysqldb installed alr

Re: Calculate distance between 2 latitude/longitude Point

2010-07-29 Thread Tomi Pieviläinen
> * > In [45]: Point(40.96312364002175, > -5.661885738372803).distance(Point(40.96116097790996, -5.66283792257309)) > Out[45]: 0.0021814438604553388 The results are what you get from the db. The thing is, you can't assume that the distance in degrees is the same everywhere, so you can't use a simp

Django has incorrect time

2010-07-29 Thread Alex
I'm having some strange behavior when using Django and Postgres. My system time zone is EDT and when running datetime.now( ) from a *Python* shell I get the correct time. If I run a Django shell through manage.py it is an hour behind. I similarly have set up a view on a web page to display the t

Re: Using sqlite3 to test locally

2010-07-29 Thread Zo
I fixed this by commenting out 'django.contrib.auth' from INSTALLED_APPS in settings.py Also, to run doctests in PyDev for eclipse, all you need to do is go to run configuration and add -v as an argument. Then right click on the file with the doctest and run as 'Python Run' Hope this helps anyone

Re: User Registration: Looking for tips

2010-07-29 Thread Wiiboy
Would it be possible to just use two ModelForms? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegr

Re: Django has incorrect time

2010-07-29 Thread Baurzhan Ismagulov
On Thu, Jul 29, 2010 at 07:33:26AM -0700, Alex wrote: > system time zone is EDT and when running datetime.now( ) from a > *Python* shell I get the correct time. If I run a Django shell > through manage.py it is an hour behind. Works fine here with Django 1.0.2-1+lenny1; which version do you have?

Re: through/unique_together usage

2010-07-29 Thread Shawn Milochik
Are you using sqlite3? It doesn't support the unique_together constraint. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-u

Re: Django has incorrect time

2010-07-29 Thread Alex
> Works fine here with Django 1.0.2-1+lenny1; which version do you have? Django 1.2.1 (installed manually, not through apt) on Kubuntu 10.04, Python 2.6.5, Postgres 8.4.4. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Django has incorrect time

2010-07-29 Thread Jason
Try changing time zones in your settings.py For example: TIME_ZONE = 'America/Los_Angeles' And make sure if you're running on Windows it matches your system's time zone. Regardless, you should see some kind of change when you do this. If you don't perhaps the settings.py isn't loading properly.

Re: User Registration: Looking for tips

2010-07-29 Thread strayhand
Euan, Thank you for the response. I agree with what you're saying and it seems that I have two options before me. 1. Define simple form class for my registration process. Write a save method that posts to both the "User" model and the "UserProfile" model. I could start this process from scratch

Re: generate cache by visiting protected links

2010-07-29 Thread Jirka Vejrazka
> I could indeed, as you correctly point out, put it in a cronjob provided > that i can access the cache that is currently used byt the site. > I haven't yet found how to do that. Probably not that hard. > But i don't see a benefit to putting the code in a cronjob. > Apparently, you do, so could yo

Re: Django has incorrect time

2010-07-29 Thread Alex
> TIME_ZONE = 'America/Los_Angeles' This actually led to the solution, which was a stupid error on my part. Somehow TIME_ZONE got into my settings.py file twice and I was changing the first instance, which was getting overwritten with the second instance (default Chicago TZ) later. -- You rec

Re: How to access a MySQL table in Django?

2010-07-29 Thread snipinben
yeah, i was able to find that exact thing yesterday, and it works and i am so happy. now i have one more problem, i cnat get oracle-cx to work. it says that "no software installation was found" or something like that. i have the python-mysql working but i cant seem to get the oracle database conn

RE: User Registration: Looking for tips

2010-07-29 Thread Colleen A Josephson
Actually, just yesterday I extended the django-registration form to deal with my profile @ registration time For reference I used: http://dmitko.ru/?p=546 and the link you previously posted, http://dewful.com/?p=70 It didn't require much code. The hardest part was sifting through some of the

Re: generate cache by visiting protected links

2010-07-29 Thread David De La Harpe Golden
On 29/07/10 16:16, Jirka Vejrazka wrote: > I personally don't like spawning another thread in a > request-response cycle, but if it works for you, be happy with it :) IIRC it's not really safe, at least in the django/apache case, the whole serving process may be considered fair game to be killed

Re: generate cache by visiting protected links

2010-07-29 Thread Benedict Verheyen
On 29/07/2010 17:53, David De La Harpe Golden wrote: > On 29/07/10 16:16, Jirka Vejrazka wrote: > > >> I personally don't like spawning another thread in a >> request-response cycle, but if it works for you, be happy with it :) > > IIRC it's not really safe, at least in the django/apache case, t

Re: Python/Django hosting

2010-07-29 Thread kostia
We are PROJECTOR team. We have a web site, developed on Django / Python. The site is temporarily launched with test data here http://kostia.pythonic.nl/ We are working with github here http://github.com/vaxXxa/projector The web site contains User Profiles, Projects and Events for these Projects.

Re: error loading sqlite3 module

2010-07-29 Thread jose antunes
thanks very much, Installing the libraries did it. 2010/7/29 Alexandre González > You need to install the python sqlite libraries. > > On Thu, Jul 29, 2010 at 15:27, jose antunes wrote: > >> Can anyone please help figuring out why I get the following error: >> django.core.exceptions.Improperly

Re: Django 1.2 modelformset_factory fails with meta: widgets

2010-07-29 Thread Jason
Can anyone confirm that passing in a form with Meta.widgets set to modelformset_factory() does in fact work? I've tried stripping my code down to the basics and still get the same exception. Debugging Django code doesn't help me because it fails during a lamda function that I don't quite understan

Re: Python/Django hosting

2010-07-29 Thread CrabbyPete
www.webfaction.com On Jul 29, 12:02 pm, kostia wrote: > We are PROJECTOR team. We have a web site, developed on Django / > Python. > > The site is temporarily launched with test data herehttp://kostia.pythonic.nl/ > > We are working with github herehttp://github.com/vaxXxa/projector > > The web s

Re: generate cache by visiting protected links

2010-07-29 Thread David De La Harpe Golden
On 29/07/10 16:58, Benedict Verheyen wrote: > So calling a thread once from within a view is not safe ? Depends on what your expectations are... I haven't managed to dig up the paragraph discussing the issue that I recall existing. I've a strong feeling it was by Graham Dumpleton, he mentions in

Re: MySQL error -1

2010-07-29 Thread Dennis Kaarsemaker
On wo, 2010-07-28 at 22:25 -0700, shacker wrote: > Well, I think I've got a culprit on this one. I was seeing occasional > "/tmp is out of space" messages from the server lately as well, That is more than likely as mysql will store temporary tables there and your error is one that can be seen if

Re: Python/Django hosting

2010-07-29 Thread kostia
Thanks, I already know about webfraction. Great site. If anyone can provide cheaper solution, hosted in Europe, please write me. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com.

Re: MySQL error -1

2010-07-29 Thread shacker
On Jul 29, 10:03 am, Dennis Kaarsemaker wrote: > If you do 'select @@tmpdir', it'll probably say /tmp as that is the > default. You can change this in /etc/my.cnf if you want. Yep, that was the fix I applied (see above). So far everything's working fine. Thanks for all the responses. ./s -- Y

Re: generate cache by visiting protected links

2010-07-29 Thread Benedict Verheyen
On 29/07/2010 17:16, Jirka Vejrazka wrote: > Well, it probably depends on the frequency od data change as well as > other factors. I personally don't like spawning another thread in a > request-response cycle, but if it works for you, be happy with it :) > > Based on the print statement on you

Need Help!

2010-07-29 Thread Ken
Looking for a django developer in the NYC area! I would appreciate any help, if you know of anyone! Thank you! Ken -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscrib

for httplib2, serialization or singleton?

2010-07-29 Thread yifan
I got a django web app where there is a httplib2 object used to do HTTPS with client authentication connections to a apache server. The problem is that for every request, my httplib2 object has to do a SSL hand-shaking to apache, which is extremely slow. I tried to save the httplib2 to the django

Re: generate cache by visiting protected links

2010-07-29 Thread Jirka Vejrazka
> That's why i asked on what Django uses as a key to set and entry in the cache. > If i generate the page and put it on the cache and then rely on Django to get > it, > the key i use needs to be the same as Django uses otherwise the page isn't > found in the > cache and the page is generated agai

When doing select_related, the sql query produced is an INNER JOIN can that be changed to LEFT JOIN

2010-07-29 Thread thusjanthan
Hi, I have the following relation: class Email(models.Model): id = models.CharField(max_length=15,primary_key=True) ... class Person(models.Model): id= models.CharField(max_length=15,primary_key=True) email = models.ForeignKey(Email, db_column='id') When I do: Person.objects.selec

Re: unit testing and not creating database for read only database

2010-07-29 Thread thusjanthan
Any suggestions? On Jul 7, 2:21 pm, thusjanthan wrote: > Hi, > > So I have a read only database called "information" which has been > modeled in the django framework with the managed=false for the META on > all its tables. When I run unit tests on another app I do not want the > unit tests to go

django_session not in "default" DB

2010-07-29 Thread Jocelo
Hi, I have two DB configured on my django project... one in oracle and the other one in MySQL... My Oracle DB is the default one, and on MySQL I store data that is not really related to my main application. I want to store session data in MySQL, since oracle is legacy but whenever I try to store

RegexURLPattern that matched of a specific HttpRequest?

2010-07-29 Thread Jari Pennanen
Hi! I'm doing app that needs to list all urlconf patterns, thats easy, just looping and flattening the includes inside urlpatterns of current settings urlconf. But, the hard part is that I also need to know which one is the current RegexURLPattern of executed view (specific request's RegexURLPatte

Re: When doing select_related, the sql query produced is an INNER JOIN can that be changed to LEFT JOIN

2010-07-29 Thread Daniel Roseman
On Jul 29, 8:49 pm, thusjanthan wrote: > Hi, > > I have the following relation: > > class Email(models.Model): >     id = models.CharField(max_length=15,primary_key=True) > > ... > > class Person(models.Model): >     id= models.CharField(max_length=15,primary_key=True) >     email = models.Foreign

Re: When doing select_related, the sql query produced is an INNER JOIN can that be changed to LEFT JOIN

2010-07-29 Thread akaariai
On 29 heinä, 22:49, thusjanthan wrote: > Hi, > > I have the following relation: > > class Email(models.Model): >     id = models.CharField(max_length=15,primary_key=True) > > ... > > class Person(models.Model): >     id= models.CharField(max_length=15,primary_key=True) >     email = models.Foreign

Re: through/unique_together usage

2010-07-29 Thread Dennis Kaarsemaker
On do, 2010-07-29 at 05:35 -0700, Dave wrote: > In my application I want to enforce a each-image-can-only-be-assigned- > to-a-single-patient So why do you use a ManyToManyField instead of a ForeignKey? -- Dennis K. They've gone to plaid! -- You received this message because you are subscribe

Re: django_session not in "default" DB

2010-07-29 Thread Dennis Kaarsemaker
On do, 2010-07-29 at 13:03 -0700, Jocelo wrote: > Hi, > > I have two DB configured on my django project... one in oracle and the > other one in MySQL... > My Oracle DB is the default one, and on MySQL I store data that is not > really related to my main application. > > I want to store session da

uncomplete internationalization of 'auth' in admin panel

2010-07-29 Thread bagheera
Internationalization of 'auth' app in django 1.2 isn't complete. In user edit form there are user permissions displayed in two windows, like "auth | permission | Can add permission", etc. I want it all fully localized, but i can't digg up right code. Any ideas how to solve that? -- You received t

'python manage.py startproject survey' does not add 'survey' to INSTALLED _APPS.

2010-07-29 Thread to_see
I am still new to Django, and am typing my way through some tutorials (not running demo code). I could not figure out why I was getting incorrect results in an Admin demo, until I looked at the sample code. When I did this: django-admin.py startproject marketr cd marketr python manage.py startap

Re: 'python manage.py startproject survey' does not add 'survey' to INSTALLED _APPS.

2010-07-29 Thread Martin Melin
On Thu, Jul 29, 2010 at 10:51 PM, to_see wrote: > I am still new to Django, and am typing my way through some tutorials > (not running demo code).  I could not figure out why I was getting > incorrect results in an Admin demo, until I looked at the sample > code. > > When I did this: > > django-ad

Re: uncomplete internationalization of 'auth' in admin panel

2010-07-29 Thread Dennis Kaarsemaker
On do, 2010-07-29 at 13:43 -0700, bagheera wrote: > Internationalization of 'auth' app in django 1.2 isn't complete. In > user edit form there are user permissions displayed in two windows, > like "auth | permission | Can add permission", etc. I want it all > fully localized, but i can't digg up ri

Re: 'python manage.py startproject survey' does not add 'survey' to INSTALLED _APPS.

2010-07-29 Thread to_see
Martin Melin wrote: > On Thu, Jul 29, 2010 at 10:51 PM, to_see wrote: > > I am still new to Django, and am typing my way through some tutorials > > (not running demo code).  I could not figure out why I was getting > > incorrect results in an Admin demo, until I looked at the sample > > code. >

Regex problem in urls

2010-07-29 Thread Gordy
I'm a rookie at Django so this is probably something obvious. My urls.py looks like this: from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Example: # (r'^sunlig

field.label in template converts to lower case in 1.2.1

2010-07-29 Thread Jeff Green
With Django 1.2.1 it seems that my html template causes the field.label to display in lower case except for the first character. Has anyone experienced this before and how do you get it display without lower case conversion My html template snippet is: {% for field in form %} {{ field.label

LANGUAGES var isn't in all views

2010-07-29 Thread Alexandre González
Hi! I have this templates: 39 40 41 42 {% for lang in LANGUAGES %} 43 {{ lang.1 }} 44 {% endfor %} 45 46 47 That show my languages in the webpage. I made it with tutorial: http://djangobook.com/en/2.0/chapt

Best way to find near people

2010-07-29 Thread Alexandre González
Hi! I'm searching near people in my app. I'm doing it a this way: 37 people = Person.objects.all().exclude(user=request.user) 38 39 near_people = list() 40 for person in people: 41 if self.is_near(me.coordinates, person.coordinates): near_people

Re: field.label in template converts to lower case in 1.2.1

2010-07-29 Thread Jason
I think Django's been doing that for a long time (not just 1.2.1). Probably the quick and easy way to change case would be to use just field.label and pump it into whatever format you want: {{ field.label|upper }} You'll have to manually create the rest of the html for the label using field.html

Re: Best way to find near people

2010-07-29 Thread Bill Freeman
Circle is hard. What you can do is create a bounding box which is rectangular in lat/long space (if not in physical space) whose sides are tangent to your desired distance circle. You will search a few more users than if you could really restrict them to the distance circle a priori, but it will

Re: field.label in template converts to lower case in 1.2.1

2010-07-29 Thread Jeff Green
For example, the field name is Programmer Serial Number but it is being displayed as Programmer serial number I have not had this issue in 1.1.1. I was wondering if there was a way to ignore the conversion. On Thu, Jul 29, 2010 at 5:02 PM, Jason wrote: > I think Django's been doing that for a l

UnicodeEncodeError

2010-07-29 Thread Eric
I am getting this error in the Django Administration section when I add an entry for a Dashboard object. When I return to the item in the Admin section, the record has been added and it displays correctly in the list of Dashboard objects. When I click on it, it shows correctly. Only when I add a n

Re: field.label in template converts to lower case in 1.2.1

2010-07-29 Thread Jason
Post the form class (or model if you are generating it from a model). On Jul 29, 3:17 pm, Jeff Green wrote: > For example, the field name is Programmer Serial Number but it is being > displayed > as Programmer serial number > > I have not had this issue in 1.1.1. I was wondering if there was a wa

Raw sql and admin site

2010-07-29 Thread Spoksss
Hi, I try to use raw sql in admin site, it is possible somehow? I use postresql and have some problem with ordering. I have in database something like: Category(id=1, name='first', parent_category=None, materialised_path='1') Category(id=2, name='child1 of first', parent_category=1, materialised

test's client.post says post but request.method says GET

2010-07-29 Thread Phlip
Django aficionados: Here's my test code: from django.test.client import Client self.client = Client() from django.core.files.base import ContentFile file_content = ContentFile(sample_inventory_update_cvs()) file_content.name = 'response.csv' respon

Re: test's client.post says post but request.method says GET

2010-07-29 Thread Phlip
forgot to mention Django 1.1.2 On Jul 29, 5:18 pm, Phlip wrote: > Django aficionados: > > Here's my test code: > >         from django.test.client import Client >         self.client = Client() >         from django.core.files.base import ContentFile >         file_content = ContentFile(sample_in

Re: Best way to find near people

2010-07-29 Thread Tim Chase
On 07/29/10 16:58, Alexandre González wrote: Hi! I'm searching near people in my app. I'm doing it a this way: 37 people = Person.objects.all().exclude(user=request.user) 38 39 near_people = list() 40 for person in people: 41 if self.is_near(m

Re: Best way to find near people

2010-07-29 Thread Christophe Pettus
On Jul 29, 2010, at 2:58 PM, Alexandre González wrote: > Hi! > > I'm searching near people in my app. I'm doing it a this way: > > 37 people = Person.objects.all().exclude(user=request.user) > 38 > 39 near_people = list() > 40 for person in people: > 41

Re: Newbie: how to tell a URL for a page?

2010-07-29 Thread BobAalsma
Thanks very much! Yes, I agree, probably not specifically Django, but it is the environment where I needed the answer. At least this will give me something to work with/from :-) Regards, Bob On Jul 29, 8:03 am, Carlos Daniel Ruvalcaba Valenzuela wrote: > Hello, your question probably does not

Django Dev server doesn't reflect changes

2010-07-29 Thread barun
Hi Developers, I'm using Django and it's development server to test my pages. However, the Dev server behaves strangely. It doesn't always reflect the recent changes made in code. For example, a file demo.js has an image reference. I had changed the image URL (and saved). But when I run the applic

Re: Best way to find near people

2010-07-29 Thread Jani Tiainen
> On Jul 29, 2010, at 2:58 PM, Alexandre González wrote: > > Hi! > > > > I'm searching near people in my app. I'm doing it a this way: > > > > 37 people = Person.objects.all().exclude(user=request.user) > > 38 > > 39 near_people = list() > > 40 for person in pe

django autocomplete search with jQuery

2010-07-29 Thread Joel Klabo
I have been looking around for some examples but I can't find anything recent. This is my first AJAX experience so I would love to just see an example because it's not quite making sense to me. Does anyone know of a tutorial? Or have some code samples I could check out? I have checked google btw.

Re: Django Dev server doesn't reflect changes

2010-07-29 Thread barun
I guess I found the solution. I cleared the browser cache, and then all the files were retrieved afresh. All changes were reflected. On Jul 30, 10:25 am, barun wrote: > Hi Developers, > > I'm using Django and it's development server to test my pages. > However, the Dev server behaves strangely. I

Re: Django Dev server doesn't reflect changes

2010-07-29 Thread Kenneth Gonsalves
On Friday, July 30, 2010 10:55:13 am barun wrote: > I've restarted the server, browser. Do I need to do anything else? browser cache? -- Regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC -- You received this message because you are subscribed to the Google Groups "Django users" gro