Re: shared state between requests and FastCGI

2008-02-14 Thread [EMAIL PROTECTED]
This is pretty hackish, and might not be fast enough, but if the data is simple(ie just 1 number to represent something) perhaps just store it in a text file. On Feb 15, 12:23 am, Amit Ramon <[EMAIL PROTECTED]> wrote: > After reading the replies, and thinking about the problem a little bit more,

Re: how to make cron works

2008-02-14 Thread Amit Ramon
As Malcolm pointed before, the problem is most likely with the value of your PYTHONPATH environment variable. Since you're using a shell script, simply set this variable in this script itself, before invoking the python script. --- Amit * [EMAIL PROTECTED] <[EMAIL PROTECTED]> [2008-02-14

Re: how to make cron works

2008-02-14 Thread [EMAIL PROTECTED]
thanks! i need to focus on mkaing shell script works for me On Feb 15, 2:17 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2008-02-14 at 22:07 -0800, [EMAIL PROTECTED] wrote: > > the error as below: > > 1.  Traceback (most recent call last): > >  File "feedup.py", line 3, in ? > >    

Re: shared state between requests and FastCGI

2008-02-14 Thread Amit Ramon
After reading the replies, and thinking about the problem a little bit more, I think I can phrase it better (the replies really helped me to better understand it). I need to draw one of, say, N elements in every request, in such a way that over many requests the drawing distribution will be

Re: how to make cron works

