Re: startswith a range

2006-12-22 Thread Don Arbow


On Dec 22, 2006, at 10:21 PM, Russell Keith-Magee wrote:

Same result, different composition. Personally, given Guido's
predisposition to eliminating reduce() in Python 3000 [1], I'd be
avoiding using reduce in new code.



Python 2.5 has any() and all() to replace reduce(). So I believe you  
could do this:


list = Model.objects.filter(any([Q(name__startswith=letter) for  
letter in 'abc']))


Don



--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: startswith a range

2006-12-22 Thread Kenneth Gonsalves



On 23-Dec-06, at 11:51 AM, Russell Keith-Magee wrote:


> Use Q objects to OR three queries together.
>
> Model.objects.filter(Q(name__startswith='a') | Q 
(name_startswith='b')

> | Q(name_startswith='c'))

got this from #django:

list=Model.objects.filter(reduce(operator.or_,[Q
(name__startwith=letter) for letter in 'abc']))


Same result, different composition. Personally, given Guido's
predisposition to eliminating reduce() in Python 3000 [1], I'd be
avoiding using reduce in new code.


what i didnt mention is that i dont know the string before hand. It  
could be 'abc' or 'wxyz', so i need to iterate through the letters


--

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/



--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Unicode URLs

2006-12-22 Thread Aaron Jacobs


In the interest of making 'pretty' URLs, I want my application to
accept URLs that may potentially contain Chinese characters, and have
those URLs parsed by URLconfs.  The [Django book] [1] says the
following:


When a request comes in, Django tries to match the URLconf patterns against
the requested URL, as a normal Python string (not as a Unicode string).


Is there any way to accomplish what I want?  On Trac and the mailing
list I found some [efforts] [2] by Victor Ng to Unicode-ify things,
but nothing seems to ever have been made of them.  The last
modification to that ticket gives what sounds like a solution, but
honestly I can't say that I understand exactly what it says.

Any tips?

Aaron

[1]: http://www.djangobook.com/en/beta/chapter08/
[2]: http://code.djangoproject.com/ticket/2588

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: startswith a range

2006-12-22 Thread Kenneth Gonsalves



On 23-Dec-06, at 9:48 AM, Russell Keith-Magee wrote:


Use Q objects to OR three queries together.

Model.objects.filter(Q(name__startswith='a') | Q(name_startswith='b')
| Q(name_startswith='c'))


got this from #django:

list=Model.objects.filter(reduce(operator.or_,[Q 
(name__startwith=letter) for letter in 'abc']))


--

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/



--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Best way to accomplish model inheritance

2006-12-22 Thread Aaron Jacobs


Hey everyone,

I'm currently attempting to design my first Django application.  The
model framework seems to be pretty nice -- it reminds me a bit of
Apple's Core Data, except more geared toward web development.

The model for my application conceptually needs something like model
inheritance, as described near the beginning of the [wiki article] [1]
of the same name.  That is, I would love to do something like the
following:

class Place(models.Model):
name = models.CharField(maxlength=50)

class Restaurant(Place):
type_of_food = models.CharField(maxlength=50)

class Hotel(Place):
price_per_night = models.FloatField()

This models the 'object-oriented' nature of things -- restaurants and
hotels are both places and should thus share the properties of places.

Being a Cocoa/Core Data guy myself, the snippet above is the most
natural way I can think of to do things.  It sounds like Django is
moving toward that, but I'm disappointed to see that doing it that way
and having things automatically sorted out by the model layer isn't
possible today.

So can anyone tell me what the best way is to model such a relationship
is _today_?  It looks like a one-to-one key might work, but the
reference documentation warns against it and, more importantly, I'm not
positive it will do exactly what I want and don't exactly know how to
accomplish it.  I've seen some relevant discussions in the list
archives, but they are a bit old and mostly related to the admin
interface, which I am not extremely concerned with.

Here are some points I'm looking for.  They're mostly just what you
would expect from an object-oriented system (and how things work in
Core Data).  Hopefully someone can tell me how to accomplish all of
this.

