Re: Django on Windows?

2006-03-13 Thread Ivan Sagalaev
Leeuw van der, Tim wrote: >By searching for 'threading' in the ticket-database I've found ticket >1442, which provides a different approach: thread-local storage. (Each >thread it's own connection.) > > Yes, this is the fix that superseeded previous fixes for different backends. It's much clea

RE: Django on Windows?

2006-03-13 Thread Leeuw van der, Tim
By searching for 'threading' in the ticket-database I've found ticket 1442, which provides a different approach: thread-local storage. (Each thread it's own connection.) URL: http://code.djangoproject.com/attachment/ticket/1442/django.threading.pa tch That patch works very well for me; didn't tr

Re: Django on Windows?

2006-03-13 Thread Ivan Sagalaev
Leeuw van der, Tim wrote: >Hi Ivan, > >Thanks for your fast answer. I didn't get round to trying the changes >until now and I suspect that the first link you sent me is for the wrong >issue: it's a patch to make the default filters unicode-proof (adding >encode/decode with default charset in lots

Re: Dateformat and escaped chars

2006-03-13 Thread Waylan Limberg
On 3/13/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Mon, 2006-03-13 at 23:17 -0500, Waylan Limberg wrote: > > I'm trying to format my dates with escaped characters in the format. > > However, I can only seem to get them to work with the 'now' template > > tag, but not the 'date' filte

Re: deleting an image

2006-03-13 Thread Jakub Labath
Hi, My first attempt at #22 is in trac. http://code.djangoproject.com/ticket/22 It's just a quick thing that I needed. But I will welcome suggestions and ideas how to make this better. Best Regards On 3/12/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > never go round to it - havent even st

Re: Dateformat and escaped chars

2006-03-13 Thread Malcolm Tredinnick
On Mon, 2006-03-13 at 23:17 -0500, Waylan Limberg wrote: > I'm trying to format my dates with escaped characters in the format. > However, I can only seem to get them to work with the 'now' template > tag, but not the 'date' filter. Some examples: > > {% now "jS o\f F" %} > > will return '13

Dateformat and escaped chars

2006-03-13 Thread Waylan Limberg
I'm trying to format my dates with escaped characters in the format. However, I can only seem to get them to work with the 'now' template tag, but not the 'date' filter. Some examples: {% now "jS o\f F" %} will return '13th of March' as it should. But if I do this in the template: {{ po

Re: variables in a variable in templates

2006-03-13 Thread Kenneth Gonsalves
On Monday 13 Mar 2006 12:47 pm, Adrian Holovaty wrote: > Variables within variables aren't supported. To accomplish what > you want, you'll have to write either a custom tag or filter. > (It's easy enough to do.) i cheated - made a template with a bunch of 'ifequals' and included it. Inelegant b

Re: problem with relation class and admin

2006-03-13 Thread Russell Keith-Magee
On 3/14/06, Alan Bailey <[EMAIL PROTECTED]> wrote: I'm using 0.91, not the trunk, don't know how much of a difference thereis.It shouldn't make that much difference. There have been a some bug fixes applied to the trunk since 0.91, but for the most part, the big ticket bugfixes are in magic-removal

Re: ifequal issues

2006-03-13 Thread tomass
Great, thanks! I thought it might be something like this. Should have dug a little deeper... --~--~-~--~~~---~--~~ 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@go

Re: ifequal issues

2006-03-13 Thread SmileyChris
All variables that you "get" from the request come back as strings. So '2' != 2 You could just set show_only=int(show_only) before you pass it to the template. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

ifequal issues

2006-03-13 Thread tomass
Hi Folks, I'm having some issues with {% ifequal %}. What I'm trying to do is have a drop down list remember the values that are sent on a get request that is sent to the same page. I pass the value of the variable (show_only in this case) back to the template, and then I have this statement in t

Re: setting up a db in magic-removal branch

2006-03-13 Thread Adrian Holovaty
On 3/13/06, Luke Plant <[EMAIL PROTECTED]> wrote: > On Monday 13 March 2006 15:20, Adrian Holovaty wrote: > > > (I'll insert the standard disclaimer here that magic-removal is not > > ready for production use and is only for the faint of heart.) > > Only for the faint of heart? Or perhaps you mea

Re: setting up a db in magic-removal branch

2006-03-13 Thread Luke Plant
On Monday 13 March 2006 15:20, Adrian Holovaty wrote: > (I'll insert the standard disclaimer here that magic-removal is not > ready for production use and is only for the faint of heart.) Only for the faint of heart? Or perhaps you mean that *after* you've tried it you'll be faint of heart? I

Re: using context_instance=DjangoContext(request) in generic view url.

2006-03-13 Thread Luke Plant
On Monday 13 March 2006 05:47, coulix wrote: > hum to reformulate simpler, > how can i tell in url.py to use generic.simple, and a extra_context > which will replace > context_instance=DjangoContext(request) i was using in my view > method. Generic methods use DjangoContext anyway -- you don't

Re: create_update and manipulator

2006-03-13 Thread Adrian Holovaty
On 3/13/06, Axel Steiner <[EMAIL PROTECTED]> wrote: > I'm trying to build a form with > django.views.generic.create_update.create_object > and I can't find a way to use a custom manipulator with it. Is it > possible to pass > a generic view a manipulator? No, that's not currently possible. I'd r

Re: Apache/mod_python with 2 different projects

2006-03-13 Thread Les Smithson
On Mon, 2006-03-13 at 14:14 -0600, Adrian Holovaty wrote: On 3/13/06, Les Smithson <[EMAIL PROTECTED]> wrote: > My guess is that the DJANGO_SETTINGS_MODULE is set once only per server process, > then its pot-luck which process and which DJANGO_SETTINGS_MODULE setting any > particular reques

create_update and manipulator

2006-03-13 Thread Axel Steiner
Hi, I'm trying to build a form with django.views.generic.create_update.create_object and I can't find a way to use a custom manipulator with it. Is it possible to pass a generic view a manipulator? Thanks, Axel --~--~-~--~~~---~--~~ You received this message

Apache/mod_python with 2 different projects

2006-03-13 Thread Les Smithson
I'm trying to configure an Apache/mod_python server with two different Django projects that use different databases and different Django models/views/templates etc. They are entirely separate - all they have in common is that they run on the same Apache instance. My httpd.conf looks something l

RE: Django on Windows?

2006-03-13 Thread Leeuw van der, Tim
Hi Ivan, Thanks for your fast answer. I didn't get round to trying the changes until now and I suspect that the first link you sent me is for the wrong issue: it's a patch to make the default filters unicode-proof (adding encode/decode with default charset in lots of places). I don't see how tha

Re: problem with relation class and admin

2006-03-13 Thread Alan Bailey
I'm using 0.91, not the trunk, don't know how much of a difference there is. Is there a patch I can apply to get this to work? I already tried magic-removal thinking it'd be better to stay current, but that broke on me in some ways too, like edit-inline not working, so I skipped that. Thus this

Re: mysql - collation and character sets..

2006-03-13 Thread [EMAIL PROTECTED]
i am still not following this.. here is the output from my show variables.. mysql> SHOW VARIABLES LIKE 'char%'; +--++ | Variable_name| Value | +--++ | characte

Re: Apache/mod_python with 2 different projects

2006-03-13 Thread Adrian Holovaty
On 3/13/06, Les Smithson <[EMAIL PROTECTED]> wrote: > My guess is that the DJANGO_SETTINGS_MODULE is set once only per server > process, > then its pot-luck which process and which DJANGO_SETTINGS_MODULE setting any > particular request gets. Your guess is exactly correct. You'll need to use t

Quick thanks to django team - I deployed my first app

2006-03-13 Thread Aaron
I just wanted to drop a note about a new app that I deployed. I recently launched a prototype and users are happy. Basically it uses the gamespy API to query gamespy for a list of active game servers, then contacts each server in turn to obtain critical stats (map being player, number of players

Re: created_on not being populated by admin interface

2006-03-13 Thread ijonas
If I allow the "created_on" columns to be nullable it kindda works. The second action I perform is performed succesfully, i.e. when I go back into the "Account" detail and add 2 more "Project" child objects. When look at the data in the database I see that the created_on column has been left NULL

Re: Comments module

2006-03-13 Thread kahfei
I have the same problem here. Manage to follow the tutorial till part 3. And any comments made to a particular post actually shown in all posts. Still try to solve this problem. Guess Bryan advice might be helpful, should look into details how django blog example in code.djangoproject.com. --~--

created_on not being populated by admin interface

2006-03-13 Thread ijonas
Hi, I've got a master-detail relationship that I'm trying to get working in the Admin interface. My models are as follows: class Account(meta.Model): name = meta.CharField(maxlength=100, null=False, unique=True) email = meta.EmailField(null=False) password = meta.CharFiel

Re: setting up a db in magic-removal branch

2006-03-13 Thread Adrian Holovaty
On 3/13/06, Jeremy Jones <[EMAIL PROTECTED]> wrote: > In 0.9.1, I would run python manage.py init; python manage.py install > {{insert desired model here}}. In magic-removal, there appears to no > longer be an init argument to manage.py. There is also a new syncdb > argument. Is the proper way

Re: How to enter all model-related data on one form?

2006-03-13 Thread Adrian Holovaty
On 3/13/06, Mike Kent <[EMAIL PROTECTED]> wrote: > However, for the end-user interface, I wanted to go with a different > look. I probably worded what I wanted badly: the key concept is that, > for a Book model that has a many-to-many 'authors' field linking to an > Author model, I want a UI fie

Re: Integrity Error, regarding NULL values

2006-03-13 Thread Panos Laganakos
>From the http://code.djangoproject.com/wiki/NewbieMistakes Problem ¶ When you have a Field: current_zip = meta.IntegerField(maxlength=5,blank=True) django will create a not nullable field in the DB. However leaving the field blank (in admin/web) django will try and insert a NULL value in the D

Re: IDE/Dev workflow question

2006-03-13 Thread Ivan Sagalaev
Todd O'Bryan wrote: >Is there any way to run the stuff Django needs from inside Python >interactions, > There is. All those management method are located in django.core.management. You can do it in python prompt like this: import os os.environ['DJANGO_SETTINGS_MODULE']='myproject.sett

Re: How to enter all model-related data on one form?

2006-03-13 Thread Mike Kent
Thanks for the reply, Adrian. Yep, I have already got the admin interface to my model enabled, that's how I got my initial data into the database. However, for the end-user interface, I wanted to go with a different look. I probably worded what I wanted badly: the key concept is that, for a Bo

Re: save() and null/blank character fields

2006-03-13 Thread Zanchey
Malcom: Sure thing. I'll see if I can whip up a testcase (be nice if it's disappeared). David Adam [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Pre/Post Save: Assigning a value to the attribute of a object???

2006-03-13 Thread [EMAIL PROTECTED]
Hi All, I have a model something like this: doctype_choices = ( ('PDF','Adobe PDF'), ('WORD','Microsoft Word' ), ('EXCEL','Microsoft EXCEL'), ) sector_choices = ( ('All','All'), ('Social Recovery','Social Recovery'), ('Physical Infrastructure','Physical Infrastruct

Re: Integrity Error, regarding NULL values

2006-03-13 Thread Panos Laganakos
Hey Tim, Yeah, I understand what you mean, but I thought that django used "" by default and not NULL. That's why I defined in my model to allow blank, and not include null=True. Part of the model is this: class Factor(meta.Model): 20 first_name = meta.CharField(maxlength=25) 21

RE: Integrity Error, regarding NULL values

2006-03-13 Thread Leeuw van der, Tim
'blank=True' is not the same as 'null=True' ! Specify 'null=True' and null-values should be allowed on the column (you should see that in de generated DDL, the clause 'NOT NULL' disappears from the specs for this column) That said, your RDBMS might still require you to fill in your foreign keys,

Integrity Error, regarding NULL values

2006-03-13 Thread Panos Laganakos
Hello, I am getting an IntegrityError: ERROR: null value in column "factor_id" violates not-null constraint INSERT INTO "products_companies" ("name","phone","factor_id") VALUES ('test','',NULL) Although I have specified in its model, that I want to allow the factor_id to be blank: class Company(

Re: Adding new properties post sql build

2006-03-13 Thread Panos Laganakos
Thanks guys. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] F

setting up a db in magic-removal branch

2006-03-13 Thread Jeremy Jones
In 0.9.1, I would run python manage.py init; python manage.py install {{insert desired model here}}. In magic-removal, there appears to no longer be an init argument to manage.py. There is also a new syncdb argument. Is the proper way to setup your db in magic removal to call manage.py with syn

Re: Changing filenames on an upload...

2006-03-13 Thread Petar Marić
Hi Tony, You should look for rename_by_field() in http://djangoutils.python-hosting.com/wiki/Utils -- Petar Marić *e-mail: [EMAIL PROTECTED] *mobile: +381 (64) 6122467 *icq: 224720322 *skype: petar_maric *web: http://www.petarmaric.com/ --~--~-~--~~~---~--~~ You

RE: IDE/Dev workflow question

2006-03-13 Thread Leeuw van der, Tim
Hi, You could look into an IDE like Eclipse, together with the PyDEV eclipse plugin. I use this combination to develop for Django. (There are some gotchas with code-completion; in some ways the code-completion of PythonWin works better in combination with the magic of Django models.) Why I woul

IDE/Dev workflow question

2006-03-13 Thread Todd O'Bryan
Hi all! I just discovered Django Saturday night and am very impressed. Unfortunately, I'm in my second week of learning my way around Python, so I'm running into newbie questions and would appreciate some guidance. First, the background. I teach at a magnet high school. We offer an intro

RE: Adding new properties post sql build

2006-03-13 Thread Leeuw van der, Tim
Consider adding an extra table, 'item_type_extra_properties' or something like that, used to store all those types of properties which are not yet known at design-time. --Tim -Original Message- From: django-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Malcolm Tredinnick

Re: Adding new properties post sql build

2006-03-13 Thread Malcolm Tredinnick
On Mon, 2006-03-13 at 11:10 +, Panos Laganakos wrote: > Hello, > > I have an item_type table which allows the user to add new types of > items himself. Problem is that except the basic properties that are > included in the item table, he might need to define item specific ones > (properties).

Adding new properties post sql build

2006-03-13 Thread Panos Laganakos
Hello, I have an item_type table which allows the user to add new types of items himself. Problem is that except the basic properties that are included in the item table, he might need to define item specific ones (properties). I discussed it a bit with a friend and talked about adding an extra