2008-02-14 Thread Malcolm Tredinnick
On Thu, 2008-02-14 at 22:07 -0800, [EMAIL PROTECTED] wrote: > the error as below: > 1. Traceback (most recent call last): > File "feedup.py", line 3, in ? >from django.core.management import setup_environ > ImportError: No module named django.core.management > > 2. Traceback (most recent

Re: how to make cron works

2008-02-14 Thread [EMAIL PROTECTED]
the error as below: 1. Traceback (most recent call last): File "feedup.py", line 3, in ? from django.core.management import setup_environ ImportError: No module named django.core.management 2. Traceback (most recent call last): File "mstart", line 13, in ? import msnlib ImportError: No

Re: how to make cron works

2008-02-14 Thread Malcolm Tredinnick
On Thu, 2008-02-14 at 21:32 -0800, [EMAIL PROTECTED] wrote: > i have a python script which works smooth for me in command line. > but now it cannot work in cron job. > > path: /home/data > script: test.py > it works as i type : python test.py > > now i wirte a shell script as below(test.sh):

Re: plaintext upload in newforms

2008-02-14 Thread Malcolm Tredinnick
On Thu, 2008-02-14 at 16:57 -0800, [EMAIL PROTECTED] wrote: > I am writing an app where site users upload a plaintext file full of > unstructured *unicode* data, By the way -- I know you've already had your a-ha moment for this -- this statement isn't correct and may confuse you in the future.

how to make cron works

2008-02-14 Thread [EMAIL PROTECTED]
i have a python script which works smooth for me in command line. but now it cannot work in cron job. path: /home/data script: test.py it works as i type : python test.py now i wirte a shell script as below(test.sh): cd /home/data python test.py so when i run test.sh, it is ok. but when i

Re: How to serve robots.txt for Django?

2008-02-14 Thread Dave Dash
RewriteEngine On RewriteRule ^robots\.txt$ /static/robots.txt [L] I think that should work if you have a web served folder of /static I forget if DH supports Alias because Alias robots.txt /path/to/robots.txt will also work. On Feb 14, 1:24 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

Re: Python & Django Noob at Django Sprint at PyCon 2008?

2008-02-14 Thread Julien
Coaching for newbies is a great idea! Jacob, do you think it'll be possible to set up a wiki page after Pycon with the all things you'll present at that introduction session? So that would also benefit those who could not attend the conference. Cheers, Julien On Feb 15, 2:14 pm, "Jacob

Re: Python & Django Noob at Django Sprint at PyCon 2008?

2008-02-14 Thread Jacob Kaplan-Moss
On 2/14/08, Brian Rosner <[EMAIL PROTECTED]> wrote: > To answer your question about the sprints (in which I did not attend > last year, due to time) you should check out the SprintIdeas [1] page > on the wiki. It will give you about all the information you need. Make > sure to put your name

Re: plaintext upload in newforms

2008-02-14 Thread jonathan . lukens
Scratch that. Had it stuck in my head that the attributes for UploadedFile objects were dictionary keys, confusion with older stuff. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

coercing to Unicode

2008-02-14 Thread SeanFromIT
Any ideas what would cause this? TypeError at /admin/app/report/ coercing to Unicode: need string or buffer, long found The debug claims that the error is in change_list.html at line 18: {% block result_list %}{% result_list cl %}{% endblock %} The relevant models: # coding=utf-8 class

Re: Null ManyToManyFields

2008-02-14 Thread SeanFromIT
The problem was that syncdb does not "alter table" - it apparently just creates. Thus even though the app now treated these relations as optional, the database did not. Thanks! On Feb 13, 10:44 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Wed, 2008-02-13 at 19:34 -0800, SeanFromIT

plaintext upload in newforms

2008-02-14 Thread jonathan . lukens
I am writing an app where site users upload a plaintext file full of unstructured *unicode* data, which is then processed and a CSV file is returned. I have just been informed that using newsforms.FileField() I am only going to get binary data. If it comes down to it, I could just retool this

Re: forms question

2008-02-14 Thread Michael Newman
This one has been debated over and over. It has been decided that there will be no more as_...() because it is simple enough to hook into the class and make your own. Here is the discussion over at django-devs:

Re: Annoying little bug that just won't stop -- new forms admin

2008-02-14 Thread Michael Newman
As I continue to test this, it appears that inline image fields don't work at all in newforms Admin. Yikes!!! Can someone confirm? My code: from django.db import models class TestObject(models.Model): somefield = models.CharField(max_length=100) class TestObjectImageInline(models.Model):

forms question

2008-02-14 Thread Chris
will there ever be an forms.as_div method? tables seems kinda old school. --~--~-~--~~~---~--~~ 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

Re: What are the advantages of using Django for building things like blogs and CMS?

2008-02-14 Thread fyleow
Thanks for alt he suggestions guys, I will check out those resources. On Feb 14, 1:38 am, yml <[EMAIL PROTECTED]> wrote: > Hello, > I would also add this list of resources: > -http://www.djangosites.org/with-source/ > Chance are good that someone has already solved your problem. > > --yml > >

Annoying little bug that just won't stop -- new forms admin

2008-02-14 Thread Michael Newman
I get an 'Upload a valid image. The file you uploaded was either not an image or a corrupted image.' When I try to save a model in the admin. I had this issue in the oldforms admin as well. I was passed to this article:

Re: How to return Admin to previous filters after save?

2008-02-14 Thread Nathaniel Whiteinge
Another workaround: I used JavaScript to open links on the change_list page in a pop-up window (helps to append `?_popup=1` to the URL). It's not perfect (you have to refresh the change_list page to see your changes), but it keeps all your filtering intact. I believe redirecting to an URL of

Re: How to use autoescape?

2008-02-14 Thread James Bennett
On Thu, Feb 14, 2008 at 3:01 PM, Ting Zhou <[EMAIL PROTECTED]> wrote: > Could somebody tell me how to use autoescape in django? http://www.djangoproject.com/documentation/templates/#automatic-html-escaping -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct."

Re: How to serve robots.txt for Django?

2008-02-14 Thread [EMAIL PROTECTED]
I'm using a shared server at Dreamhost, which limits my access to certain things. :( How can I do this with mod_rewrite? On Feb 14, 4:19 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > If you are using Apache(or probably other servers as well), the best > way to do it would be to just let

Re: How to serve robots.txt for Django?

2008-02-14 Thread [EMAIL PROTECTED]
If you are using Apache(or probably other servers as well), the best way to do it would be to just let your web server serve it up, Apache can be set to cause files with certain extensions to be served up as usual instead of going through django(this is instead of/in addition to the usual way of

Re: How to use django.contrib.sitemaps for Django app?

2008-02-14 Thread [EMAIL PROTECTED]
Indeed. What I meant was: http://patrickbeeson.com/sitemap.xml On Feb 14, 3:54 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote: > (r'^sitemap.xml$', > andhttp://patrickbeeson.com/sitemaps.xml. > > are different urls > > On Feb 14, 10:56 pm, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > I'm

How to use autoescape?

2008-02-14 Thread Ting Zhou
Dear all, Could somebody tell me how to use autoescape in django? Thanks Ting --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: How to use django.contrib.sitemaps for Django app?

2008-02-14 Thread Alex Koshelev
(r'^sitemap.xml$', and http://patrickbeeson.com/sitemaps.xml. are different urls On Feb 14, 10:56 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm using Django to publish my Web site and blog, and would like to > use the sitemaps app that comes with Django. But I can't get the urls > or

Re: How to return Admin to previous filters after save?

2008-02-14 Thread cyberjack
> Not a solution but a workaround. I had exactly the same problem as a user, I > solved it by bookmarking the right url. I've recommended this to our users, but it's a real pain. Each user is pretty active, so there is a lot of (load-bookmark, make edit, load- bookmark, repeat) annoyance.

Re: Using the sites-system with a twist - is it possible?

2008-02-14 Thread Johan Liseborn
Malcolm, Thanks for your reply! On Thu, Feb 14, 2008 at 2:55 AM, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Wed, 2008-02-13 at 14:52 +0100, Johan Liseborn wrote: > > > while my requirement seems to indicate > > that the "site" (or pseudo-domain) should be decided by the logged in

Re: Subclassing Newforms?

2008-02-14 Thread [EMAIL PROTECTED]
I just ended up having a master class with all of the fields, and sub- classed it to three different classes that over-ride the fields that are different for each "mode". The master form class has everything pretty much as required=False. The three children have some of their fields set to

Re: How to serve robots.txt for Django?

2008-02-14 Thread Alex Koshelev
I use something like this: (r'^robots.txt$', 'django.views.static.serve', { 'path' : "/ txt/robots.txt", 'document_root': settings.MEDIA_ROOT, 'show_indexes': False } ), On Feb 14, 10:53 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I built a Django site for my blog and

Re: How to serve robots.txt for Django?

2008-02-14 Thread [EMAIL PROTECTED]
Since it's a static media file, the usual Django recommendation is to not use Django at all. I would suggest adding an entry for it in your web server software to serve the media directly instead of using a Django handler. Also, if you're really set on using Django to serve this, you'll

How to use django.contrib.sitemaps for Django app?

2008-02-14 Thread [EMAIL PROTECTED]
I'm using Django to publish my Web site and blog, and would like to use the sitemaps app that comes with Django. But I can't get the urls or sitemaps file configured right. Here is my sitemaps.py file: from django.contrib.sitemaps import Sitemap from patrickbeeson.apps.blog.models import Entry

How to serve robots.txt for Django?

2008-02-14 Thread [EMAIL PROTECTED]
I built a Django site for my blog and want to serve a robots.txt file for it. But I can't figure out how to go about doing this since it's a static file. Here is what I have in my urls: from patrickbeeson.views import robots ... (r'^robots.txt$', robots), >From the views: from django.http

Re: Subclassing Newforms?

2008-02-14 Thread Malcolm Tredinnick
On Thu, 2008-02-14 at 11:19 -0800, [EMAIL PROTECTED] wrote: > Ok, just gave this a shot and got no errors, but the changes I made in > the child didn't take affect. The code for the parent form and its > child is at: > http://dpaste.com/35195/ Aargh... my eyes! That was the smallest possible

Re: Multiple validation error handling in clean()

2008-02-14 Thread robstar
That worked ! I like that solution much better too! Thanks for your help. Rob On Feb 14, 2:14 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2008-02-14 at 10:54 -0800, robstar wrote: > > Thanks Malcolm, I'll try it out. > > > Some of this feels kind of hack'ey what's the

Re: Subclassing Newforms?

2008-02-14 Thread [EMAIL PROTECTED]
Ok, just gave this a shot and got no errors, but the changes I made in the child didn't take affect. The code for the parent form and its child is at: http://dpaste.com/35195/ It seems like the parent's fields are being defined, then the spectral_required variable. So as far as the child is

Re: Subclassing Newforms?

2008-02-14 Thread Malcolm Tredinnick
On Thu, 2008-02-14 at 11:11 -0800, [EMAIL PROTECTED] wrote: > I haven't checked out django trunk in a few days, it wasn't working > earlier (With a NoneType error). I'll get the latest Django and try it > again with a follow-up. Subclassing ModelForms was fixed in [7115], so you will need the

Re: Multiple validation error handling in clean()

2008-02-14 Thread Malcolm Tredinnick
On Thu, 2008-02-14 at 10:54 -0800, robstar wrote: > Thanks Malcolm, I'll try it out. > > Some of this feels kind of hack'ey what's the correct, clean way > to do this kind of processing with newforms?? Putting an error against two fields simultaneously isn't a very normal practice. You're

Re: Subclassing Newforms?

2008-02-14 Thread [EMAIL PROTECTED]
I haven't checked out django trunk in a few days, it wasn't working earlier (With a NoneType error). I'll get the latest Django and try it again with a follow-up. On Feb 14, 1:41 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2008-02-14 at 10:17 -0800, [EMAIL PROTECTED] wrote: > >

Re: Multiple validation error handling in clean()

2008-02-14 Thread robstar
Thanks Malcolm, I'll try it out. Some of this feels kind of hack'ey what's the correct, clean way to do this kind of processing with newforms?? Rob On Feb 14, 1:49 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2008-02-14 at 10:20 -0800, robstar wrote: > > [...] > > > > >

Re: Multiple validation error handling in clean()

2008-02-14 Thread Malcolm Tredinnick
On Thu, 2008-02-14 at 10:20 -0800, robstar wrote: [...] > I'm not really sure how to process this list in the template.. or how > it gets stored for the correct field. Suppose I have this code in > clean(): > > rc = 0 > if 'captcha' in self.cleaned_data: > if not

Re: Subclassing Newforms?

2008-02-14 Thread Malcolm Tredinnick
On Thu, 2008-02-14 at 10:17 -0800, [EMAIL PROTECTED] wrote: > Is there a good way to sub-class a form that subclasses ModelForm? For > example, I have two forms that use the same field but one requires > certain fields to be required and the other doesn't. > > Am I right to sub-class the first

Re: Multiple validation error handling in clean()

2008-02-14 Thread robstar
Ok, I found some useful info posted by Malcolm: "Form.errors is an ErrorDict (from newforms.util), which maps field names to ErrorList instances. It is important to use ErrorList classes as the values in that dictionary, because they know how to display themselves properly. I'm not really

Subclassing Newforms?

2008-02-14 Thread [EMAIL PROTECTED]
Is there a good way to sub-class a form that subclasses ModelForm? For example, I have two forms that use the same field but one requires certain fields to be required and the other doesn't. Am I right to sub-class the first form or is there a better way to do this?

Re: Multiple validation error handling in clean()

2008-02-14 Thread robstar
Oops, I found some info in search this might answer my question .. thanks anyway ! :) rob On Feb 14, 1:09 pm, robstar <[EMAIL PROTECTED]> wrote: > Hi guys, > > I'm working my way through the newforms and it's pretty cool.. but I'm > stumped on the error message handling from clean(). > >

Multiple validation error handling in clean()

2008-02-14 Thread robstar
Hi guys, I'm working my way through the newforms and it's pretty cool.. but I'm stumped on the error message handling from clean(). I want to check the CAPTCHA input on the page (2 fields) as well as if the password fields match and return the error for each problem independently. clean() is

Re: Reporting with Django

2008-02-14 Thread Brian Rosner
> Interested in generating some simple reports with Django. > > I have a number of text and dateFields and need some sample DB > reports. I could do it myself by designing a page to give me counts - > but would prefer if there was a sweeter way to do it in django. There isn't a sweeter way in

Re: Python & Django Noob at Django Sprint at PyCon 2008?

2008-02-14 Thread Brian Rosner
> I'm new to Python and Django. I will be at the PyCon 2008. I'm > thinking about staying after the talks for the Django Sprint, but I'm > not sure what I can contribute... any suggestion? Excellent! I was in a similar boat as you at last year's PyCon. I was relatively new to Python/Django and

ANN: PyLucid CMS v0.8.0 stable released...

2008-02-14 Thread Jens Diemer
After a long time, we released the first django Version of PyLucid CMS. This is the first stable release, after the big django modification ;) What? = PyLucid is a free content management system. It is written in Python using the Django Web framework. PyLucid has a web based installer,

Re: Deploying django app

2008-02-14 Thread Michael Newman
You can put Django where ever as long as you add it to your python path then. The problem with a lot of these shared hosts is the fact that they don't have mod_python and other requirements that are needed to let django run. Read through this install documentation

Re: shared state between requests and FastCGI

2008-02-14 Thread Robin Becker
Amit Ramon wrote: > Hello, > > I'm developing a site that need to display ads. The ad to display on a page > is selected by a function based on the value of a global state - an > application state that need to be maintained across requests and different > users. In other words, the state is a

Re: Introductory Django Screencasts

2008-02-14 Thread Matthew Miller
this rocks. i especially like the #2 of the series as this helps my web development team; who dont know or care about python,.. thanks for the great screencast. On Thu, Feb 14, 2008 at 10:15 AM, Siddhi <[EMAIL PROTECTED]> wrote: > > Hi, I'm doing a series of basic intro screencasts for Django.

Re: shared state between requests and FastCGI

2008-02-14 Thread Marty Alchin
On Thu, Feb 14, 2008 at 11:31 AM, Alex Koshelev <[EMAIL PROTECTED]> wrote: > > Look at idea behind this: > http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser That will likely fail to work across multiple requests, due to threading and/or multi-process issues. Better yet, check out

Re: shared state between requests and FastCGI

2008-02-14 Thread Alex Koshelev
Look at idea behind this: http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser On Feb 14, 6:40 pm, Amit Ramon <[EMAIL PROTECTED]> wrote: > Hello, > > I'm developing a site that need to display ads. The ad to display on a page > is selected by a function based on the value of a global

shared state between requests and FastCGI

2008-02-14 Thread Amit Ramon
Hello, I'm developing a site that need to display ads. The ad to display on a page is selected by a function based on the value of a global state - an application state that need to be maintained across requests and different users. In other words, the state is a "website singleton". This

Unicode deserialization problem

2008-02-14 Thread buzman
Hi. Long-time reader etc etc I've been tracking down an issue I've been having with deserializing QuerySet objects from memcached, using the django.core.serializers functionality. After trying everything I could think of, I've narrowed down the problem to the fact that memcached is returning

Introductory Django Screencasts

2008-02-14 Thread Siddhi
Hi, I'm doing a series of basic intro screencasts for Django. I've uploaded the third one in the series here - http://showmedo.com/videos/video?name=1100020=110 I'd love any comments & feedback, plus any ideas on which areas of Django you''d like covered in later screencasts. Thanks! --

Re: Where's HttpRequest?

2008-02-14 Thread Alex Koshelev
Hi Built-in `authenticate` function takes `**credentials` parameters that when pass to backend. So if you need request object in backed you have to pass it to built-in function. Examle: from django.contrib import auth def my_view( request ): #... auth.authenticare( username = username,

mod_python + python_mysql

2008-02-14 Thread heru
base on this post http://groups.google.com/group/django-users/browse_thread/thread/aa2eb730e0a1289d/7fae703c26f9b031?#7fae703c26f9b031 are there any solutions regarding this issue? this problem is really unsolved.. please help --~--~-~--~~~---~--~~ You received

Re: Where's HttpRequest?

2008-02-14 Thread Paul Childs
Try reading these http://www.djangoproject.com/documentation/request_response/ http://www.djangoproject.com/documentation/forms/ On Feb 14, 8:55 am, "Hanne Moa" <[EMAIL PROTECTED]> wrote: > I'm writing an authentication-backend and need to check if a cookie > already exists. But: how do I get

Where's HttpRequest?

2008-02-14 Thread Hanne Moa
I'm writing an authentication-backend and need to check if a cookie already exists. But: how do I get ahold of the HttpRequest? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Deploying django app

2008-02-14 Thread Mr.Carra
Hi, I'm wondering if it's possible to deploy custom django application with django embedded? ie that user have to only run install script on they web server and it would "locally" install webaplication. Most users don't have shell access to their webserver and have only one directory to use.

Re: Admin page problem

2008-02-14 Thread django
Thanks I got it fix. On Feb 14, 4:42 pm, Julien <[EMAIL PROTECTED]> wrote: > Well, assuming that your user is stored in the context as "user", the > url "/admin/auth/user/{{ user.id }}/" would point to the standard > admin edit page for that user. > > For adding user, I guess the url would be:

Re: Random UnicodeDecodeError ??

2008-02-14 Thread Pigletto
> no error occured. > > I also recognised this error only occurs on one of my two machines. > the productive one of course! ;) > productive: > ubuntu 6.06, mysql 5.0.22, Python 2.4.3 > develop: > ubuntu 7.10, mysql 5.0.45, Python 2.5.1 > (uses a mysqldump of the productive) Try to add debug code