1. If I ask for a list Places matching certain criteria, then Hotels,
Restaurants, and basic Places matching the criteria should all be
returned.

2. If I get a list of Places as above, then I should be able to tell
whether a given object in the list is a Hotel or Restaurant or whatever
and get and set its associated properties.

3. Restaurants and Hotels should be their own independent entities.  If
there is some crazy stuff going on with foreign keys and multiple
tables behind the scenes, it should stay behind the scenes as an
implementation detail.  So if I delete a Hotel object, it should
automatically delete the associated Place object if there is such a
thing in the implementation.

Can anyone help me with this?  So far it's the only thing I've come
across in Django that doesn't seem natural and well thought out.

Thanks in advance for any help.
Aaron

[1]: http://code.djangoproject.com/wiki/ModelInheritance


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Database session leak with postgres or is it open transactions

2006-12-22 Thread marxy


We have an application that has a django front end and a bunch of
backend stuff that uses django's excellent database api.

We've developed using sqlite and recently switched to the postgres back
end.

We leak database sessions and eventually run out of postgres's 100
sessions after several hours.

I notice that there are lots of sessions with open transactions.
Perhaps auto transactions doesn't work in some circumstances?

Our application has several processes and they use threads to do work.
Some threads live for the life of the app (while True blah) and other
threads are started to do some task and then end when it's done.

Note that we call .setDaemon(True) in our threads so that all ends
nicely when we kill the process.

Now, the good news is that by explicitly calling connection.close()
after doing any inserts or updates the leaks have stopped, but this
shouldn't be required and of course in loops it has a big overhead
disconnecting and re-connecting. My suspicion is that this "fix" just
hides the real problem.

Tailing the sql going through postgres I see examples of transaction
BEGINs without ENDs, but it's hard to tell in a very threaded app. (We
have 18 threads going mostly).

We're on 0.95 but can't see any evidence of a fix after this.

Does any one have a similar problem or know of a fix?

We love using django by the way. I've never been so productive.

Peter


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: startswith a range

2006-12-22 Thread Russell Keith-Magee


On 12/23/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:


hi

whats the best way of retrieving names that start with either 'a',
'b' or 'c'. I need something like:

Model.objects.filter(name__startswith__range('a','c')


Use Q objects to OR three queries together.

Model.objects.filter(Q(name__startswith='a') | Q(name_startswith='b')
| Q(name_startswith='c'))

Yours,
Russ Magee %-)

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



startswith a range

2006-12-22 Thread Kenneth Gonsalves


hi

whats the best way of retrieving names that start with either 'a',  
'b' or 'c'. I need something like:


