Re: Questions about clustering and fail over

2006-11-30 Thread Javier Rivera
El Jueves, 30 de Noviembre de 2006 23:42, Yamagami escribió: > 2. How are the sessions stored? Is it RAM? disk? DB perhaps? They are stored in the database, in the table django_sessions. Javier. --~--~-~--~~~---~--~~ You received this message because you are

[validators] - access to object.id field

2006-11-30 Thread Marcin Jurczuk
Hello, I'm writing my own validator based on shipped with django and wondering how get validated object.id field ? Following function does not return it ..it should raised error with message contained keys from validated object. It does but there is no 'id' field. class

Registering defaults for custom settings

2006-11-30 Thread Brian Beck
Hi, If I'm developing middleware or an app that I want a user to be able to configure in their settings.py, how should I go about setting defaults in there? I checked out django.conf, and it just looks like global_settings.py registers the defaults for every possible module included with

Re: Re: Why not Django

2006-11-30 Thread Alan Green
On 12/1/06, James Bennett <[EMAIL PROTECTED]> wrote: > Now, does anybody want to talk about Django? Yes! Is anyone writing financial or money-handling applications in Django? Any particular issues or "gotchas" the world should know about? a

Re: Simple CAS 1.0 authentication

2006-11-30 Thread Brian Beck
Alright, I'm gonna throw a question out there, maybe someone can help. As shown above I can intercept the admin index page in order to not display the login form which doesn't make sense for CAS authentication. However, this only works if the user needs to be authenticated and requests the

Re: Re: Why not Django

2006-11-30 Thread James Bennett
On 11/30/06, Istvan Albert <[EMAIL PROTECTED]> wrote: > I think the main reason might be that when they get it wrong they don't > have to pay the difference from their own pocket. Depends. The engineers will tell you it's within tolerance for the system. The scientists will tell you it's

Re: Why not Django

2006-11-30 Thread Istvan Albert
Fredrik Lundh wrote: > that's probably because they're scientists, and have a pretty good > understanding of basic math I think the main reason might be that when they get it wrong they don't have to pay the difference from their own pocket. i.

Re: Why not Django

2006-11-30 Thread Victor Ng
On 11/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Victor Ng wrote: > > > If user A and user B are editting the same records and you enter a > > race where they do this: > > > > A) retrieve record > > Here you mean SELECT FOR UPDATE, right? No, I mean SELECT. The use case is two

Re: Dynamically modifying AdminOptions

2006-11-30 Thread noods
Oops, I made an error copying my code across. I forgot to call the parent class' contribute_to_class method: class RichTextField(models.TextField): "A rich text editor field which provides a WYSIWYG editor component." def contribute_to_class(self, cls, name): # Automatically add

Dynamically modifying AdminOptions

2006-11-30 Thread noods
Hi all, I'm trying to create a custom field which will automatically include some required JavaScript libraries in the admin interface, without having to modify contrib.admin. Currently I have a custom model field defined as follows: class RichTextField(models.TextField): "A rich text

Re: Why not Django

2006-11-30 Thread tchoukharev
Victor Ng wrote: > If user A and user B are editting the same records and you enter a > race where they do this: > > A) retrieve record Here you mean SELECT FOR UPDATE, right? > B) retrieve record Same here, right? > A) delete record > B) update record As SELECT FOR UPDATE starts a

Re: Django + FastCGI Problems

2006-11-30 Thread Maciej Bliziński
Mike, I was experiencing the same problems: incomplete headers and timeouts. I did a simple trick that made my Django application run smoothly. Perhaps you can try the same thing (it requires simple changes). I described it on my blog:

Re: Why not Django

2006-11-30 Thread Victor Ng
On 11/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Even if you are right and the use of numeric is the right decision, > still naming the fixed decimal type 'float' is, well, surprising ;-) Agreed. It *is* surprising. > I will really appreciate an example showing when SELECT FOR

Questions about clustering and fail over

2006-11-30 Thread Yamagami
Hi there, I'm trying to evaluate if Django might be fit for a project I'm going to be working on. The main requirement is to be bulletproof in regards to availability even in very high volume. I assume a setup of a few web/app servers and one or more database servers and a load balancer

Can't start server with runfcgi

2006-11-30 Thread jacobm
Hi, I'm trying to start a project using fastcgi and am having some problems. (mod_python doesn't want to build on this Solaris 8 box for some reason.) The current problem I'm facing is that the generated manage.py script doesn't have a runfcgi option. When I try "./manage.py runfcgi" it

Re: django something wrong with many to many relationship