Django ORM performance patch. Fixes #5420, #5768

2008-02-14 Thread Dima Dogadaylo
I made a patch for Django to add QuerySet.fields(*fields, **related_fields) and make possible to load only some from master and related models fields. It allows to tune various object list queries when we need only limited subset of all fields, improve general performance and decrease database

Re: Admin page problem

2008-02-14 Thread Julien
Well, assuming that your user is stored in the context as "user", the url "/admin/auth/user/{{ user.id }}/" would point to the standard admin edit page for that user. For adding user, I guess the url would be: "/admin/auth/user/add/" ...or maybe I just don't understand what you're after... On

Re: Admin page problem

2008-02-14 Thread django
Hi, I am not getting you. Can u please explain me what my href=? should be for adding user or for editing user. Thanks... On Feb 14, 4:15 pm, Julien <[EMAIL PROTECTED]> wrote: > How about: (assuming > that "model" designates the user...) > > On Feb 14, 10:01 pm, django <[EMAIL PROTECTED]>

Re: Admin page problem

2008-02-14 Thread Julien
How about: (assuming that "model" designates the user...) On Feb 14, 10:01 pm, django <[EMAIL PROTECTED]> wrote: > Hi, > I just want to use admin interface for adding and editing user. > I have a tab for adding and editing user. > But the problem here is how can I direct my tab clicking to