Model.objects.filter(name__startswith__range('a','c')
--

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/



--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: django-admin.py

2006-12-22 Thread Wiston Guzman


Thank you for your feed back.
Big big newbie mistake from my part. I didn't understand well the
tutorial book from where I had to run 'django-admin.py startproject
mysite'.
django commands run fine from the system path.
Thanks.
I was a newbie, still I'm, but wiser than yesterday.
WG.
On Thu, 2006-12-21 at 12:00 -0500, Todd O'Bryan wrote:

On Thu, 2006-12-21 at 08:53 -0800, Wiston Guzman wrote:
> [GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import django
> >>> django.VERSION
> (0, 96, 'pre')
> >>> django-admin.py startproject mysite
>   File "", line 1
> django-admin.py startproject mysite
>^
> SyntaxError: invalid syntax
> >>> 


Aha! You run django-admin.py from the actual command line, not from
within Python. This means that you could have regular PATH issues in
addition to PYTHONPATH issues.

Just figure out the actual path to django-admin.py and it should work.
Something like:

$ /usr/lib/python2.4/site-packages/django/bin/django-admin.py
startproject mysite

(all of that is on one line)

Todd

> 



--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django on SourceForge?

2006-12-22 Thread Dirk Eschler


On Saturday 23 December 2006 00:24, [EMAIL PROTECTED] wrote:

you need python, django and some other python libraries instaled + CGI
isn't a good idea. So django on sourceforge is rather impossible.


Django itself imports without problems. I have just uploaded it to my home dir 
and extendend $PYTHONPATH. 


--
Dirk Eschler 
http://www.krusader.org

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django on SourceForge?

2006-12-22 Thread [EMAIL PROTECTED]


you need python, django and some other python libraries instaled + CGI
isn't a good idea. So django on sourceforge is rather impossible.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Django on SourceForge?

2006-12-22 Thread Dirk Eschler


Hello,

has anyone ever tried to deploy a Django powered website on SourceForge? Is it 
possible at all?


http://code.djangoproject.com/wiki/ServerArrangements says, that Django can 
work with plain CGI. Since i don't have much experience with CGI, i'm 
wondering if there's a doc that explains how to use the scripts the wiki page 
links to - or better - how to use them on SourceForge.


Best Regards,
Dirk Eschler

--
Dirk Eschler 
http://www.krusader.org

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: cannot update model in view

2006-12-22 Thread Christian Joergensen


Kenneth Gonsalves wrote:


hi

i have a model which has a unicode string in one field. In admin I  can 
save and update the model. In my view, using custom manipulators  i can 
create new models using model.objects.create. But when i try to  update 
and save the model in a view, I get a ProgrammingError. But  the error 
message does not specify what the programming error is.  Just says 
'current transaction is aborted, commands ignored until end  of 
transaction block SET TIME ZONE 'Asia/Calcutta'. On looking at the  
traceback i get in


I have seen this before. I believe the thing is that your database 
driver does not support unicode. Try to encode it to something.


--
Christian Joergensen | Linux, programming or web consultancy
http://www.razor.dk  | Visit us at: http://www.gmta.info

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Schema Evolution code

2006-12-22 Thread Victor Ng


Hi, sorry for the long delay in replying.   Holiday season and work
craziness is getting in the way of writing free software - which is
really the fun part isn't it? ;)

On 12/17/06, Steve Hutton <[EMAIL PROTECTED]> wrote:


> Ways in which my schema evolution code sucks:

> 1) converting the database is done pretty much all automatically so
> you don't really have a way to version control your schema changes
>
Is this a departure from the Proposal in the wiki[1]?
It says:
"Introspection + migration
This approach is a combination of Automatic db introspection and
Automatically applied migration code -- one command produces a migration
script, you tickle your version number, and the syncdb runs the
migrations"


It's a little different, but barely.

The current codebase emits an SQL file with all the SQL statements to
evolve the database,   There's no provision to save the version
anywhere, but that would be simple to do.

If nobody want's to champion the code, I can volunteer ~3-5 hours a
week to work on this stuff.  My own team needs schema evolution in the
long run anyway - so it's well worth my time to make sure this
eventually gets back to trunk.

I won't be able to do too much until the new year though - so that
said - can somebody open up the schema evolution branch, or better -
open up a new branch from trunk so that we can start hacking away at
this problem?

victor "i hate parking lots at christmas" ng

--
"Never attribute to malice that which can be adequately explained by
stupidity."  - Hanlon's Razor

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



~*-*~ New Windows XP-NT-2003 & 98 - Secrete Tricks ~*-*~

2006-12-22 Thread SONAM

  *New Windows XP - Secrets and Tricks*



[image: XP Tricks]
http://windows-tricks.50webs.com




Deleting System Softwares: 




Creating Shutdown Icon or One Click Shutdown:








Increasing Band-Width By 20%: 

*More ..* 

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---

<>


Re: serving multiple hosts from a single django instance ?

2006-12-22 Thread Fredrik Lundh


Fredrik Lundh wrote:

ah, that could work.  maybe the process_request handler could just 
modify the path attribute, in place ?


that almost worked, but causes some rather interesting problems with 
things like CommonMiddleware's URL rewriting, etc.


I came up with this little hack instead:

Index: django/core/handlers/base.py
===
--- django/core/handlers/base.py(revision 4234)
+++ django/core/handlers/base.py(working copy)
@@ -60,7 +60,10 @@
 if response:
 return response

-resolver = urlresolvers.RegexURLResolver(r'^/', 
settings.ROOT_URLCONF)
+# Get urlconf from request object, if available.  Otherwise use 
default.

+urlconf = getattr(request, "urlconf", settings.ROOT_URLCONF)
+
+resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
 try:

which, when combined with a trivial middleware class, seems to work
just fine, but I might have missed something.

does someone see any obvious problem with this approach?

could some variation of this perhaps be added to the django core?

(the right way to do this is to add urlconf as a class attribute to
the Request base class, and replace the getattr line with "urlconf = 
request.urlconf or settings.ROOT_URLCONF").





--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: models.GenericForeignKey & .GenericRelation

2006-12-22 Thread wnielson


Check out

http://www.djangoproject.com/documentation/models/generic_relations/


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Screencast: Django + Aspen = Stephane (was Re: pure-HTTP deployment?)

2006-12-22 Thread Chad Whitacre


Jeremy,


A quick poke through mod_python.c shows mod_py tries to be resilient:


Yeah, cherrypy.wsgiserver provides this level of isolation. There 
are still cases where a rogue thread could take down the server, 
e.g., with an infinite loop, but I think that's to be expected at 
some level.




chad

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



models.GenericForeignKey & .GenericRelation

2006-12-22 Thread Chris Ryland


I stumbled on this on the MPTT thread (coming from the flatpage
ordering discussion), from last summer.

Are these concepts still in Django, or did they morph into something
else?

I don't see them in the documentation, though perhaps I'm missing
something entirely.

Thanks.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: pure-HTTP deployment?

2006-12-22 Thread Chad Whitacre



Two that I were getting were "bad gateway" (actually an nginx
error message, caused through some sort of error in connecting to the
server)


HTTP 502 from nginx probably just means that the backend server 
died rather than hung. In which case there would probably have 
been a Python core dump, or maybe something in your app's error log.




occasionally a CherryPy formatted error message saying
something along the lines of "CherryPy server is stopped".


I'm not sure you'd see anything CherryPy-formatted if you were 
only using the wsgiserver.py module.




chad

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Screencast: Django + Aspen = Stephane (was Re: pure-HTTP deployment?)

2006-12-22 Thread Jeremy Dunck


On 12/21/06, Chad Whitacre <[EMAIL PROTECTED]> wrote:


Jeremy,

> mod_python does a good job of isolating errors on one request from
> another request.

Is that mod_python or is that the prefork MPM?


I've never had to care.  :)  A quick poke through mod_python.c shows
mod_py tries to be resilient:

...
   resultobject = PyObject_CallMethod(idata->obcallback,
"HandlerDispatch", "O",
  request_obj);

   /* release the lock and destroy tstate*/
   release_interpreter();

   if (! resultobject) {
   ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, req,
 "python_handler: Dispatch() returned nothing.");
   return HTTP_INTERNAL_SERVER_ERROR;
   }
...

I fear I've wandered off-topic, but I guess my philosophy in writing
server software is that no bug in a handling a single request should
affect the handling in other requests.  That and $1 would get me a cup
of coffee, since I have yet to write any HTTP server software.  ;-)

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Screencast: Django + Aspen = Stephane (was Re: pure-HTTP deployment?)

