Re: limit_choices_to: getting access to current instance

2007-01-31 Thread qhfgva
Well, either I'm not able to follow your example or we are talking about different things. In any case here is what I got working as a first draft. As a big benefit to me is the fact that I now understand these inner workings a little better. I was hoping to get away with simple wrappers to

Re: finding verbosity in tests.py?

2007-01-31 Thread Russell Keith-Magee
On 2/1/07, yary <[EMAIL PROTECTED]> wrote: > > Quick question- how do I find the verbosity in which my tests are > running? something like "from import verbosity"? Verbosity is passed in as a command line argument to the testing process - it's not visible to the testing methods itself.

finding verbosity in tests.py?

2007-01-31 Thread yary
Quick question- how do I find the verbosity in which my tests are running? something like "from import verbosity"? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: not receiving error email

2007-01-31 Thread jrs
Have you tried the SERVER_EMAIL setting in settings.py? For me that did the trick SERVER_EMAIL = '[EMAIL PROTECTED]' Without that it was sending the exception emails from [EMAIL PROTECTED] which my shared provider (webfaction which I highly recommend) did not like. jrs On Jan 31, 6:37 pm,

Re: not receiving error email

2007-01-31 Thread James Bennett
On 1/31/07, James Tauber <[EMAIL PROTECTED]> wrote: > I just got an unhandled exception error on my production site but > didn't receive an email. There are some cases where this will happen; for example, the code which would send the email lives in the handler class, so if the handler never