Admin page problem

2008-02-14 Thread django
Hi, I just want to use admin interface for adding and editing user. I have a tab for adding and editing user. But the problem here is how can I direct my tab clicking to django admin add or edit user page. I dont wont to hard code it by writting view function for it. I want to use default django

Re: PostgresSQL v8.3 Non-character data types are no longer automatically cast to TEXT

2008-02-14 Thread sector119
http://code.djangoproject.com/ticket/6605 Malcolm Tredinnick написав: > On Thu, 2008-02-14 at 02:29 -0800, sector119 wrote: > > Due to subject it's not longer possible to use iexact, icontains, > > istartswith, iendswith lookup_type in lookup type with int4, int8, ... > > filed types! > > > >

Re: PostgresSQL v8.3 Non-character data types are no longer automatically cast to TEXT

2008-02-14 Thread Malcolm Tredinnick
On Thu, 2008-02-14 at 02:29 -0800, sector119 wrote: > Due to subject it's not longer possible to use iexact, icontains, > istartswith, iendswith lookup_type in lookup type with int4, int8, ... > filed types! > > May be we have to add something like this to the db/models/query.py >

Re: PostgresSQL v8.3 Non-character data types are no longer automatically cast to TEXT

2008-02-14 Thread sector119
OR ... if lookup_type in ('iexact', 'icontains', 'istartswith', 'iendswith'): format = '%s::text %s' if connection.needs_upper_for_iops: format = 'UPPER(%s::text) %s' else: format = '%s %s' On 14 Лют, 12:29, sector119 <[EMAIL PROTECTED]> wrote: > Due

