Re: Class Attribute in New Forms Input Elements

2007-11-20 Thread James Bennett
On 11/21/07, Cristian <[EMAIL PROTECTED]> wrote: > I've been using the old forms for a while but I'm starting to move > over to the new forms module. One difference that's annoying me is the > lack of the class attribute in the input tags. I use the class tags in > my CSS to change colors and widt

Re: Different behaviour for url parameter in dev run versus test run

2007-11-20 Thread Manoj Govindan
I have raised a ticket for this problem. http://code.djangoproject.com/ticket/5982 I have added the relevant code snippets there. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Class Attribute in New Forms Input Elements

2007-11-20 Thread Cristian
Hi, I've been using the old forms for a while but I'm starting to move over to the new forms module. One difference that's annoying me is the lack of the class attribute in the input tags. I use the class tags in my CSS to change colors and widths. Is there a way to add those back in (without hav

dont open its secret

2007-11-20 Thread cute
dont open its secret http://diribon.googlepages.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 this g

Re: weird "can't adapt" error

2007-11-20 Thread Michael
Thanks Thomas... your shot in the dark hit it's mark for me :) I was suffering the same "can't adapt" psycopg2 error (worked fine with sqlite), but it was due to the exact reason you stated. Although your solution is probably better in the long run, another solution is to simply convert the resu

Re: starting point?

2007-11-20 Thread gmacgregor
On Nov 20, 3:08 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > thanks! hopefully my webhoster allows all the needed .htaccess stuff. > but it sounds promising... > > how can i figure out if my webhoster uses fastcgi? can this info be > printed with a simple script? Take a look at the docume

Re: Python Question - How to show the last few elements in a list

2007-11-20 Thread Greg
Todd, Yep..it worked. request.session['prod'][-7:]. Thanks On Nov 20, 9:56 pm, "Todd O'Bryan" <[EMAIL PROTECTED]> wrote: > Have you tried request.session['prod'][-7:] ? > > If that doesn't work, try list(request.session['prod'])[-7:] > > Todd > > On Nov 20, 2007 10:52 PM, Greg <[EMAIL PROTECTED

Re: Python Question - How to show the last few elements in a list

2007-11-20 Thread Todd O'Bryan
Have you tried request.session['prod'][-7:] ? If that doesn't work, try list(request.session['prod'])[-7:] Todd On Nov 20, 2007 10:52 PM, Greg <[EMAIL PROTECTED]> wrote: > > Hello, > I have a session variable. Whenever anybody adds a product to this > session variable it gets stored like so: >

Re: weird "can't adapt" error

2007-11-20 Thread [EMAIL PROTECTED]
This is just a shot in the dark, but I just solved a similar problem that just popped up for me. I noticed that you are creating slugs for your object near where the error happens. I had the exact same error happen when creating slugified names. It turned out that I was calling the built-in slu

Python Question - How to show the last few elements in a list

2007-11-20 Thread Greg
Hello, I have a session variable. Whenever anybody adds a product to this session variable it gets stored like so: request.session['prod'].append(b) This can make my session variable look like this: [, , , ] // I want to show the last 7 elements in my list, Occassionally my list

case errors in transition to OSX

2007-11-20 Thread [EMAIL PROTECTED]
Hi, I just transitions development machines from Ubuntu to OS X. I noted that urls weren't processing correctly. For example, domain.com/createAccount would show an error in the debugging output because createaccount matched none of the patterns in urls.py. Somewhere along the lines, the url wa

Re: File upload virus scanning

2007-11-20 Thread Marty Alchin
On 11/20/07, Vance Dubberly <[EMAIL PROTECTED]> wrote: > > Before it's saved to a file... that would be tricky. > > But this might get you started: http://www.clamav.net/ . It'll run a > daemon though I don't know if it opens sockets or ports... If there are Python bindings for it, the upcoming

Re: File upload virus scanning

2007-11-20 Thread Marty Alchin
For the record, pyClamd[1] does look promising, as it supports scanning streams as well as files. Even before the filestorage stuff lands, you might want to check it out. -Gul [1] http://xael.org/norman/python/pyclamd/ --~--~-~--~~~---~--~~ You received this mess