2006-12-22 Thread Chad Whitacre


All,

I've posted documentation for Stephane using Google Code's new 
Wiki feature:


  http://code.google.com/p/aspen-commons/wiki/Stephane


chad

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Ordering flatpages?

2006-12-22 Thread David Blewett



Paul Smith wrote:

 Another thing on my mind is
what would happen if my flatpages start getting all hierarchical on
me... has anyone had to figure out how to let users manage objects with
something like a file/folder tree?


You could use the MPTT (modified pre-order tree traversal) app to make
a tree structure out of any django model. There's a page on the wiki
about it, and an updated version on the list.

http://code.djangoproject.com/wiki/ModifiedPreorderTreeTraversal
http://groups.google.com/group/django-users/browse_thread/thread/ad54ef8b858c2d33/43b586c683a31129

David


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



<<---- Shoking Buildings and Constructures ---->>

2006-12-22 Thread Marry4U

  *Shocking Structures *
*of the World*

[image: Incredible] 
http://mega-structures.50webs.com/


*Mega City*
*Larges Sea port*
*Under water Port*
*Under water Dock*
*Air Port in Ocean*
**
*and*
*More *





--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---

<>


Re: How would you implement this?

2006-12-22 Thread Eric Floehr


I like that template too!  Thanks!


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