Re: Initial Value for AutoField

2008-02-14 Thread Malcolm Tredinnick
On Thu, 2008-02-14 at 15:49 +0530, Sairam Krishnamurthy wrote: > Hi, > > I need to specify an initial value for for an AutoField. Is there a > way of doing it? You will need to manually tell the database to update its internal counter. AutoField values are managed by the database. How you do

PostgresSQL v8.3 Non-character data types are no longer automatically cast to TEXT

2008-02-14 Thread sector119
Due to subject it's not longer possible to use iexact, icontains, istartswith, iendswith lookup_type in lookup type with int4, int8, ... filed types! May be we have to add something like this to the db/models/query.py get_where_clause: if lookup_type in ('iexact', 'icontains', 'istartswith',

Initial Value for AutoField

2008-02-14 Thread Sairam Krishnamurthy
Hi, I need to specify an initial value for for an AutoField. Is there a way of doing it? Or can somebody refer me how to find the fields of classes like AutoField? Thanks, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Setting request.GET when sending an HttpResponse

2008-02-14 Thread Malcolm Tredinnick
On Thu, 2008-02-14 at 01:33 -0800, shabda wrote: > Umm, if you want to persist state across HTTP requests, why not use > session? One reason is that sessions aren't bookmarkable. RESTful design calls for using URLs intelligently and not hiding a lot of stuff behind a cookie, where it's not

