Re: Revision 6391 Admin error

2007-10-26 Thread Jason Sidabras
Thank you for taking my jumbled post and helping me. It seems that even though I haven't added my new script yet in my INSTALLED_APPS it was checking it. Removing the errors in that script cleared up the problem. Thank you, jason On Oct 26, 7:52 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>

Re: Lost in why "UnicodeDecodeError" on changeset 6601

2007-10-26 Thread Malcolm Tredinnick
On Sat, 2007-10-27 at 10:59 +1000, Malcolm Tredinnick wrote: [...] > I guess you know what you mean here, Jeremy, but just in case anybody > hits this in the archives: DEFAULT_CHARSET has nothing to do with the > internal bytestrings you pass to Django. It *only* affects the output > from the

Re: Lost in why "UnicodeDecodeError" on changeset 6601

2007-10-26 Thread Malcolm Tredinnick
On Fri, 2007-10-26 at 15:52 -0500, Jeremy Dunck wrote: > On 10/26/07, mamcxyz <[EMAIL PROTECTED]> wrote: > > > > > What's the type and value of "request.content"? What's the type and > > > value of "text" ? > > > > self.response= > > Err, please give the type and value of request.*content*, not

Re: Revision 6391 Admin error

2007-10-26 Thread Malcolm Tredinnick
On Fri, 2007-10-26 at 15:49 -0700, Jason Sidabras wrote: > Hello, > > In an effort to keep up with svn with django I have just upgraded all > of my sites to the newest svn revision. The problem is after updating > I get the error: > > >NameError at /admin/ > >name 'PasswordField' is not defined

Re: Limiting foreign key choices

2007-10-26 Thread Malcolm Tredinnick
On Fri, 2007-10-26 at 19:01 +, myahya wrote: > I have two models: products and catregories. A product can belong to > exactly one category. To make navigation easier, I use nested > categories. I want to limit the admin's ability to add a product only > to the leaf categories (those with no

Re: object persistence

2007-10-26 Thread Malcolm Tredinnick
On Fri, 2007-10-26 at 15:57 +, Luke wrote: > In one of my django apps, I need to access another database that is > unrelated to django's db. We are using psycopg to access this. There > is some code running some calculations inside the db as a shared > object, and it is tied to a

Re: Large Admin Areas

2007-10-26 Thread Malcolm Tredinnick
On Fri, 2007-10-26 at 13:31 +, Zenom wrote: > Let's say we had a bunch of legacy schemas in postgresql. Currently we > have like 6 schemas if we were to re-write our admin interface from > php to django we would need to write 6 projects 1 for each schema > essentially (if I apply the

Re: Variable available to All users (static class?)

2007-10-26 Thread Malcolm Tredinnick
On Fri, 2007-10-26 at 20:47 +, SmileyChris wrote: > Sounds like you want something like threading.local > It's not my area of expertise, but you may be able to pick up some > hints on how to use it from > http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser That will only work if

Re: i18n/setlang no longer support GET

2007-10-26 Thread Marc Garcia
That's not a big problem, you can just do something like that: #language { background-color: transparent; border-style: none; cursor: pointer; } That have too few lines than a link, but follows standards, is probably clearer, ans looks exactly the same way. See you!

Revision 6391 Admin error

2007-10-26 Thread Jason Sidabras
Hello, In an effort to keep up with svn with django I have just upgraded all of my sites to the newest svn revision. The problem is after updating I get the error: >NameError at /admin/ >name 'PasswordField' is not defined >Request Method:GET >Request URL: http://xxx/admin/ >Exception

Re: Lost in why "UnicodeDecodeError" on changeset 6601

