CharField with utf-8 handling

2006-05-23 Thread hironobu
Hello, Django users and developers. I'd been trying to handle non-ascii string (such as Japanese text) from MySQL database for recent several days, on version 0.95 "post-magic-removal". Django loads onto memory as raw byte strings and saves similarly too, so string data I can see directly on

Re: generic view: list articles by category?

2006-05-23 Thread Ivan Sagalaev
nkeric wrote: >I guess I need to build the 'queryset' of the article_list_dict >dynamically as something like >this: Article.object.filter(category__id__exact=) rather >than Article.objects.all(). > >Is it possible? > > No it's currently not possible. There are two workarounds though. 1. You

generic view: list articles by category?

2006-05-23 Thread nkeric
hi all, I'm trying to use the generic view to slim down my code. here I encountered a question: I would like to use the generic object_list to list articles by category, so, here is what I'm trying to do: in urls.py - article_list_dict = { 'queryset': Article.objects.all(), } urlpatterns

Restrictions: Triggers or Save

2006-05-23 Thread bradford
I have a blog with categories. Users who read the blog are allowed to add up to five unique posts to their favorites for each category. So Favorites - CategoryID - PostID - UserID How should I limit the number of favorites per user (per category), while enforcing favorite post uniqueness for

Re: How fix the "feature" of not serving static files?

2006-05-23 Thread Wilson Miner
Is there a particular reason you can't just use the full media url in your templates? ie. "http://media.coolsite.com/files/css/shadow.css; instead of "../css/shadow.css"? On 5/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I'm building a CMS for my internal use... I own a web

Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)

2006-05-23 Thread iGL
Hi, I guess the right way to run a Django app on IIS is to use ISAPI-WSGI module. However, I haven't tested it much and, definitely, never did so in a production mode... Anyway, hope the following helps: Since Py2.4, ISAPI dll is part of activepython2.4

Re: Accessing instance values in a model...

2006-05-23 Thread favo
I have the same question. --~--~-~--~~~---~--~~ 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

thanks for the BadContent

2006-05-23 Thread pbx
Just wanted to offer my thanks to Adrian (and anybody else who worked on this) for adding some spam defense to the Trac server. For those of us who check the timeline often, it's a big relief. pb -- Paul Bissex http://e-scribe.com/news/ Northampton MA USA 01061-0847

Re: Searching on a calculated value

2006-05-23 Thread Adrian Holovaty
On 5/23/06, Gary Wilson <[EMAIL PROTECTED]> wrote: > Yes, I guess I could split the text entered and then do a search for > each word in both first_name and last_name like the admin interface > does... just seems like this would return many more results than wanted > with a large user group. It

Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)

2006-05-23 Thread Ian Holsman
your not understanding reverse proxying. the ':3000' is not visible to the outside. IIS would need to forward the request to the port and then push the response back to you something like this http://www.saltypickle.com/Home/16 is what I am talking about On 24/05/2006, at 8:38 AM, [EMAIL

Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)

2006-05-23 Thread [EMAIL PROTECTED]
I don't think the last option (swap the IIS for Apache) like to the hosting company. Remember: is a shared hosting server, already RUNNING websites and that thing (the test part is my job, but if that pass ok this must be a simply thing for theirs)... The first option... that not mean that a URL

Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)

2006-05-23 Thread [EMAIL PROTECTED]
I have high expectations from the python crew ;) So, after all, not was windows the easy and linux the ugly! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)

2006-05-23 Thread Ian Holsman
On 24/05/2006, at 8:08 AM, [EMAIL PROTECTED] wrote: > re. > > So, what are the alternatives? (excluding getting a linux box) you can run apache2.2 on windows quite well. if IIS has a proxy type solution you could just run apache2.2 on a separate port and have it handle the django side of

Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)

2006-05-23 Thread Jeremy Dunck
On 5/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > So, what are the alternatives? (excluding getting a linux box) > > - Is FastCGI the rigth answer? > - Existe a stable ISAPI dll? You've set up some very odd and difficult requirements.

I need instructions in best way to use django under IIS shared hosting (Python is installed)

2006-05-23 Thread [EMAIL PROTECTED]
Hi, Because I'm a lucky man, i'm convinced to my hosting provider to setup python so I can play with django ;) I have a reseller account, so I plan to reuse my first django website (a portal of colombian food) But, this guys are asking how setup the thing. Rigth now, this guys are already

Re: Django and twisted

2006-05-23 Thread Steven Armstrong
On 05/23/06 21:20, Christian Schneider wrote: > Hi all, > > has anyone any experiences as to using django from a twisted application? > I'm asking because I had some issues with MySQL as in crashing connections > and too many database handles open. As far as I can tell, which isn't very > far, my