Re: Setting request.GET when sending an HttpResponse

2008-02-14 Thread Malcolm Tredinnick
On Thu, 2008-02-14 at 01:28 -0800, mario wrote: > Etienne, thanks for answering, > > > I believe you got this wrong a little. A HttpResponse object doesn't modify > > the query string. That should be done in your form markup, > > or even in a javascript file, in case you want to do it

Reporting with Django

2008-02-14 Thread Aldo
Interested in generating some simple reports with Django. I have a number of text and dateFields and need some sample DB reports. I could do it myself by designing a page to give me counts - but would prefer if there was a sweeter way to do it in django.

Re: How to return Admin to previous filters after save?

2008-02-14 Thread yml
Not a solution but a workaround. I had exactly the same problem as a user, I solved it by bookmarking the right url. --yml On 14 fév, 03:50, cyberjack <[EMAIL PROTECTED]> wrote: > I have an admin interface managing a few thousand records. Finding a > record requires heavy use of multiple

Re: What are the advantages of using Django for building things like blogs and CMS?

2008-02-14 Thread yml
Hello, I would also add this list of resources: - http://www.djangosites.org/with-source/ Chance are good that someone has already solved your problem. --yml On 14 fév, 01:58, Doug B <[EMAIL PROTECTED]> wrote: > > Basically I'm looking for some users to placate my fear that I'll run > > into