Re: Street address normalisation

2007-11-20 Thread Don Arbow
On Nov 20, 2007, at 3:18 PM, Jeremy Dunck wrote: > > On Nov 20, 2007 3:26 PM, hajo <[EMAIL PROTECTED]> wrote: >> >> Thanks a lot; will defintely look into this one! >> The other solution I looked at was to send an address to google (We >> have a commercial deal with them; I work for a failry large

Re: File upload virus scanning

2007-11-20 Thread Vance Dubberly
Before it's saved to a file... that would be tricky. But this might get you started: http://www.clamav.net/ . It'll run a daemon though I don't know if it opens sockets or ports... Vance On Nov 20, 2007 2:22 PM, leifbyron <[EMAIL PROTECTED]> wrote: > > Hi there, > > Is anyone aware of a comma

Re: Custom ManyToManyField widget in admin

2007-11-20 Thread Julien
Thanks again Kamil for your help! Ok, now I'm trying to put everything together. Sorry I'm just starting with Django and I am still a bit lost. What I am not sure about is: - where to put the view? - how to hook the view to the model - how to hook the template with the view. Could you provide a

Re: Custom ManyToManyField widget in admin

2007-11-20 Thread kamil
You would achieve it using "regroup" template tag First get cities in your view and create template with code: var countries = { {% regroup cities by country as grouped %} {% for group in grouped %} "{{ group.grouper.name }}: [ {% for city i

question about list_display

2007-11-20 Thread Lucemia
hello every one: I have a simple question about list_display feature of Django's admin site http://www.djangoproject.com/documentation/model-api/#admin-options class Person(models.Model): first_name = models.CharField(max_length=50) color_code = models.CharField(max_length=6) class

Re: Freenode and django related channels

2007-11-20 Thread Kenneth Gonsalves
On 20-Nov-07, at 10:01 PM, ikks wrote: > freenode, it's called #django-es , I would like to know if someone > nicknamed dashinho is on the list he was regular on english IRC channel about a year back -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ --~--~

Re: Street address normalisation

2007-11-20 Thread Jeremy Dunck
On Nov 20, 2007 3:26 PM, hajo <[EMAIL PROTECTED]> wrote: > > Thanks a lot; will defintely look into this one! > The other solution I looked at was to send an address to google (We > have a commercial deal with them; I work for a failry large > newspaper); get it geocoded and then go from there...

Re: Django rocks: Key Ingredient

2007-11-20 Thread gordyt
Very nice site Jesse! Just created an account and posted my first recipe. --g --~--~-~--~~~---~--~~ 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

Re: using make-messages in native non-english site

2007-11-20 Thread Malcolm Tredinnick
On Tue, 2007-11-20 at 14:20 -0800, shaunc wrote: > Can I use make-messages to create english translation files for a site > that is originally written in something other than english? I don't > see how the "source" language is specified. There's not really a concept of "source language" with get

Re: How to access method parameters

2007-11-20 Thread keithb
getattr returns a function, so you want to be sure to call it before calling split. var2 = var().split('\\')[1] -keithb Greg wrote: > I tired doing that. However I guess the end result for var is > different for each way: > > var = getattr(self, 'get_%s_filename' % shape) > var = self.get_

Re: How to access method parameters

2007-11-20 Thread Greg
I tired doing that. However I guess the end result for var is different for each way: var = getattr(self, 'get_%s_filename' % shape) var = self.get_round_filename() Because, after I assign var I do the following: var2 = var.split('\\')[1] When I use 'var = geta

File upload virus scanning

2007-11-20 Thread leifbyron
Hi there, Is anyone aware of a command-line tool that can be used to scan file uploads for viruses before they are saved to a file? I know this is not specifically a Django question, but I'm sure a lot of people would find the answer useful. Thanks, Leif --~--~-~--~~~-

using make-messages in native non-english site

2007-11-20 Thread shaunc
Can I use make-messages to create english translation files for a site that is originally written in something other than english? I don't see how the "source" language is specified. Thanks, - Shaun --~--~-~--~~~---~--~~ You received this message because you are su

Re: weird "can't adapt" error

2007-11-20 Thread Jarek Zgoda
OK, filed a ticket, but really I do not have any idea as what might be "usable information" in this case, just copied what I posted here. What makes me thinking there's a bug somewhere, is that the code works for psycopg and sqlite3, but fails for psycopg2. On 20 Lis, 22:06, "Jeremy Dunck" <[EMAI

Re: Complicated question

2007-11-20 Thread Grupo Django
On 20 nov, 21:54, RajeshD <[EMAIL PROTECTED]> wrote: > > That's interesting, but I think that leaving the models untouched > > would be better. > > Do you think there is a different way? > > There might be. First, you'd have to explain what you didn't like > about doing queries like: > > Image.obj

Re: how fixtures can be load in django tests?

2007-11-20 Thread michel bruavics
On 20 Nov., 17:37, "Joseph Kocherhans" <[EMAIL PROTECTED]> wrote: > On 11/20/07, michel bruavics <[EMAIL PROTECTED]> wrote: > > > > > > > Hi djangos, > > > I check out the django.test.client and want to load a fixture file > > called "myfixture.xml". > > > I added in my project setting a folder

Re: Street address normalisation

2007-11-20 Thread hajo
Thanks a lot; will defintely look into this one! The other solution I looked at was to send an address to google (We have a commercial deal with them; I work for a failry large newspaper); get it geocoded and then go from there... The issue here is one of time... Hajo On Nov 20, 12:38 pm, Tim Ch

Re: weird "can't adapt" error

2007-11-20 Thread Jeremy Dunck
"Can't adapt" is quite a vague error that psycopg2 issues. Your issue is (apparently) something to do with encoding, and that's different than Sandro's issue. Please include more information, especially if you do decide to file a ticket. I can't help with the info given so far... On Nov 20, 200

Re: weird "can't adapt" error

2007-11-20 Thread Jeremy Dunck
On Oct 26, 2007 2:47 AM, sandro dentella <[EMAIL PROTECTED]> wrote: ... > > once again I stumble into this problem. This time I gathered some > more > info so I describe them. http://groups.google.com/group/django-users/browse_thread/thread/091aa6c088f6c090 I understand you're running wsgi r

Re: weird "can't adapt" error

2007-11-20 Thread Jarek Zgoda
The problem in my case seems to be strictly related to psycopg2 backend. I tried with psycopg and it does not happens. Should I file a ticket? On 20 Lis, 10:17, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > I just started receiving the same problem when I try to save an object > that has non-ASCII va

Re: Complicated question

2007-11-20 Thread RajeshD
> > That's interesting, but I think that leaving the models untouched > would be better. > Do you think there is a different way? There might be. First, you'd have to explain what you didn't like about doing queries like: Image.objects.filter( book__library_owner=request.user) Since you don't w

Re: postgresql problem with django api (iregex)

2007-11-20 Thread Malcolm Tredinnick
On Tue, 2007-11-20 at 05:12 -0800, cesco wrote: > Thanks for the reply. > I'm actually trying to match a word boundary with "\\b" before and > after the string, not a backspace. Still one thing is unclear to me: > isn't the django API supposed to be portable across different database > platforms?

Re: Error Handeling

2007-11-20 Thread Malcolm Tredinnick
On Tue, 2007-11-20 at 02:22 -0800, Rufman wrote: > Hey > > I know that django has error handlers for errors 404 and 500. > My question: Could I just make my own handler and add it to the > defaults in django.conf.urls.defaults? (for example 403 Forbidden) The question doesn't make sense. 404 an

Re: choices option in input-field

2007-11-20 Thread Malcolm Tredinnick
On Tue, 2007-11-20 at 00:19 -0800, Nader wrote: > Hallo, > > I have a model in which I have to use a input-field with choices > option. > > ACCESS = ( > ('RO', 'readonly'), > ('WO', 'writeonly'), > ('RW', 'readwrite'), > ) > > Class myClass (...) >.. >... >activ

Re: problem with "python manage.py shell"

2007-11-20 Thread Marty Alchin
On Nov 20, 2007 3:36 PM, Nader <[EMAIL PROTECTED]> wrote: > I have looked at my system and found that I has installed also > Python-2.4.4 and IPython. I have firstly uninstalled Python-2.4.4 and > tried once more the same command "python manage.py shell'' in project > directory. I have got the sam

Re: Complicated question

2007-11-20 Thread Grupo Django
RajeshD ha escrito: > From what I understand, you want a generic ability to declare an owner > item for any model object. > > Django's generic relations work that way. Take a look at the examples > here: > > http://www.djangoproject.com/documentation/models/generic_relations/ > > Specially, instea

Re: ImageField file naming

2007-11-20 Thread Marty Alchin
On Nov 20, 2007 3:33 PM, Chris Hoeppner <[EMAIL PROTECTED]> wrote: > It would be nice to be able to include this in the upload_to parameter. > Something like > 'upload/%(model_name)s/%(instance_id)s.%(mimetype_extension)s' perhaps? > Maybe, if the parameter ends with a slash, the handler could kno

Re: problem with "python manage.py shell"

2007-11-20 Thread Nader
I have looked at my system and found that I has installed also Python-2.4.4 and IPython. I have firstly uninstalled Python-2.4.4 and tried once more the same command "python manage.py shell'' in project directory. I have got the same problem. Then I have uninstalled the IPython also, and the prob

ImageField file naming

2007-11-20 Thread Chris Hoeppner
Hi there! I've seen this in patches and stuff before, but most don't work anymore. Perhaps some Django-insider could advice me how to make Django rename uploaded files according to some schema when saving them to disk? Preserving the original filename is ok for most cases, but sometimes it just

Re: Complicated question

2007-11-20 Thread Grupo Django
On 20 nov, 20:46, RajeshD <[EMAIL PROTECTED]> wrote: > From what I understand, you want a generic ability to declare an owner > item for any model object. > > Django's generic relations work that way. Take a look at the examples > here: > > http://www.djangoproject.com/documentation/models/generic

Re: problem with "python manage.py shell"

2007-11-20 Thread Marty Alchin
Well, all that tells me is that you're running Python 2.5, which i already knew from the nature of your error message. Allow me to rephrase. The message you saw *is expected* under Python 2.5. The code you listed probably worked before, but it *will not work* in Python 2.5 or future versions of P

Re: problem with "python manage.py shell"

2007-11-20 Thread Nader
It is a Linux machine with a Gentoo and Python in this is: #pyhton Python 2.5.1 (r251:54863, Oct 26 2007, 01:35:31) [GCC 4.1.2 (Gentoo 4.1.2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. On Nov 20, 9:01 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > On Nov 2

Re: starting point?

2007-11-20 Thread [EMAIL PROTECTED]
thanks! hopefully my webhoster allows all the needed .htaccess stuff. but it sounds promising... how can i figure out if my webhoster uses fastcgi? can this info be printed with a simple script? On Nov 20, 8:28 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 11/20/07, [EMAIL PROTECTED] <[EMA

Re: How to define choices that works in admin interface?

2007-11-20 Thread Gabriel Farrell
I'll second Christian Joergensen by saying that foreign key fields are the way to go here, rather than choices hacks. Put those types in another table. gsf On Nov 20, 12:16 pm, David Marko <[EMAIL PROTECTED]> wrote: > Using this I could create a static list only. But what I mean is > dynamic li

Re: problem with "python manage.py shell"

2007-11-20 Thread Marty Alchin
On Nov 20, 2007 2:22 PM, Nader <[EMAIL PROTECTED]> wrote: > If I use the "python manage.py shell" to go to shell, I got the next > message: > > _builtin__.exit += _exit > TypeError: unsupported operand type(s) for +=: 'Quitter' and 'str' > > It is actually part of error. > Some idea what the probl

Re: local dev them publish out to the real world

2007-11-20 Thread RajeshD
> hey I am new to django? Welcome. > so is it possable to devlop a django site on my mac and then publish > to another webserver or EC2/S3 Yes, not only is it possible but it happens to be the most common case: develop on your workstation (Mac, Windows, Linux, doesn't matter) and then push to a

Re: Include tag - encoding

2007-11-20 Thread Gabriel Farrell
I don't know details on this, but there have been a lot of improvements to the Unicode handling in versions since 0.96, so an obvious suggestion would be to upgrade to the latest Subversion trunk. That will most likely solve your problem. gsf On Nov 20, 12:09 pm, cwurld <[EMAIL PROTECTED]> wrot

Re: Complicated question

2007-11-20 Thread RajeshD
>From what I understand, you want a generic ability to declare an owner item for any model object. Django's generic relations work that way. Take a look at the examples here: http://www.djangoproject.com/documentation/models/generic_relations/ Specially, instead of TaggedItem in that example, y

Free Mp3 Songs Download(www.mp3songshome.com)

2007-11-20 Thread Ahsan
mp3songshome.com Mp3 Songs Home Music is your source for legal and free MP3 downloads.ALL latest English, Spanish , Greek, hindi and pakistani mp3 songs. Download MP3s from thousands of artists. Free Indian , pakistani , English and spanish Mp3 Songs Download . Listen Online and Download for free

Re: starting point?

2007-11-20 Thread Gabriel Farrell
Hi Horace, Depending on your webhost, you will need to use fastcgi or mod- python. See http://wiki.dreamhost.com/index.php/Django as an example -- therein are the steps necessary to get Django running on DreamHost, a large webhost that supports fastcgi. Also see http://www.djangoproject.com/doc

Re: starting point?

2007-11-20 Thread James Bennett
On 11/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > but what i don't understand yet... if i move this to a webhoster, > where is the starting point then? isn't there some index.cgi needed or > so? or how will the server know that a certain url is supposed to be > handled by django? The tu

problem with "python manage.py shell"

2007-11-20 Thread Nader
If I use the "python manage.py shell" to go to shell, I got the next message: _builtin__.exit += _exit TypeError: unsupported operand type(s) for +=: 'Quitter' and 'str' It is actually part of error. Some idea what the problem is? Regards, --~--~-~--~~~---~--~~

local dev them publish out to the real world

2007-11-20 Thread sebey
hey I am new to django? so is it possable to devlop a django site on my mac and then publish to another webserver or EC2/S3 would I face any problems along the way? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

starting point?

2007-11-20 Thread [EMAIL PROTECTED]
hi, i am currently doing the tutorial. i am at the middle of part 3 and quickly skimmed through the rest of 3 and 4 already. so far so good. it works great locally and with django's own simple server. but what i don't understand yet... if i move this to a webhoster, where is the starting point

Complicated question

2007-11-20 Thread Grupo Django
Hello, I'm programing a kind of admin zone for users, where users can add, manage and delete objects. I want to do it generic, but I have a big problem now. Imagine these models: from django.contrib.auth.models import User class Library ( models.model ): library_name = models.CharField(..)

Re: How to create groups from code?

2007-11-20 Thread Artiom Diomin
take a look here http://www.djangoproject.com/documentation/model-api/#providing-initial-sql-data PS: note, you can different formats for inial data, I'm for example using pyyaml (it's database backend independent) Jose Jiménez пишет: > Hello everybody, > > I'm starting a project in django. I ne

Re: Street address normalisation

2007-11-20 Thread Tim Chase
> I have an issue with users doing a lookup on street address. [snip] > This seems like asuch a common problem; are there any > libraries for this; what is the "correct" way to handle this? > How do google; Mapquest and Yahoo do this? (I don't have quite > their resources; but it would point me in

Street address normalisation

2007-11-20 Thread hajo
I have an issue with users doing a lookup on street address. the issue is the following: If the address the user wants is 123A mockingird st. It'll mess up on street; str. etc... My solution was to only look at the first "word" in the search box; So if you have a mockingbird Lane and a mockingb

Re: How to define choices that works in admin interface?

2007-11-20 Thread David Marko
Using this I could create a static list only. But what I mean is dynamic list based on database query. I have the following model for keeping the list of different choices . class Choice(models.Model): TYPES = ( ('os_type','OS Types'), ('os_type','OS Types'), ) type =

Include tag - encoding

2007-11-20 Thread cwurld
Hi, I have a block of text that I load into a webpage using an {% include %} tag. I have two versions of the include file. One in English, the other in Spanish. I have no problem loading either one. However the Spanish characters in the Spanish file are not displayed properly. I tried putti

Re: Spam mail in forms

2007-11-20 Thread James Bennett
On 11/20/07, Rufman <[EMAIL PROTECTED]> wrote: > Is there some way to stop (reduce) the spam I get through a form? I > was thinking of making a dropdown (html select) with a selection of > subjects. Then I could easily define rules. I I guess dropdown menus > are bit readable. I use Akismet on my

Re: queryset-refactor branch merge

2007-11-20 Thread MichaelMartinides
Thanks for the information! Low level worked for me :-) Keep up the good work! >>MM On Nov 20, 12:48 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2007-11-19 at 08:50 -0800, MichaelMartinides wrote: > > Hi James, > > > I entirely understand your point. > > > But for users as me,

How to create groups from code?

2007-11-20 Thread Jose Jiménez
Hello everybody, I'm starting a project in django. I need some custom permissions that i created in the model with "class Meta". Now i need to create some groups. I've seen that i can create groups from the administration panel, but... i would like to create from source code, so, if other person

Re: how fixtures can be load in django tests?

2007-11-20 Thread Joseph Kocherhans
On 11/20/07, michel bruavics <[EMAIL PROTECTED]> wrote: > > Hi djangos, > > I check out the django.test.client and want to load a fixture file > called "myfixture.xml". > > I added in my project setting a folder (called fixtures): > FIXTURE_DIRS = ('/workspace/project/fixtures/') > > myfixture.xml

Freenode and django related channels

2007-11-20 Thread ikks
Hi, some spanish speakers folks are resurrecting a channel on freenode, it's called #django-es , I would like to know if someone nicknamed dashinho is on the list. Or is there a django-freenode agreement ongoing for the django related channels. /msg chanserv info #django-es -ChanServ- Chan

Re: How to define choices that works in admin interface?

2007-11-20 Thread Michael
The following worked for me: model field: type = models.CharField(max_length=10, radio_admin=True, choices=CHOICE_LIST) where CHOICE_LIST is a tuple of tuples, defined inside the model if local, outside if you need it in multiple models, like: CHOICE_LIST = (('dbasename1', 'displayname1'), ('db

Django rocks: Key Ingredient

2007-11-20 Thread [EMAIL PROTECTED]
Hi all, I just wanted to let you all know that we've recently opened up http://keyingredient.com/ -- we're using django (+linux,memcached,mysql,sphinx,perlbal,pound...) and things are running pretty smoothly so far. The site lets you find, add, and collect recipes but also goes one step further a

Re: How to access method parameters

2007-11-20 Thread Tim Chase
> self.create(50, 50, "round") > > def create(self, wsize, hsize, shape): > var = self.get_shape_filename() > etc > > /// > > I get an error whenever it hits the line 'var = > self.get_shape_filename()'. The error is: > > object has no attribute 'get_shape_file

Re: How to access method parameters

2007-11-20 Thread Marty Alchin
On Nov 20, 2007 10:24 AM, Greg <[EMAIL PROTECTED]> wrote: > self.create(50, 50, "round") > > def create(self, wsize, hsize, shape): > var = self.get_shape_filename() > > In the above case I'm sending 'round' to the method. So it's supposed > to be get_round_filename. Well, to be fair, it

How to access method parameters

2007-11-20 Thread Greg
Hello, I have the following code in one of my classes self.create(50, 50, "round") def create(self, wsize, hsize, shape): var = self.get_shape_filename() etc /// I get an error whenever it hits the line 'var = self.get_shape_filename()'. The error is: object h

Re: Spam mail in forms

2007-11-20 Thread Marcin Mierzejewski
Hi Rufman, You can use third part software like http://recaptcha.net/ or you can use this idea to write something similar. Regards, Marcin On Nov 20, 4:15 pm, Rufman <[EMAIL PROTECTED]> wrote: > Hey Guys > > Is there some way to stop (reduce) the spam I get through a form? I > was thinking of

Re: Django / Apache Problem (ignores SetHandler)

2007-11-20 Thread Nils Herzog
Hi Marcin, > You can use django.views.static.serve. > In my application I have the following link in my urls.py But this is not good for my production server. Quote from http://www.djangoproject.com/documentation/static_files/ "Using this method is inefficient and insecure. Do not use this in

Spam mail in forms

2007-11-20 Thread Rufman
Hey Guys Is there some way to stop (reduce) the spam I get through a form? I was thinking of making a dropdown (html select) with a selection of subjects. Then I could easily define rules. I I guess dropdown menus are bit readable. Any suggestions? Stephane Rufer --~--~-~--~~--

Re: Django / Apache Problem (ignores SetHandler)

2007-11-20 Thread Marcin Mierzejewski
Hi, You can use django.views.static.serve. In my application I have the following link in my urls.py (r'^css/(?P.*)$', 'django.views.static.serve', {'document_root': '%s/templates/css' % APPLICATION_ROOT }), (r'^javascript/(?P.*)$', 'django.views.static.serve', {'document_root': '%s/templates/ja

Django / Apache Problem (ignores SetHandler)

2007-11-20 Thread idioglossiahh
Hi everybody, There are lots of discussions on the internet concerning this topic - but I couldn't find any information that helped me. I know that this is not necessarily a Django topic but perhaps there are more people here who find this information helpful. I am trying to get my Djano proje

Re: prepopulate_from delimiter

2007-11-20 Thread RajeshD
On Nov 20, 1:11 am, Mogga <[EMAIL PROTECTED]> wrote: > great article... very interesting and answered some old questions... > not using it for URLS... > i'm developing some file system mgmt tools for software packages that > don't like hyphens. i'll have to hack the slugifier or create my own >

Re: using "select_related" .Does it works?

2007-11-20 Thread RajeshD
> The docs say select_related() does not follow foreign keys that have > null=True. In your example it would do nothing. > It would. As Samuel points out, select_related's only job is to save you some database trips. The examples I cooked up above will work fine with or without select_related().

Re: postgresql problem with django api (iregex)

2007-11-20 Thread Jeremy Dunck
On Nov 20, 2007 7:12 AM, cesco <[EMAIL PROTECTED]> wrote: ... > isn't the django API supposed to be portable across different database > platforms? Does iregex make an exception because of SQLite lack of reg- > exp support? It tries, but isn't heroic. The options for total portability would be e

how fixtures can be load in django tests?

2007-11-20 Thread michel bruavics
Hi djangos, I check out the django.test.client and want to load a fixture file called "myfixture.xml". I added in my project setting a folder (called fixtures): FIXTURE_DIRS = ('/workspace/project/fixtures/') myfixture.xml is inside of the folder fixtures. now I try to load the fixture in my t

Re: How to define choices that works in admin interface?

2007-11-20 Thread Christian Joergensen
David Marko wrote: > How to define choices for filed that works in admin interface? When I > define CharField as below, the list of choices is computed intially > and doesn't refresh when data changes in Choices table. > > type = models.CharField(verbose_name='Type', maxlength=30, choices = > Cho

Consistency between Django syndication framework & generic views (at least)

2007-11-20 Thread [EMAIL PROTECTED]
Hello, After reading and viewing the screencast on syndication framework [1], I let a comment on the site where the "obj" comes from ? Michael points me to the right url and the answer in the doc [2] [1] [2]

Re: postgresql problem with django api (iregex)

2007-11-20 Thread cesco
Thanks for the reply. I'm actually trying to match a word boundary with "\\b" before and after the string, not a backspace. Still one thing is unclear to me: isn't the django API supposed to be portable across different database platforms? Does iregex make an exception because of SQLite lack of re

How to define choices that works in admin interface?

2007-11-20 Thread David Marko
How to define choices for filed that works in admin interface? When I define CharField as below, the list of choices is computed intially and doesn't refresh when data changes in Choices table. type = models.CharField(verbose_name='Type', maxlength=30, choices = Choice.filter(""), null=False,

Re: Custom ManyToManyField widget in admin

2007-11-20 Thread Julien
Hi, When I look at the html source code generated for the regular ManyToManyField's widget, it's an html form, not javascript... Are you sure there is no other way? Could you please give a full example? I've spent quite sometime practicing with the tutorials but I'm a bit lost on this one. Tha

Re: Custom methods for ManyToManyManager

2007-11-20 Thread Tomi Pieviläinen
> I've been hacking some filtering for related managers, have a look at > the BoxManager > here:http://django-pm.googlecode.com/svn/trunk/myproject/pm/models.py Thanks for food for thoughts. Looking at your code got me thinking and in the end my problem was really simple. I was using the example

Error Handeling

2007-11-20 Thread Rufman
Hey I know that django has error handlers for errors 404 and 500. My question: Could I just make my own handler and add it to the defaults in django.conf.urls.defaults? (for example 403 Forbidden) Thanks Stephane --~--~-~--~~~---~--~~ You received this message be

Re: Custom ManyToManyField widget in admin

2007-11-20 Thread kamil
I dont think there is another way that making your hands dirty with javascript. ;) If you want to be fancy you can even make it ajax - getting the cities on demand On Nov 20, 9:35 am, kamil <[EMAIL PROTECTED]> wrote: > You can easily generate cities list to the javascript dynamically > writing th

Re: Who wants to work when money comes for free

2007-11-20 Thread cschand
Hi Salim Please stop these type of stupid ads here On Nov 20, 2:38 pm, Salimc <[EMAIL PROTECTED]> wrote: > Dear All, > > Finally a program that seriously pays for just watching the adds. > You have to just click the links in their system and watch the add for > 30 seconds and that's it your a

Who wants to work when money comes for free

2007-11-20 Thread Salimc
Dear All, Finally a program that seriously pays for just watching the adds. You have to just click the links in their system and watch the add for 30 seconds and that's it your account will have the allocated for that ad. Simple and sweet. It is really that easy. get a huge earning cheque

Get free $3 to sign up and then sky is the limit

2007-11-20 Thread Salimc
Dear All, Finally a program that seriously pays for just watching the adds. US$ 3 free for just signing up. You have to just click the links in their system and watch the add for 30 seconds and that's it your account will have the allocated for that ad. You wanna earn more refer to others a

Re: Custom ManyToManyField widget in admin

2007-11-20 Thread kamil
You can easily generate cities list to the javascript dynamically writing the template for separate js file. On Nov 20, 9:22 am, Julien <[EMAIL PROTECTED]> wrote: > Hi Kamil, > > Thanks a lot for your suggestion! > > I have a few remarks though. The list of cities is dynamic, in the > sense tha

Re: weird "can't adapt" error

2007-11-20 Thread Sandro Dentella
On Tue, Nov 20, 2007 at 01:17:50AM -0800, Jarek Zgoda wrote: > > I just started receiving the same problem when I try to save an object > that has non-ASCII values in char field (the values are all properly > decoded to unicode)> This seems related to psycopg2 backend, as I do > not observe such

Re: Custom ManyToManyField widget in admin

2007-11-20 Thread kamil
Hi Julien The simple way is hijack city select box with javascript. You add js=['http://here comes path to your script'] to admin options in your model js can look like this: var countries = {'england': ['London','Manchester'], 'france': ['Paris'] } document.forms['your_form'].id_country.onchan

Re: using "select_related" .Does it works?

2007-11-20 Thread Samuel Adam
The purpose of select_related() is to limit the number of connections to the database server. An analogy would be that if you have a webpage with 4 CSS file inclusions ( >> from pm.models import Message >>> from django.db import connection >>> message = Message.objects.get(pk=1) >>> '%s sent a me

Re: Custom ManyToManyField widget in admin

2007-11-20 Thread Julien
Hi Kamil, Thanks a lot for your suggestion! I have a few remarks though. The list of cities is dynamic, in the sense that you may add, remove cities from the database at any time using the admin interface. So how can we fetch dynamically the list of available cities to display them in the select

Re: weird "can't adapt" error

2007-11-20 Thread Jarek Zgoda
I just started receiving the same problem when I try to save an object that has non-ASCII values in char field (the values are all properly decoded to unicode)> This seems related to psycopg2 backend, as I do not observe such behaviour on my dev server with sqlite3 backend. The model is similar to

Re: Django-multilingual

2007-11-20 Thread Marcin Kaszynski
On Nov 20, 2:23 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > from the 'introduction' page, the links to the 'installation' and > 'usage' pages are broken Fixed, thanks! -mk --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

  1   2   >