2006-11-30 Thread gregor
thanks man I find error, I forget pass joined attribute. Thanks Again --~--~-~--~~~---~--~~ 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: Why not Django

2006-11-30 Thread tchoukharev
Victor Ng wrote: > I find this interesting too since the use of numeric instead of a > float is the right decision most of the time. > > If you're dealing with money at all - you absolutely cannot use float, > you *must* use fixed decimal types or you risk getting into all kinds > of really

Help with Contact Form

2006-11-30 Thread luxagraf
Hello all I have a quick question, I just whipped up a custom manipulator for a contact form and, following the suggestion in the django docs, I'm using a HttpResponseRedirect("/contact/thankyou/") to get rid of the post data, but what I'd like to display at that redirect url is a copy of the

Re: Editing intermediary table info deletes previous data?

2006-11-30 Thread markguy
So, a solution... or maybe better called a workaround... would be to have num_in_admin a large enough number to never need paginating. That doesn't help when I need to update the ingredients, but at least I could make it work. Thanks for the heads up!

Re: Help with getting connection.queries info

2006-11-30 Thread JP
Eric Floehr schrieb: > from django.db import connection > class Logging: > def process_response(self, request, response): > for query in connection.queries: > print "[%s] %s" % (query['time'], " > ".join(query['sql'].split())) > return response > > Which results

Re: Help with getting connection.queries info

2006-11-30 Thread Eric Floehr
Thanks James, that did the trick. For others that may be looking, here is my solution: In my settings file I added below the middleware setting: if DEBUG: MIDDLEWARE_CLASSES += ('web.middleware.Logging',) and in a file called "middleware.py" in my project directory (/web): from django.db

Re: Initial data for models splitted across multiple files

2006-11-30 Thread Mikko Suniala
On Thu, 30 Nov 2006, Russell Keith-Magee wrote: > Sounds like a bug in the way that manage.py discovers the module in which > the sql files are located. This is entirely possible, as the 'split models > across files' approach isn't the common use case for Django models. Ok. Since the recipe

Re: Why not Django

2006-11-30 Thread Victor Ng
On 11/30/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > Victor Ng wrote: > > > If you're dealing with money at all - you absolutely cannot use float, > > you *must* use fixed decimal types or you risk getting into all kinds > > of really terrible rounding errors. > > that might be true for