Re: Setting request.GET when sending an HttpResponse

2008-02-14 Thread shabda
Umm, if you want to persist state across HTTP requests, why not use session? On Feb 14, 2:28 pm, mario <[EMAIL PROTECTED]> wrote: > Etienne, thanks for answering, > > > I believe you got this wrong a little. A HttpResponse object doesn't modify > > the query string. That should be done in your

Re: Setting request.GET when sending an HttpResponse

2008-02-14 Thread mario
Etienne, thanks for answering, > I believe you got this wrong a little. A HttpResponse object doesn't modify > the query string. That should be done in your form markup, > or even in a javascript file, in case you want to do it programmatically. Yes, I understand that a HttpResponse cannot

Re: Random UnicodeDecodeError ??

2008-02-14 Thread Meista
thanks for the fast reply. I put the lines into my app: first request: [2008-02-14 Thu 09:48:57]DEBUG "Admin Gui: 'Mike'" [2008-02-14 Thu 09:48:57]DEBUG "Trying akt_Firma =1" BANG! second request: [2008-02-14 Thu 09:49:01]DEBUG "Admin Gui: 'Mike'" [2008-02-14 Thu 09:49:01]DEBUG "Trying

Newfroms - How to get the id for a field

2008-02-14 Thread shabda
When using newforms, I want to get the id set on the input field. I am doing something like, {% for field in form %} {{ field }} ... Now this {{field}} will render as something like, Withing the template how can I access the value for id. If this is not possible where in code does Django set

Re: how to set initial value for select multiple

2008-02-14 Thread Matt McClanahan
On Feb 13, 9:34 pm, cschand <[EMAIL PROTECTED]> wrote: > My problem is i want to set initial value for the given network > CheckboxSelectMultiple field.. Since it's a multiple value field, it expects a list of initial values. NetworkForm(initial={'network': [1,2,3]}) Matt

Re: Xcode as Django IDE

2008-02-14 Thread Oscar Carlsson
I mostly use textmate, but I know that (Mac)Vim with omnicompletion and snippetsEmu is quite usable. http://code.djangoproject.com/wiki/UsingVimWithDjango Oscar On Wed, Feb 13, 2008 at 01:57:38PM -0800, zombat wrote: > > Hi Djangonauts. > > I was looking around for a good IDE for the Mac

Re: Random UnicodeDecodeError ??

2008-02-14 Thread Malcolm Tredinnick
On Wed, 2008-02-13 at 23:59 -0800, Meista wrote: > Hi, > > im getting a UnicodeDecodeError in my application. > The strange thing is that it appears on the very first request after a > restart. > Then everything works fine but the error appears sporadic over the > day. > The app runs as