Re: Searching on a calculated value

2006-05-23 Thread Gary Wilson
Waylan Limberg wrote: > For an example of how the admin app does this see search_fields > http://www.djangoproject.com/documentation/model_api/#search-fields > > -- > > Waylan Limberg > [EMAIL PROTECTED] Yes, I guess I could split the text entered and then do a search for each word in both

Re: Updating in bulk

2006-05-23 Thread Eric Walstad
On Tuesday 23 May 2006 12:39, Christian Schneider wrote: > Hi Eric, > > no, it's not a one-off job but the cursor object looks easy enough. Do you > know what connection that is, i.e. is it the same one django will use for > the rest of my queries (I'm implementing a server that's supposed to run

Cool app work in Boston: photos, words, and more

2006-05-23 Thread antrod
Hey everybody-- We're looking for a superstar hacker who wants to come to Cambridge MA to work with us on the recently launched tabblo.com, built on django, Python, and the LAMP stack. Tabblo is a tool for telling stories with your pictures and in your own words. Think of it like what you get

Accessing instance values in a model...

2006-05-23 Thread medhat
Probably the title is not very accurate, but I did not know how to word it any better! Probably the following scenarios will make it clearer: 1. I would like to generate the 'upload_to' parameter of the FileField based on the value of another field in my model. example: === class

Re: Updating in bulk

2006-05-23 Thread Christian Schneider
Hi Eric,no, it's not a one-off job but the cursor object looks easy enough. Do you know what connection that is, i.e. is it the same one django will use for the rest of my queries (I'm implementing a server that's supposed to run 24/7) or do I have to shut it down. Thanks,chrisOn 5/23/06, Eric

Re: Updating in bulk

2006-05-23 Thread Jeremy Dunck
On 5/23/06, Eric Walstad <[EMAIL PROTECTED]> wrote: > Otherwise, > have a look at the docs for executing arbitrary sql statements using Django's > cursor object. I don't know of a Django orm method that does exactly what > you want. > >

Re: Updating in bulk

2006-05-23 Thread Eric Walstad
On Tuesday 23 May 2006 12:17, Christian Schneider wrote: > Hi all, > > is it possible to update tables in bulk, that is in SQL "update jobs set > status=2 where worker='X'"? I'm using django from a backend server process > and speed is a bit of an issue here, so I'd like to avoid changing and >

Django and twisted

2006-05-23 Thread Christian Schneider
Hi all,has anyone any experiences as to using django from a twisted application? I'm asking because I had some issues with MySQL as in crashing connections and too many database handles open. As far as I can tell, which isn't very far, my twisted application is running in just one thread, so I'm

Updating in bulk

2006-05-23 Thread Christian Schneider
Hi all,is it possible to update tables in bulk, that is in SQL "update jobs set status=2 where worker='X'"? I'm using django from a backend server process and speed is a bit of an issue here, so I'd like to avoid changing and saving every object individually. chris

Re: django site doesn't seem to display right under firefox

2006-05-23 Thread Steven Armstrong
On 05/23/06 10:03, Alexandre CONRAD wrote: > Hello, > > I am wondering if you all have the same problem as I am using Firefox > (Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.0.3) Gecko/20060426 > Firefox/1.5.0.3): > > On the home page: > > - the "django" logo doesn't display at all. >

How fix the "feature" of not serving static files?

2006-05-23 Thread [EMAIL PROTECTED]
I'm building a CMS for my internal use... I own a web development & desing company... we have experience in ASP.NET but I'm looking for something more "ligth" and come to django... For people with deadlines: that are we! Despite the fact I see how django is productive in a lot of areas, I get

Re: Function caching

2006-05-23 Thread Adrian Holovaty
On 5/23/06, Elver Loho <[EMAIL PROTECTED]> wrote: > Does Django offer any decorators for caching the output of any > function, such as get_latest_books, based on the arguments passed to > it? Hi Elver, There's no specific cache decorator, but the low-level cache API is so simple to use that

Re: remedial django - what IS a "site" exactly?

2006-05-23 Thread Adrian Holovaty
On 5/23/06, Simon de Haan <[EMAIL PROTECTED]> wrote: > A slight correction though: Under "How Django uses the sites > framework", the "authentication framework" link in bullet 5 links to > the "syndication framework". Thanks, Simon. I've fixed the docs. Should be live on the site within 15

Re: django site doesn't seem to display right under firefox

2006-05-23 Thread Facundo Casco
I'm using Firerox and Opera and it look rigth. Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3 Version8.52 Build7721 PlatformWin32 SystemWindows 2000 Espinas Alexandre CONRAD wrote: > Hello, > > I am wondering if you all