>== Super Luxuries Apartments ==

2006-12-22 Thread ANJLI

  Super Luxurious
Apartments



*[image: Best Apartments]*
http://apartments2.50webs.com/

*Most Luxurious*
*Most Comfortable*
*Most affordable*
*Suitable Locations*
*Most Beautiful Views*

[image: Free Interior] 

*Free Interior and Much More... *





--
Sarah Singh

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---

<>
<>


>>> Christmas Cake Recipes <<

2006-12-22 Thread ANJLI

Mary Christmas
[image: Christmas Cake Recipes]
*if you need Christmas Cake Recipes** please visit this site* *
http://recipes-2.50webs.com/christmas_cake/** * If you need any information
about *Cake Recipes* please reply me.

*Thanks *

*Tania*


--
Sarah Singh

--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



jpgaXgu4eMRsW.jpg
Description: JPEG image


Re: serving multiple hosts from a single django instance ?

2006-12-22 Thread julián


One more alternative:
you can capture the hostname with mod_rewrite and pass it to your views
using mod_proxy:

RewriteCond %{HTTP_HOST} ^site-one\.example\.com  [NC]
RewriteRule ^/(.*)$  /hostname/aware/view/%1/$1  [L,QSA,P]

(I've wrote from memory, it's not tested)

Then it's your view code responsability to filter content using the
hostname received that you should capture with your url configuration.

This is useful if you need to ellaborate on the mod_rewrite part before
reaching your python code.

j.


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Ordering flatpages?

2006-12-22 Thread patrick k.


I´ve posted a proposal recently, see
http://groups.google.com/group/django-developers/browse_frm/thread/ 
dc0e4a9d6ad02ea3/


It´s currently not working "out-of-the-box", but we use it for  
different sites and implementation is easy.

All you need is an IntegerField called "position".

If you´re interested, I can send you the files ...
btw, jQuery is needed for this one since we use js a for (re)ordering.

patrick

Am 22.12.2006 um 01:46 schrieb Paul Smith:



So I'm working on this site in Django, and turns out there's quite a
bit of static flatpages-style content involved. I've extended  
flatpages

(well, started with flatpages and built my own), added rich text
editing and so on, and I'm building some navigation dynamically by
looking at the 'url' field. Now I need to figure out how to re-order
them so users can control where things show up in the
dynamically-created navigation.
I'm thinking about a couple of ways to skin this cat, but I thought
I'd put it out there. Does anyone have a nice approach for letting
users arbitrarily order things in Admin? Another thing on my mind is
what would happen if my flatpages start getting all hierarchical on
me... has anyone had to figure out how to let users manage objects  
with

something like a file/folder tree?

--P


>



--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: pure-HTTP deployment?

2006-12-22 Thread Simon Willison


Sylvain Hellegouarch wrote:


I'd be interested to know which version of CP Simon was running. CP3 is
way more stable, efficient and comprehensive that CP2 (and its WSGI
server is like ten steps ahead).


__version__ = '3.0.0beta2'

I'm really interested as to what kind of failures can be expected from
CherryPy. Two that I were getting were "bad gateway" (actually an nginx
error message, caused through some sort of error in connecting to the
server) and occasionally a CherryPy formatted error message saying
something along the lines of "CherryPy server is stopped".


--~--~-~--~~~---~--~~
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]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---