Re: {# comments? #} and django update process via svn

2006-11-30 Thread Adrian Holovaty
On 11/30/06, hotani <[EMAIL PROTECTED]> wrote: > I noticed in the most recent documentation that we should now be able > to use the {# comment #} multi-line commenting tags in templates. > However, after doing an 'svn update' and restarting apache it does not > seem to be available. Which begs

Re: Simple CAS 1.0 authentication

2006-11-30 Thread Brian Beck
Quick followup in case anyone is interested (anyone? Bueller?)... One problem is handling the admin site, which doesn't really account for an authentication backend that doesn't know the user's password (making the login form useless). So, without wanting to hack up django.contrib.admin, here's

Secure downloads in Django

2006-11-30 Thread kwe
If you're using lighttpd and fcgi to run your Dajngo app, here's a short article on using modsecdownload - http://isdevelopment.weblog.glam.ac.uk/news/2006/nov/30/secure-downloads-django/ --~--~-~--~~~---~--~~ You received this message because you are subscribed

{# comments? #} and django update process via svn

2006-11-30 Thread hotani
I noticed in the most recent documentation that we should now be able to use the {# comment #} multi-line commenting tags in templates. However, after doing an 'svn update' and restarting apache it does not seem to be available. Which begs the question: am I not fully updating? Is there something

Re: Inheritance through a ForeignKey field

2006-11-30 Thread yun
Suppose that you have a Section model that has a foreign key to Magazine, and the field in the Section model is called magazine. You can then do something like this once you get the section: s = Section.objects.select_related.get() s.magazine.id will return the id of the magazine, if it has

Re: Why not Django

2006-11-30 Thread Jeremy Dunck
On 11/30/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > basically claimed that if someone pays you $5.999 for a > $6.00 product, you've lost a full dollar ;-) Clearly, we should have an infinite number of bits, and then refer them to something like this:

Re: Why not Django

2006-11-30 Thread Fredrik Lundh
Victor Ng wrote: > If you're dealing with money at all - you absolutely cannot use float, > you *must* use fixed decimal types or you risk getting into all kinds > of really terrible rounding errors. that might be true for the US deficit, but for more normal money amounts, that's not really

Re: Re: Retrieve Password

2006-11-30 Thread Felix Ingram
On 30/11/06, James Bennett <[EMAIL PROTECTED]> wrote: > In general, I think this is a tradeoff we've had to make to have > Django be as useful as it is -- the goal isn't to satisfy *every* case > out of the box, but to satisfy *common* cases out of the box with the > ability to extend things as

Re: django something wrong with many to many relationship

2006-11-30 Thread Victor Ng
Your error is in your logs: ProgrammingError: ERROR: null value in column "age" violates not-null constraint You need to specify an age value, or define age=models.IntegerField(null=True) vic On 11/30/06, gregor <[EMAIL PROTECTED]> wrote: > > Hello i have manytomany relations (database

django something wrong with many to many relationship

2006-11-30 Thread gregor
Hello i have manytomany relations (database PostgreSql 8.1.5) like this: class Photograph(models.Model): name = models.CharField(maxlength=200) email = models.EmailField() age = models.IntegerField() categories = models.ManyToManyField(Category) joined =

Inheritance through a ForeignKey field

2006-11-30 Thread phess
I'm now building an online magazine website. Each magazine has the same set of sections. And every article belongs to one and only one section. So, the Article class has a ForeignKey(Section) line. So far, so good (I guess). :) But there are actually 2 magazines, each with its own group of

Re: Re: Retrieve Password

2006-11-30 Thread James Bennett
On 11/30/06, Felix Ingram <[EMAIL PROTECTED]> wrote: > The 'right' way of securing an application is very much dependant on > the application itself and the function it is trying to perform. > Storing password hashes is a way to mitigate the risks associated with > someone gaining access to the

Re: When Django downward compatibility version is available?

2006-11-30 Thread [EMAIL PROTECTED]
Form handling/manipulators will change before 1.0 so also current SVN/0.95 will need some upgrade. For a new project use SVN --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

RE: Help with admin views

2006-11-30 Thread Hull, Dave
Check out the bottom of the tutorial (before the Comments section) at http://www.djangoproject.com/documentation/tutorial2/ There's a line that begins "For full details on customizing the look and feel of the Django admin site..." I'm guessing you can copy the templates for the admin site into

When Django downward compatibility version is available?

2006-11-30 Thread Pythoni
I have already 3 projects in 0.91 version. Now I am going to start another project that will be similar to one of those 3 already running projects. Shall I use - 0.95 version, - the latest svn version, -wait for 1.0 version( that I expect it to be downward compatible) - use 0.91 version because

Re: Suggestion: Aggregate/Grouping/Calculated methods in Django ORM

2006-11-30 Thread Rock
Yeah it is all coming back to me. I was unwilling to answer all of these questions and create the perfect solution (which may not exist) and therefore we don't have aggregates in Django even though I demonstrated that a straightforward implementation was possible way back when. Thanks for backing

Re: Populating select field in custom manipulator

2006-11-30 Thread [EMAIL PROTECTED]
The choices parameter to Selectfield expects a list of tuples, what you've got is a list of strings. Say you want to have to choices in the selectfield, it would go something like this. projects = [("choice1","Gen2"),("choice2","CRMC")] I hpoe that clears things up for you .. -- Torbjørn

Multithreading inside django

2006-11-30 Thread Wolfram Kriesing
>From the frontend I trigger via AJAX a view that again starts a thread that does some import work, that might take quite a while. This enables the user to keep going and have the import run without interrupting him/her. Every once in a while an asynch call checks on the state of the import. And

Re: General File Upload Questions.

2006-11-30 Thread patrick k.
Am 30.11.2006 um 14:26 schrieb Paul Childs: > > I have been investigating file uploads in general and also with Django > in mind. This thread gave me a place to start: > http://tinyurl.com/ymzmds >

General File Upload Questions.

2006-11-30 Thread Paul Childs
I have been investigating file uploads in general and also with Django in mind. This thread gave me a place to start: http://tinyurl.com/ymzmds

Re: Retrieve Password

2006-11-30 Thread Felix Ingram
On 29/11/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > On 11/29/06 12:50 PM, Clint74 wrote: > > I need to send the password to the user(email), but how recover the raw > > password once the database stores in this format: > > You can't; that's the point of hashing it. The right (read:

Re: Updating and saving a related record. How does it work?

2006-11-30 Thread Aidas Bendoraitis
Have you tried Jacob's suggestion with the model, or its instance? You should have done that with an instance. I would also advice you to use lower case for variables(instances)/functions and capitalized words only for classes(models). Otherwise you confuse yourself and people who might help