2007-10-26 Thread Jeremy Dunck
On 10/26/07, mamcxyz <[EMAIL PROTECTED]> wrote: > > > What's the type and value of "request.content"? What's the type and > > value of "text" ? > > self.response= Err, please give the type and value of request.*content*, not request. :) ... > 'content-type': ('Content-Type', 'text/html;

Re: Variable available to All users (static class?)

2007-10-26 Thread SmileyChris
Sounds like you want something like threading.local It's not my area of expertise, but you may be able to pick up some hints on how to use it from http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser On Oct 27, 8:53 am, "William Battersea" <[EMAIL PROTECTED]> wrote: > Hi, > > I'm

Re: how to write regex to parse "http://127.0.0.1:8000/user/login/?next=/user/1/add/"

2007-10-26 Thread SmileyChris
On Oct 27, 3:36 am, Brightman <[EMAIL PROTECTED]> wrote: > thank u. > how can i get it in request.POST? By changing your form to --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Lost in why "UnicodeDecodeError" on changeset 6601

2007-10-26 Thread mamcxyz
> What's the type and value of "request.content"? What's the type and > value of "text" ? self.response= Doing a self.response.__dict__ I see this relevant values: 'content-type': ('Content-Type', 'text/html; charset=utf-8')} META:{'CONTENT_LENGTH': None, 'CONTENT_TYPE': 'text/html;

Re: Lost in why "UnicodeDecodeError" on changeset 6601

2007-10-26 Thread Jeremy Dunck
On 10/26/07, mamcxyz <[EMAIL PROTECTED]> wrote: > > self.assertContains(self.response,u'Buscar:') > File "D:\Programacion\Python\Python24\lib\site-packages\django\test > \testcases.py", line 111, in assertContains > real_count = response.content.count(text) > UnicodeDecodeError: 'ascii'

ANN: Security fix to i18n framework

2007-10-26 Thread Jacob Kaplan-Moss
Hello folks -- Today we're releasing a fix for a security vulnerability discovered in Django's internationalization framework. The complete details are below, but the executive summary is that you should updated to a fixed version of Django immediately. We are releasing point-releases of all

Variable available to All users (static class?)

2007-10-26 Thread William Battersea
Hi, I'm probably describing this poorly because I've never done this and I come from a PHP background, but... Is there anyway that I can have some variable available to all the user sessions without resorting to a database. E.g. I suppose I want a variable 'busy'. If any user initiates a piece

Lost in why "UnicodeDecodeError" on changeset 6601

2007-10-26 Thread mamcxyz
I'm in the process to relaunch a django site. I build a dozen test (finally!) for it and work correctly before. I update django to changeset 6601 and get a lot of errors. I fix almost all of them except this: self.assertContains(self.response,u'Buscar:') File

Re: geodjango and MySQL

2007-10-26 Thread Justin Bronn
Greg, A preliminary MySQL spatial backend was added last week in r6527. The documentation for the MySQL database API may be found at: http://code.djangoproject.com/wiki/GeoDjangoDatabaseAPI#MySQL You should be aware of MySQL's spatial limitations: (1) all spatial queries are restricted to the

Limiting foreign key choices

2007-10-26 Thread myahya
I have two models: products and catregories. A product can belong to exactly one category. To make navigation easier, I use nested categories. I want to limit the admin's ability to add a product only to the leaf categories (those with no children). So if I the following structure Electronics >

Re: How would you cache a view that will never change?

2007-10-26 Thread Benjamin
You could also just create the page, and save it as static HTML and then serve it via Apache, et. al. If it never changes, this would probably be the most efficient. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: floatformat filter rendering problem

2007-10-26 Thread Karen Tracey
Ah, looks like you are hitting an incompatibility between the new template variable resolution system (went into revision 6399, on 9/20) and the comment-utils code. It's been reported against the comment-utils project: http://code.google.com/p/django-comment-utils/issues/detail?id=13

Re: accessing verbose_name and other field meta data

2007-10-26 Thread Phil Davis
On 26/10/2007, Luke <[EMAIL PROTECTED]> wrote: > > I am processing a form that is built from a model using > form_for_model. In the model I specified a verbose_name for each > field. I can, of course, get the form values through > form.cleaned_data when it is returned, but I cannot figure out

accessing verbose_name and other field meta data

2007-10-26 Thread Luke
I am processing a form that is built from a model using form_for_model. In the model I specified a verbose_name for each field. I can, of course, get the form values through form.cleaned_data when it is returned, but I cannot figure out where verbose_name is located. I need this to produce the

Re: newbie: user proile in models

2007-10-26 Thread dunia
Gigs_ wrote: > how do you people create user profile in models? > i want to created user profile for users to register > i have don it like this, but i have feeling that it could be better > > class PlayersProfile(models.Model): > user = models.ForeignKey(User) > first_name =

Re: floatformat filter rendering problem

2007-10-26 Thread [EMAIL PROTECTED]
Okay this is the portion of the for loop in my template : - {% for object in latest %} {{ object.headline|escape }} Posted on {{ object.pub_date| date:"F j, Y" }} by {{

object persistence

2007-10-26 Thread Luke
In one of my django apps, I need to access another database that is unrelated to django's db. We are using psycopg to access this. There is some code running some calculations inside the db as a shared object, and it is tied to a connection, so we need to keep it open and not make a new

Re: Scaling the server

2007-10-26 Thread Michel Thadeu Sabchuk
Hi again Simon, > @ Michel: I think the best approach is to use a separate IP for Lighttpd to > listen on, but it should be equally easy to have Lighttpd listen on > for example port 81. Hum, understood. The last one question (I think :-P). The use of apache to redirect connections to lighttpd

Re: Scaling the server

2007-10-26 Thread simonbun
@ Malcolm: I know, I didn't mean you'd need 31 separate Apache processes at once. Most browsers only download a few files at once per subdomain, but that usually still involves spawning new Apache processes. How many is dependent on many factors of course. In the end I still believe that

newbie: user proile in models

2007-10-26 Thread Gigs_
how do you people create user profile in models? i want to created user profile for users to register i have don it like this, but i have feeling that it could be better class PlayersProfile(models.Model): user = models.ForeignKey(User) first_name = models.CharField(maxlength=20)

Re: how to write regex to parse "http://127.0.0.1:8000/user/login/?next=/user/1/add/"

2007-10-26 Thread Brightman
thank u. how can i get it in request.POST? On Oct 26, 6:34 pm, Tomi Pievil inen <[EMAIL PROTECTED]> wrote: > > but in python ,there is no problem > > That's because Django doesn't give you the whole URI, just the path > component. "?" is a reserved character used to signal the start of > the >

Re: How would you cache a view that will never change?

2007-10-26 Thread Kai Kuehne
Hi! On Oct 26, 2007, at 4:07 AM, [EMAIL PROTECTED] wrote: > >> maybe I'm a bit confused (or tired) but >> how would you go and cache a view that will *never* >> change depending on a request on my application? > > Is the output something difficult for the view to generate? No, it's just a

Re: which Django version to use for live site to be released in end of february 2008

2007-10-26 Thread web-junkie
We are running a production site with trunk. No problems so far. Just watch any updates and update regularly. On Oct 23, 5:00 pm, ydjango <[EMAIL PROTECTED]> wrote: > I am working on product which will be released end of february. I am > planning to use Django for building the site. I am new to

Large Admin Areas

2007-10-26 Thread Zenom
Let's say we had a bunch of legacy schemas in postgresql. Currently we have like 6 schemas if we were to re-write our admin interface from php to django we would need to write 6 projects 1 for each schema essentially (if I apply the postgresql schema patches etc, but that's beside the point). My

Re: authentication on generic views

2007-10-26 Thread Marty Alchin
On 10/26/07, Hugh Bien <[EMAIL PROTECTED]> wrote: > I haven't really used generic views that often, but I know you could always > extend them by creating your own views. > > Inside your views.py: > > > from django.views.generic.list_detail import object_list > > @login_required > def

Newbie forms question:

2007-10-26 Thread schlam
so I am using the code from the Django documentation to processes information from a form with the code : def edit_place(request, place_id): try: manipulator = Place.ChangeManipulator(place_id) place = manipulator.original_object if request.method == 'POST':

Re: save() datefield

2007-10-26 Thread Thomas Guettler
Am Freitag, 26. Oktober 2007 10:53 schrieb äL: > I use Django to manage addresses. To publish the data I have a list > and a detailed view. In the detail view I can change the name, > address, phone, etc. of the person. To do that I created an edit > form. > > Now, everythin is fine. Only if I

LEARN FREE GET FREE

2007-10-26 Thread RATISH KAKKAD
Register with a2zlearning and get: * More than 1000 electronic book * Lecture notes for Arts, Commerce, Science, Management * Multiple Choice Questions for Competitive Exams * Case Studies for Management Aspirants * Slide Shows on various subjects * Kids Games, Software, Comic books etc CLICK ON

Re: Scaling the server

2007-10-26 Thread Michel Thadeu Sabchuk
Hi again guys! > > No, this isn't correct. No sane web browser requests every single URL at > > once -- there is a maximum number of parallel connections they will open > > for precisely this reason. > > And browser caching of static stuff like css files and images should > hopefully ensure that

Re: how to append a array for JSON use,thanks!

2007-10-26 Thread [EMAIL PROTECTED]
thanks very much, it is what i wanted. On 10月26日, 下午4时54分, Thomas Guettler <[EMAIL PROTECTED]> wrote: > You want: '''{"version":...}''' this means you need to > pass a dictionary to simplejson.dumps() > > mydict={"version":..., > "markers": content, > }... > ..dumps(mydict) > > Am Freitag, 26.

Re: how to write regex to parse "http://127.0.0.1:8000/user/login/?next=/user/1/add/"

2007-10-26 Thread AniNair
Are you trying to submit a html form? --~--~-~--~~~---~--~~ 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

Re: translation and flatpages

2007-10-26 Thread AniNair
Hi... Thanks for the help.Btw, Isn't 17 hours n 24 min 'a bit more than' 16 hours? If not, then how much is 'bit more'? Please ignore if you don't know. Do a google search?lol.Thanks all the same. --~--~-~--~~~---~--~~ You received this message

Re: how to write regex to parse "http://127.0.0.1:8000/user/login/?next=/user/1/add/"

2007-10-26 Thread Tomi Pievil inen
> but in python ,there is no problem That's because Django doesn't give you the whole URI, just the path component. "?" is a reserved character used to signal the start of the query component (see http://www.ietf.org/rfc/rfc2396.txt). In Django you access the query component through the request

how to write regex to parse "http://127.0.0.1:8000/user/login/?next=/user/1/add/"

2007-10-26 Thread Brightman
for example: in urls.py, i use " (r'^login/\?next=(?P.+)/$', 'login') " to parse this url http://127.0.0.1:8000/user/login/?next=/user/1/add/ but i can't get the value of variable 'next ' in login function but in python ,there is no problem. >>> import re >>> a="login/?next=/user/1/add/" >>>

Re: template variables

2007-10-26 Thread fisher
On Oct 13, 8:09 am, Goon <[EMAIL PROTECTED]> wrote: > can you use variables in django's templates? > > so like {% for x in y %} > > and then something like > > {% int x =3; x++ %} Recently I found some handy django snippet which can be usefull for you. http://www.djangosnippets.org/snippets/9/

Re: authentication on generic views

2007-10-26 Thread Hugh Bien
I haven't really used generic views that often, but I know you could always extend them by creating your own views. Inside your views.py: from django.views.generic.list_detail import object_list @login_required def my_list(*args, **kwargs): return object_list(*args, **kwargs) - Hugh On

save() datefield

2007-10-26 Thread äL
I use Django to manage addresses. To publish the data I have a list and a detailed view. In the detail view I can change the name, address, phone, etc. of the person. To do that I created an edit form. Now, everythin is fine. Only if I try to change and save the birthday (witch is a datefield)

Re: how to append a array for JSON use,thanks!

2007-10-26 Thread [EMAIL PROTECTED]
l1 = [1, 2] l1 += [3, 4] [-1, 0] + l1 Regards, Gustaf On Oct 26, 10:09 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > i just want to use JSON in gmap, here is an alterative method for > UTF-8 character, > > s = Suburb.objects.all() > > contents = [] > for ss in

Re: Scaling the server

2007-10-26 Thread Graham Dumpleton
On Oct 26, 6:38 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2007-10-26 at 05:06 +, simonbun wrote: > > > Well, I have another server available now ;) > > > And you're using it for serving static content I hope? Your previous > > setup with Apache serving everything with

Re: weird "can't adapt" error

2007-10-26 Thread sandro dentella
On 26 Set, 12:59, Sandro Dentella <[EMAIL PROTECTED]> wrote: > Hi, > > I'm meeting a weird problem in a django application. > It works w/o any problem from my pc connecting remotely to my customer's > apache but is not working inside the lan. > > I'm connecting from firefox/ubuntu they're

Re: Scaling the server

2007-10-26 Thread Malcolm Tredinnick
On Fri, 2007-10-26 at 05:06 +, simonbun wrote: > > Well, I have another server available now ;) > > And you're using it for serving static content I hope? Your previous > setup with Apache serving everything with KeepAlive off can bring many > a server to its knees. If you serve a html page

******FREE DOWNLOADS***********

2007-10-26 Thread kumar
**FREE DOWNLOADS*** Earnfre.blogspot.com --~--~-~--~~~---~--~~ 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

how to append a array for JSON use,thanks!

2007-10-26 Thread [EMAIL PROTECTED]
i just want to use JSON in gmap, here is an alterative method for UTF-8 character, s = Suburb.objects.all() contents = [] for ss in s.iterator(): contents.append({'html': ss.name, 'label': ss.slug,

floatformat filter rendering problem

2007-10-26 Thread [EMAIL PROTECTED]
I'm running the svn version when django start rendering the template it keeps raise this exception : float() argument must be a string or a number , at line 11 and line 11 is {% for object in latest %} I don't understand what is the cause of this problem . any help ?

Re: AsianAirfares.com Beats Closest Competitor 6 Out of 10 in International Travel Comparison

2007-10-26 Thread Ben van Staveren
>> > The django-users list spam abuse has become nearly intolerable. As a > subscriber to numerous other technically oriented mailing lists, I > very > rarely have to deal with any spam whatsoever. Google Groups may be > free, > but it is apparently not without cost. > > Cl Next time, try

Re: AsianAirfares.com Beats Closest Competitor 6 Out of 10 in International Travel Comparison

2007-10-26 Thread Carl Holm
[EMAIL PROTECTED] wrote: > AsianAirfares.com Beats Closest Competitor 6 Out of 10 in > International Travel Comparison > > > AsianAirfares.com Beats Closest Competitor 6 out of 10 in > International Travel Comparison (Car Rentals, Hotels, Air Tickets, > Cruises). > > New York, NY, October 24,

New invented car options

2007-10-26 Thread Ahmed
New invented car options http://dream-cars.bravehost.com --~--~-~--~~~---~--~~ 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

Re: translation and flatpages

2007-10-26 Thread Malcolm Tredinnick
On Thu, 2007-10-25 at 23:25 -0700, AniNair wrote: > Cannot internationalize them? It's generally considered polite to wait a bit more than 16 hours before posting a "hurry up" repost when nobody has responded. There is no core Django support for translating content stored in the database. Do a

Re: translation and flatpages

2007-10-26 Thread AniNair
Cannot internationalize them? --~--~-~--~~~---~--~~ 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

Re: Entering Greek, cyrillic, or other 'weird' text

2007-10-26 Thread Kenneth Gonsalves
On 26-Oct-07, at 10:49 AM, Robert Bunting wrote: >> so is this a legacy database - meaning a database which had data >> before you upgraded to unicode django? In that case, we have seen in >> postgres that the old data is b0rked and needs to be reentered, >> otherwise it wont work. You need to

Re: static images with built-in django server

2007-10-26 Thread girzel
Me too, I can't get this to work and it's driving me crazy. My main problem seems to be that Django is looking inside the Django site package within my Python framework for the media (when I try to load an image directly, for instance, it tells me "Page not found: /Library/