Re: Help with Last Seen (why doesn't this work???)

2007-01-31 Thread Honza Král
this seems more accurate: def process_request( self, request ): now = datetime.datetime.now() # get last_request, defaults to now, when he was never seen before # you may wish to omit setting last_seen in that case (he wasn't ever seen) last_request =

not receiving error email

2007-01-31 Thread James Tauber
I just got an unhandled exception error on my production site but didn't receive an email. I have ADMINS set and django in general has no problem emailing (account activation works fine). Is there something else I need to do to get error emails? Any other suggestions as to what to look for

Re: Different subdomain for each application

2007-01-31 Thread Doug Van Horn
On Jan 31, 4:51 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > How would you go about using seperate subdomains for certain apps in a > project? What I would like to do is something like this: > > urlpatterns = patterns('', > (r'^weblog\.[a-z0-9-]+\.[a-z0-9-]{3}', >

Re: New Vim files for Django

2007-01-31 Thread Dave Hodder
On Jan 30, 2:04 am, "Honza Král" <[EMAIL PROTECTED]> wrote: > > Hi Dave, > thanks for the work, it's great to see some more colors in my ViM... ;) No problem Honza, glad it's of some use to you. :o) Dave --~--~-~--~~~---~--~~ You received this message because

Re: Validation discrepancies between admin and newforms

2007-01-31 Thread Waylan Limberg
The admin app is currently being rebuilt to use newforms. No doubt this, plus many similar issues are being addressed there. Watch the dev list for discussions and check out the branch here: http://code.djangoproject.com/browser/django/branches/newforms-admin On 1/31/07, Kilian CAVALOTTI <[EMAIL

utf-8 and database models

2007-01-31 Thread Joseph Wenninger
Hi! I'm using an sqlite database with a model which has a Charfield named filepath. I'm trying to store an "utf-8" string there. I tried passing it as a byte string and as a unicode object. Saving works fine, but if I try to access the field I'm always getting: "Could not decode to UTF-8

Re: 2 Questions!

2007-01-31 Thread Sebastien Armand [Pink]
Wow, sorry, I copied paste and didn't see the font was so awful! 2007/1/31, Sebastien Armand [Pink] <[EMAIL PROTECTED]>: > > So the exact unicode error is: > > UnicodeEncodeError at /entreprise/search/ 'ascii' codec can't encode > character u'\xe9' in position 1: ordinal not in range(128) Request

looking for a django contractor (Chicago area)

2007-01-31 Thread Kumar McMillan
Dear Djangoists, the company I work for is looking for a new contractor to work on a "phase 2" of a django app now in production. You are the captain of the ship but will be working alongside a team of pythonists and rubyists, a handful of whom will be available to conduct code reviews. _

Re: New Vim files for Django

2007-01-31 Thread Dave Hodder
On Jan 31, 4:34 pm, Andrew Diederich <[EMAIL PROTECTED]> wrote: > > Is the htmldjango.vim 1.05 version the right one to grab? i.e. are > they all supposed to do the same thing, and that one is the latest? Hi Andrew, You should download both htmldjango.vim 1.05 and django.vim 1.04 and place

fixing css issues

2007-01-31 Thread backdoc
I'm brand new to Django. And, I was having a problem getting my CSS working. I searched the archives here and I saw lots of references from people having the same problems with CSS and some debates on how to go about making it work. But, I never saw anyone spell out exactly how they got it

Re: fundamental issues with configuring Apache and mod_python

2007-01-31 Thread darren
Thanks I took your configuration and was able to configure mine accordingly. I still don't completely understand it, but at least I can get to the admin page and the poll page. And, now I can finish the tutorial. I don't think that I have some permissions correct though because my pages don't

Re: Help with Last Seen (why doesn't this work???)

2007-01-31 Thread Doug Van Horn
On Jan 30, 7:01 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > There's some conceptual thing I'm apparently just not getting. I > attempted to follow Doug's advice and came up with: > > [snip] > > Which appears to do the exact same thing I was doing before. I may have misled you with the

Re: E-mailing forms

2007-01-31 Thread Ramdas S
Make sure your settings.py file has this. Please fill accordingly DEFAULT_FROM_EMAIL = EMAIL_HOST = EMAIL_PORT = EMAIL_HOST_USER = EMAIL_HOST_PASSWORD = On 1/31/07, Mike <[EMAIL PROTECTED]> wrote: > > > There's also a documentation section for this topic located here: > > Sending e-mail >

Re: Help with Last Seen (why doesn't this work???)

2007-01-31 Thread [EMAIL PROTECTED]
I think this MAY be working now and I think I even finally wrapped my head around what's going on. So, in hopes of helping someone else some day (or, alternately, someone pointing out any trouble spots remaining), the last_visit middleware: import datetime class LastSeen (object): def

Re: E-mailing forms

2007-01-31 Thread Mike
There's also a documentation section for this topic located here: Sending e-mail http://www.djangoproject.com/documentation/email/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: E-mailing forms

2007-01-31 Thread [EMAIL PROTECTED]
In the view, you need from django.core import mail, validators then something like def save(self, message, from, to): mail.send_mail("Email title, whatever that is", message, from, [to],

Re: fundamental issues with configuring Apache and mod_python

2007-01-31 Thread [EMAIL PROTECTED]
Hi! On Jan 31, 6:47 pm, "backdoc" <[EMAIL PROTECTED]> wrote: > I am trying to experiment with django. And, I'm at a loss. My > problem is that I just don't conceptually understand how to match up > where everything is supposed to go on the filesystem and how to > configure Apache and

E-mailing forms

2007-01-31 Thread ChelleBell
I have made a form, that is up and running partially. What I am looking to do is this form will be a sign up for a camp, but what i was wondering is if there is a way that the form can be e-mailed to someone after a person has filled it out. I cannot find anywhere on the django site that tells me

Re: New Vim files for Django

2007-01-31 Thread Igor Guerrero
On 1/31/07, Andrew Diederich <[EMAIL PROTECTED]> wrote: > Is the htmldjango.vim 1.05 version the right one to grab? i.e. are > they all supposed to do the same thing, and that one is the latest? > htmldjango.vim *0.1 *is for the

fundamental issues with configuring Apache and mod_python

2007-01-31 Thread backdoc
I am trying to experiment with django. And, I'm at a loss. My problem is that I just don't conceptually understand how to match up where everything is supposed to go on the filesystem and how to configure Apache and mod_python to be aware of it. I am running Apache2 on Ubuntu Edgy with

Re: IPython Shell does not see database changes made by views.

2007-01-31 Thread Michael Radziej
Ivan Sagalaev: > Paul Childs wrote: >> I wanted to do some checks through the shell, which I was opened >> during my unit testing, and found that after making some queries using >> Django objects there appeared to be no changes in the database. When I >> checked the database using its admin tool

Re: New Vim files for Django

2007-01-31 Thread Andrew Diederich
On Sunday, January 28, 2007, 9:54:18 AM, Dave Hodder wrote: > Updated syntax files for the Vim editor are available here: > http://www.vim.org/scripts/script.php?script_id=1487 Is the htmldjango.vim 1.05 version the right one to grab? i.e. are they all supposed to do the same thing, and

Re: What user does django server runs?

2007-01-31 Thread HenrikG
Well, I solved my connection problems. It seems I had two versions of PostgreSQL installed and I had created the database with one version and was running the server with the other version. When I used the "createdb" command for both versions, one of them said that the database was corrupt. So I

Re: Independent sql-evolution module

2007-01-31 Thread tonich
Sorry for the duplication --~--~-~--~~~---~--~~ 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: django & eclipse step-by-step (python 2.5) ?

2007-01-31 Thread Steven Armstrong
Bram - Smartelectronix wrote: > hey everyone, > > > ( I hope you saw the question mark at the end of the subject ;-) ) > > working in eclipse, it would be so wonderful to get auto completion and > all those other goodies working. Auto completion works just fine for > everything django (i.e.

Re: IPython Shell does not see database changes made by views.

2007-01-31 Thread Ivan Sagalaev
Paul Childs wrote: > I wanted to do some checks through the shell, which I was opened > during my unit testing, and found that after making some queries using > Django objects there appeared to be no changes in the database. When I > checked the database using its admin tool the changes were

IPython Shell does not see database changes made by views.

2007-01-31 Thread Paul Childs
During unit testing I made changes to data in the database through my Django app. I wanted to do some checks through the shell, which I was opened during my unit testing, and found that after making some queries using Django objects there appeared to be no changes in the database. When I checked

Multilingual content - status update

2007-01-31 Thread [EMAIL PROTECTED]
Hi, the library is getting very close to being actually usable in real projects. There were several changes in the last few days. It is now possible to: 1. use language codes in methods that until now accepted only language IDs; 2. create query sets with default language set, so that the

Independent sql-evolution module

2007-01-31 Thread tonich
http://groups.google.com/group/django-users/web/sqlev.tar.bz2 This module provides sql evolution for django models. It is based on the sql-evoluition branch. To be used do NOT NEED TO MAKE CHANGES IN DJANGO SOURCE CODE!!! Just extract files into your project directory, copy sqlev_manage.py file

Re: Help with Last Seen (why doesn't this work???)

2007-01-31 Thread Honza Král
On 1/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I know I'm dense, and I'm just not seeing this, but isn't that what > I'm doing? > > now = datetime.datetime.now() > last_request = request.session['last_request'] > > if (now - last_request).seconds > (60 * 60 *4): > ... but this line:

Re: Help with Last Seen (why doesn't this work???)

2007-01-31 Thread [EMAIL PROTECTED]
I know I'm dense, and I'm just not seeing this, but isn't that what I'm doing? now = datetime.datetime.now() last_request = request.session['last_request'] if (now - last_request).seconds > (60 * 60 *4): ... request.session['last_request'] = now On Jan 31, 7:47 am,

Re: Help with Last Seen (why doesn't this work???)

2007-01-31 Thread Honza Král
On 1/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Ok, but if I update last_request at every request, then won't (now - > last_request) ALWAYS be more or less 0? not if you update it AFTER the comparison... > > > On Jan 31, 4:16 am, "Honza Kr�l" <[EMAIL PROTECTED]> wrote: > > On

Re: Help with Last Seen (why doesn't this work???)

2007-01-31 Thread [EMAIL PROTECTED]
Ok, but if I update last_request at every request, then won't (now - last_request) ALWAYS be more or less 0? On Jan 31, 4:16 am, "Honza Král" <[EMAIL PROTECTED]> wrote: > On 1/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > There's some conceptual thing I'm apparently just not

Re: Django uploading framework vs tramline

2007-01-31 Thread [EMAIL PROTECTED]
Tramline would be the best choice unless the #2070 patch is applied On 31 Jan, 05:00, "Chatchai Neanudorn" <[EMAIL PROTECTED]> wrote: > Hi > Are there comparing performance of uploading between django itseft and > tramlime. What is the best way, installation and proformace are subject of >

Re: newforms, foreignKeys & constraints

2007-01-31 Thread ak
Sorry, this: On Jan 31, 3:24 pm, "ak" <[EMAIL PROTECTED]> wrote: > FormClass.base_fields['foreign_key_field'].widget = > forms.ChoiceField(choices=[(obj.id, obj.name) for obj in must be: FormClass.base_fields['foreign_key_field'] = forms.ChoiceField(choices=[(obj.id, obj.name) for obj in

Re: subclassing a Field

2007-01-31 Thread [EMAIL PROTECTED]
You cannot add custom database field types without altering the db backend code. On 31 Jan, 09:58, Antonio <[EMAIL PROTECTED]> wrote: > hi all, > > I've created a TYPE in PostgreSQL : > > Composite type "utente.datirim" > Column| Type > -+ > nome

Re: newforms, foreignKeys & constraints

2007-01-31 Thread ak
You can create your own ChoiceField with your own set of choices and replace default property to your own For example: FormClass = forms.models.form_for_model(MyModel) FormClass.base_fields['foreign_key_field'].widget = forms.ChoiceField(choices=[(obj.id, obj.name) for obj in

Re: Help with Last Seen (why doesn't this work???)

2007-01-31 Thread Honza Král
On 1/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > There's some conceptual thing I'm apparently just not getting. I > attempted to follow Doug's advice and came up with: > > class LastSeen (object): > """Middleware that adds various objects to thread local storage > from the request

subclassing a Field

2007-01-31 Thread Antonio
hi all, I've created a TYPE in PostgreSQL : Composite type "utente.datirim" Column| Type -+ nome| text turno | time without time zone comandante | text disormeggio | time without time zone arrivo | time without time zone fine

possible bug when editing an object: foreign key "_id" part gone

2007-01-31 Thread Benedict Verheyen
Hi, i think i might have encountered a possible bug but i'm not sure though. Editing an object and leaving a mandatory field empty results in the form "forgetting" the foreign keys. It doesn't actually forget but it ommits the "_id" part and thus the values are not displayed on the form. The