If you are considering running mod_fcgi systems, take a loot at
mod_wsgi first. It's quite stable already, the setup is not any more
difficult than mod_fcgi and it's a lot more easy to configure the
finer details. Additionally, some simplistic tests show quite good
performance, although that's yet
On 08/03/07, Alex Dong <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I have a data model like this:
> * a `user` has multiple `questions`
> * a `user` could give multiple `answer`s or `comment`s to any
> `question`s.
> So here, there are
> * a one-to-many relationship from `user` to `question`
> * a
If you're familiar with XSLT then that should also be a good
candidate. The problem there is that things could get complicated, if
the HTML document is not a well-formed XML document.
On 08/03/07, Kjell Magne Fauske <[EMAIL PROTECTED]> wrote:
>
>
>
> On Mar 7, 8:17 pm, "Ramdas S" <[EMAIL PROTECT
On 06/03/07, roberto <[EMAIL PROTECTED]> wrote:
>
> dear all,
>
> i'm starting to use django and i have what may seem to a lot of you
> the stupidest question ever, though i have not been able to solve
> this,.
>
> i have to classes:
>
> class warriors(models.Model):
> username = models.CharFi
On 08/03/07, johnny <[EMAIL PROTECTED]> wrote:
>
> class City(models.Model):
> # ...
>
> class Person(models.Model):
> # ...
> hometown = models.ForeignKey(City)
>
> class Book(models.Model):
> # ...
> author = models.ForeignKey(Person)
> edited = models.ForeignKey(Person)
On 09/03/07, Greg Donald <[EMAIL PROTECTED]> wrote:
>
> How can I add a field in a join table?
>
> I have this:
>
> class Item(models.Model):
> name = models.CharField(maxlength=32)
>
> class List(models.Model):
> name = models.CharField(maxlength=32)
> items = models.ManyToManyField(I
On 08/03/07, akonsu <[EMAIL PROTECTED]> wrote:
>
> hello,
>
> as the subject says, select_related() does not return many-to-many
> relations. is this a feature or a bug?
>
> thanks
> konstantin
>
>
>From what I've seen select_related() always joins up the related
tables and select their values. C
On 09/03/07, akonsu <[EMAIL PROTECTED]> wrote:
>
> hello,
>
> the code below generates two queries to the database. is there a way
> to make it get all objects related to object 'aa' and then just look
> up the right one when get() is called?
>
> thanks
> konstantin
>
> class AA(models.Model) :
>
On 07/03/07, hotani <[EMAIL PROTECTED]> wrote:
>
> This is the table (model) setup:
> [county] (list of counties)
> [office] (list of offices)
> [active counties] (a relational table with a county_id, office_id and
> 'active' column)
> [division] (columns: 'name', 'county_id' which points to the f
On 07/03/07, Grupo Django <[EMAIL PROTECTED]> wrote:
>
> Hello, I have two questions:
>
> -Where can I browse the django API?
>
> - I have made a news app. One of the fields is author, i want to set
> its default value to the username logged in the admin zone. How could
> I do it? What do I have t
On 09/03/07, akonsu <[EMAIL PROTECTED]> wrote:
>
> thanks for your response.
>
> well, i am trying to get a list of dependents of a given object in a
> single query. i want to be able to retrieve the dependents by key (the
> object name) from this list.
>
> i do not see any way of doing this but g
On 12/03/07, Boris Smus <[EMAIL PROTECTED]> wrote:
>[56]:cs.filter(default_recipe__ingredients__ingredient__id=3).filter(default_recipe__ingredients__ingredient__id=1)
> Out[56]:[]
This would map to a Query that looks like this "... WHERE id=3 AND
id=1". that would most certainly return no resul
I am running a system with basically the same versions of all software
packages as you are. It is in production and under stress testing it
performed very very well and there've been no issues with performance
so far. I am using Apache + FastCGI, server-managed.
First thing you might want to look
On 14/03/07, Krassimir Grozdanov <[EMAIL PROTECTED]> wrote:
> I am a python and Django novice so please excuse me if my question is
> too stupid.
>
> I have 3 models: Regions, Municipalities and Persons.
> In the admin interface, when editing the Person object, I want to
> limit the choices for th
On 14/03/07, johnny <[EMAIL PROTECTED]> wrote:
>
> I have an app that is for online test taking. Most online test are 30
> mins to 2hrs. I need to create count down clock from when the test is
> stared. If 30 mins test, then count down will start from 30 mins : 00
> Secs, 29 min: 59 secs and so on
I don't have a full example, but the thread module won't do what you
need. You need to spawn an external process to do your job. For this
take a look at python's documentation. It's a faily simple thing to
do, if you just want to run mencoder on the file,
On 14/03/07, Henrik Lied <[EMAIL PROTECTE
On 15/03/07, skink <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'd like to start one thread in order to do some periodic actions.
>
> It should be started automatically, not within some view code.
>
> Where is the best place to start such thread?
>
> regards,
> skink
>
What kind of actions are you tal
> I need to retrieve latest record (each record has a time stamp,
> created_at), only one record, from sale table where product_id=1. How
> do I do this in Django ORM? I have looked at .objects.extra{}, but I
> am getting ProgrammingError 1064.
>
> I need to get this sql into Django ORM:
>
> sel
On 15/03/07, DuncanM <[EMAIL PROTECTED]> wrote:
>
> I have 2 classes:
This post is really too long to be able to understand what and where
it's going on.
"Revision matching query does not exist" is usually caused when you're
trying to select something out of the database and your query coudn't
m
On 14/03/07, Alexander Boldakov <[EMAIL PROTECTED]> wrote:
>
> The web pages served in my django applications are not static media
> files, but dynamically generated content (the result of applying XSLT
> transformation to the XML data retrieved from XML database). I
> consider the architecture of
On 13/03/07, Sengtha <[EMAIL PROTECTED]> wrote:
>
> I am currently working on one project which needs to view page on
> browser that doesn't support cookies.
> By what I know, all Django sessions are based on browser cookies. And
> Django sessions are save in django_session table. I wonder there i
Weeel, there is the newforms-admin branch. I haven't tried it myself
though, I've just seen people om the IRC channel discuss it. Judging
from the roadmap, it should be pretty usable.
http://code.djangoproject.com/wiki/NewformsAdminBranch
--~--~-~--~~~---~--~~
You
I've a moderatelly small apllication in production, that runs on FCGI,
instead of mod-python. From stress-tests it's prooven to be very fast
and responsive. FCGI is dynamically managed by Apache.
The memory footprint of my FCGI processes is around 12MB per process,
In addition, my Apache processe
On 20/03/07, Nuno Mariz <[EMAIL PROTECTED]> wrote:
>
> The processing is nothing in special, right now a weblog and a online
> store.
> I've removed some modules, like fcgi, include and suexec(I can't
> remember the instalation of this modules ;) ) and the size of the
> processes is now 22Mb.
> Do
On 26/03/07, Gerard M <[EMAIL PROTECTED]> wrote:
>
> Hello dear django comunnity, Im having a bad time with my database in
> MySQL the problem is that when I try to store a word with some "rare"
> characters like á é í and many others, django shows this message to
> me
>
> OperationalError at /uplo
On 26/03/07, David M. Besonen <[EMAIL PROTECTED]> wrote:
>
> are there any issues/caveats/problems around using django + fcgi?
>
> i'm guessing there might things to be wary of, given that
> mod_python appears more prominently in the installation
> instructions.
>
>
> thanks,
> david
I am using f
> Currently I am trying to store a "tree" in a database and want to use Nested
> Sets in order to do this. I was wondering if this exists within Django atm
> or if there are plans to add it in the future or has someone developed it on
> the side? If the answer to these questions is "NO", is there
Have you tried switching to UTF-8, if you need support for "funny"
character sets ? You'll need to change your database and table
encodings to UTF8 (with appropriate collation, if you need proper
sorting) and the output content-type.
On 28/03/07, enquest <[EMAIL PROTECTED]> wrote:
>
> In Django
Hello,
By the looks of it, mod_fcgi has a limit as to how much time it could
wait for response from a script. Since you're doing a heavy operation
that takes a while, i guess it times out.
The point is - if your executed action takes so much time, you're
clearly having a wrong conception on whe
windows programming {delphi} to Web, so my knowledge is kind of
> limited with Python)
>
> Any suggestion?
>
>
>
>
> Atilla wrote:
> > Hello,
> >
> > By the looks of it, mod_fcgi has a limit as to how much time it could
> > wait for response from a scrip
Have you tried specifying "project__name" ? That should be resolved
correctly in the query set. If it doesn't work, you'll have to
redefine the order_by method and include the join of the tables there
explicitly.
On 31/03/07, Gilhad <[EMAIL PROTECTED]> wrote:
>
> I have something like this:
>
> c
On 30/03/07, oliver <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I am starting out with django and python, don't have much experience
> in either. I have managed to create a few "simple" website with django
> and really enjoy working with it.
>
> But I am a bit stuck on my latest project. I am using a M2M
On 01/04/07, TaMeR <[EMAIL PROTECTED]> wrote:
>
> The standard URLField is to short for the google maps.
> I have a basic route that is almost 300 char long and they will get
> longer.
> I am developing on sqlite3 but I think it has something to do with
> Django.
> Does anybody know how I can fix
On 03/04/07, TaMeR <[EMAIL PROTECTED]> wrote:
>
>
> I use two registration forms one for clients one for vendors.
> Depending on form used I would like to assign the user to a group.
>
> How do I use new_user.groups.add('Client')
>
> Below is my code that does not raise any errors but also does no
On 03/04/07, Honza Král <[EMAIL PROTECTED]> wrote:
> something like this works for me...
>
> q = Q( tag__name=first_tag )
> for tag in other_tags:
> q = q | Q( tag__name=tag )
What kind of query does this build BTW? Is it smart enough to put them
all into a "WHERE name IN ( all-your-tags-here) ?
On 04/04/07, Nathan R. Yergler <[EMAIL PROTECTED]> wrote:
>
> I'm working on an app for a client, and one of the requirements is
> that they be able to re-order objects in the admin interface. I know
> exactly how I'd do with with an object database, but the ideas I've
> come up with for doing it
On 03/04/07, Chris Brand <[EMAIL PROTECTED]> wrote:
>
> What's the best way to restrict access on a per-app basis ?
> I want to have two apps, with some users allowed access to one, others
> allowed access to the other, and some allowed access to both.
>
> Any advice would be very much appreciated
On 04/04/07, James Turnbull <[EMAIL PROTECTED]> wrote:
>
> I'm trying to group items in the Admin interface based on a foreign
> key, and I'm hitting a few stumbling blocks.
>
> Simplified objects are...
>
> > class MenuItem(models.Model):
> > name = models.CharField(maxlength=200)
> >
> > cla
On 03/04/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I was following tutorial on django built-in comment system in wiki on
> djangoproject.com; Everything went fine, however, I can't figure out
> how to use them with custom views, I keep getting different errors.
> Tutorial exa
> - structure/models.py
> class Issue(models.Model):
> (...)
> pub_date = models.DateField('Publication date', unique=True)
> (...)
>
> class Meta:
> ordering = ['-pub_date']
> -
>
> - stories/models.py
> class Story(models.Model):
> (...)
> issue = model
If you're simply trying to display error messages, if something is
invalid - check carefully how this is being done in the examples in
the documentation. The idea here is that you issue a redirect only
when your data is validated, your object is saved and you must proceed
to a different step. Now
The correct type for HTML documents is text/html. The correct type for
XHTML documents "should" be application/xhtml+xml, however - IE (maybe
not all versions) will bork on that and will not render, but instead
give you a save dialog.
If your validator fails on "partial" documents, that should be
> Of course one should not assume that post pk's are monotonically
> increasing as the order the query set is sorted by can have no
> relation to the post pk's. This means we can not even do something
> simple as a binary search of slices of the query set.
If it were the case, it'd be farily easy
> Is there a way to force the db connection to stay open if you are
> excecuting raw sql that is creating a temp table? When the connection
> closes...the temp tables go away.
>
Temp tables are meant to be temporary. You can't guarantee, even with
persistent db-connection pooling that the same
> When I enable etags, django is sending back an etag on 404 pages.
> When a client does a subsequent request for the same nonexistent
> page, a 304 response is sent back, because the page has not changed
> (based on the etag).
>
> When I disable etags, multiple requests for a non existent page a
On 16/04/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> We are trying to use them to generate a report where a bunch of
> calculations are being made... via a custom sql query... then hand all
> of the results back to my django view to display.
>
> After they are displayed...they can be
On 16/04/07, cactus <[EMAIL PROTECTED]> wrote:
>
> > I think the behaviour is correct though, why do you want to redefine it ?
>
> If the behavior is indeed correct, then I don't think I need to
> redefine it.
> It just seemed odd to return a 'not-modified' response to a query for
> a page that di
I stand corrected, thank you for the referenced reply. I've missed
that part of the specification. If you make any changes to the
conditional get middleware, please consider sending a patch for it,
that could be incorporated in the code later, hopefully.
--~--~-~--~~~-
On 18/04/07, Gilbert Fine <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
>According to HTTP standard, the meaning of 303 status is (copied
> from rfc2616):
>
> 10.3.4 303 See Other
>
> The response to the request can be found under a different URI and
> SHOULD be retrieved using a GET method on that
> >> just asking :)
> >
> > I don't know about Nicolas, but I'm writing something for a
> > Spanish-speaking customer, so I might have a TelephoneField
> > ("teléfono") in there, for example.
>
> the way to do it is verbose_name = _("telephone")
Yes, instead of naming your models with "funky" char
On 18/04/07, mamcxyz <[EMAIL PROTECTED]> wrote:
>
> > Yes, instead of naming your models with "funky" characters, you can
> > always set the verbose displayed name to whatever you need it to be.
>
> The are not funky. Are the normal characters in each labguage. Anyway,
> that show too if the "funk
In my experience so far, there's nothing that prevents you from
efficiently using the worker MPM with the latest
Apache/Mod_python/Django versions.
You have to be more careful when it comes to configuration,
optimization, concurrency-load-memory when running under worker MPM,
but so far I haven't
On 26/04/07, Graham Dumpleton <[EMAIL PROTECTED]> wrote:
>
> On Apr 25, 7:10 pm, Atilla <[EMAIL PROTECTED]> wrote:
> > I personally find it Very bad to bind Django users to 1 apache worker
> > model, considering how the Apache modules progress and the performanc
On 15/05/07, Martin Tomov <[EMAIL PROTECTED]> wrote:
>
> http://code.djangoproject.com/ticket/72
>
> About this tichet. The last question is mine.
>
> How to change the encoding, sent by the HTTP headers to something
> else, but UTF-8 ? The meta thing in the html is useless.
>
> Thanks
This ticke
On 15/05/07, Kostadin Cholakov <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> We are using the development server only! Can you give me some
> reference for the necessary changes in the code? Thanks!
>
> On 5/15/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> >
> > On Tue, 2007-05-15 at 19:14 +, Ko
On 22/05/07, omat <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> Is it a good idea to use a middleware class to detect the browser
> client looking at the HTTP_USER_AGENT so as to serve presentation
> logic accordingly, for mobile devices or older browsers, etc...?
>
> I know this is mostly done by
On 23/05/07, OliverMarchand <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am new to Django (4+years Python experience) and would like to
> evaluate for my financial company whether Django may be a good
> solution to our problem of designing our applications all a-z from
> scratch. Now my colleagues fir
On 23/05/07, Brian Rosner <[EMAIL PROTECTED]> wrote:
>
> You may also want to check out http://code.djangoproject.com/ticket/3990.
>
> On May 22, 5:19 am, "Seiji - technics" <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > Is there a way to show as specific field in the admin screens but
> > without
On 23/05/07, OliverMarchand <[EMAIL PROTECTED]> wrote:
>
> Dear Djangos,
>
> Is it possible to subclass a model? This example somehow doesn't work
> for in the sense that I only see the geography on the admin screen.
>
>
> from django.db import models
>
> class Geography(models.Model):
>
On 23/05/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
> On Tue, 2007-05-22 at 06:43 -0700, Fay wrote:
> > I'm using MySQL. The primary key field generated by django uses
> > integer, not unsigned. I'd like to us unsigned integer instead. I can
> > explicitly specify PositiveIntegerField wit
On 23/05/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I'm reimplementing an in-database tree system and I'm using custom SQL
> queries. I want to use % in LIKE but Django doesn't let me.
>
> The code:
> ##
> def getBranch(table_name, parent_depth, parent_cutLevel, max_depth):
>
> Given that there is no branch, that statement is incorrect.
>
> Model inheritance is two stations down the line. Unicode gets finished
> first, then query refactor then model inheritance.
>
> Regards,
> Malcolm
Well, I'm certainly glad to know this. I hadn't checked up on it for
a long time.
On 24/05/07, robo <[EMAIL PROTECTED]> wrote:
>
> Hi everyone. for the code below at
> http://www.djangoproject.com/documentation/forms/
>
> def create_place(request):
> manipulator = Place.AddManipulator()
>
> if request.method == 'POST':
> # If data was POSTed, we're trying to cr
63 matches
Mail list logo