Re: Can we hook ManyToMany default Manager in Admin site

2006-05-23 Thread favo
sorry for wrong url, correct : http://groups.google.com/group/django-users/browse_thread/thread/0f2be868801ddcbd --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: One-to-one not to be used?

2006-05-23 Thread Joeboy
SmileyChris wrote: > According to the docs: > > "The semantics of one-to-one relationships will be changing soon, so we > don't recommend you use them. If that doesn't scare you away, keep > reading." > > It scares me a bit. Can anyone expand on the "changing semantics" or > point me to an

can Transcation middleware work with Transcation decorators?

2006-05-23 Thread favo
Can they work together? --~--~-~--~~~---~--~~ 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

Re: Can we hook ManyToMany default Manager in Admin site

2006-05-23 Thread favo
http://groups.google.com/group/django-users/browse_thread/thread/ae4387ae91ed6eb2 Yeah, I found it. however I think we need more agility way to hook the querysets. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Can't order the FK in admin?

2006-05-23 Thread favo
I use the limit_choices_to in FK to custom a FK choices, but how to order it. in the Django, we have to order a Queryset bt order_by() method, but limit_choices only need a dict or a Q object. I don't want touch Database. Is there a method to deal with?

Re: Development Admin Date

2006-05-23 Thread keukaman
One more note - both servers are on the same machine. --~--~-~--~~~---~--~~ 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

Re: Development Admin Date

2006-05-23 Thread keukaman
The problem only occurs when I run the Django development server. When I looked at the same pages on Apache running "live" (it's all on my local pc), the "Published Today" field works as I would expect. Adrian Holovaty wrote: > On 5/21/06, keukaman <[EMAIL PROTECTED]> wrote: > > Following the

Re: remedial django - what IS a "site" exactly?

2006-05-23 Thread Simon de Haan
Hi Adrian, Thanks for the documentation. I, like david, was a little confused about the Sites stuff. A slight correction though: Under "How Django uses the sites framework", the "authentication framework" link in bullet 5 links to the "syndication framework". Thanks! Simon de Haan

Re: Apache Localhost Django Admin Look & Feel

2006-05-23 Thread keukaman
Ian - I finally got it to work. Thanks for the help. --~--~-~--~~~---~--~~ 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

django site doesn't seem to display right under firefox

2006-05-23 Thread Alexandre CONRAD
Hello, I am wondering if you all have the same problem as I am using Firefox (Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3): On the home page: - the "django" logo doesn't display at all. - the tagline "the web framework for perfectionists with

Searching on a calculated value

2006-05-23 Thread Gary Wilson
I have a model similar to: === class User: first_name = CharField() last_name = CharField() def get_full_name(self): return "%s %s" % (self.first_name, self.last_name) === Is there a way I can search by full name (without storing the calculated

Re: remedial django - what IS a "site" exactly?

2006-05-23 Thread David Robinson
Many thanks to James and Adrian for explaining sites. I'm expecting to have several more questions over the coming weeks as we get further into things, and it's nice to know that the Django community is so responsive. Dave --~--~-~--~~~---~--~~ You received

Re: Django on Intel mac?

2006-05-23 Thread Jeff Forcier
Yea, I have Django with psycopg running beautifully on an Intel iMac. I'm pretty sure I used DarwinPorts to install everything, including Python; I don't remember having any big compile errors, but if I did, I was clearly able to fix them. So there is a way! Jeremy is correct that you need the

Re: Function caching

2006-05-23 Thread tnleeuw
Elver Loho wrote: > Can Django's caching framework somehow be used to cache the output of > any function? > [...] > > Does Django offer any decorators for caching the output of any > function, such as get_latest_books, based on the arguments passed to > it? > [...] Such decorators already

Function caching

2006-05-23 Thread Elver Loho
Can Django's caching framework somehow be used to cache the output of any function? What I have right now is basically a standard Django project where I've swapped out the templating engine and replaced it with Kid and where I'm not using the supplied O-R mapper, but where I've written my own DB

Re: Searching on a calculated value

2006-05-23 Thread Malcolm Tredinnick
Hi Gary, On Mon, 2006-05-22 at 21:20 -0700, Gary Wilson wrote: > I have a model similar to: > === > class User: > first_name = CharField() > last_name = CharField() > >def get_full_name(self): > return "%s %s" % (self.first_name, self.last_name) >

Re: One-to-one not to be used?

2006-05-23 Thread olive
This works perfectly well for me --~--~-~--~~~---~--~~ 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