Re: Help me checking this model.. (tb included)

2005-08-23 Thread xtian
On 8/22/05, Brant Harris <[EMAIL PROTECTED]> wrote: > > I agree that it seems odd that Django would, in effect, force it's > ways upon you. But Django has been developed under a philosophy of > adding functionality only if there is a solid use-case for it. So if > you can conjure up a model tha

Re: SetEnv in mod_python

2005-08-23 Thread adrian
django currently requires apache2.0+ and mod_python3.1+ That's probably something that should be made more clear in the docs. Maybe they're planning support?

Re: CSS and PNG files in templates

2005-08-23 Thread Sam Newman
On 8/22/05, Andy Shaw <[EMAIL PROTECTED]> wrote: > > Krzysztof Drozd wrote: > > hi > > > > i hawe make a template 'base.html' and i use it in my apps. but > > 'base.html' use > > CSS and PNG files. > > > > my app template use 'base.html' but can't find my CSS and PNG files. > > what can i do? wha

Re: SetEnv in mod_python

2005-08-23 Thread Krzysztof Drozd
yes maybe :) yes i't works with apache 2.x and new mod_python :) but how to get admin interface? if i get my.net/admin/ i t produce 404 :( my http.conf: NameVirtualHost * ServerAdmin [EMAIL PROTECTED] DocumentRoot /var/www/ap/ Options FollowSymLinks

Re: CSS and PNG files in templates

2005-08-23 Thread Andy Shaw
Sam Newman wrote: Or more simply put, the Django web server doesn't serve your media (e.g. images, PNG, CSS) and there isn't a plan to (the related ticket is marked as WONTFIX). Which majorly blows IMHO. Yeah, that's slightly more to-the-point! It does seem somewhat contradictory to refuse t

fun with imports

2005-08-23 Thread [EMAIL PROTECTED]
I have a model that's making an xml-rpc call in _pre_save(). If I import ServerProxy at the top of the model file: from xmlrpclib import ServerProxy when _pre_save() is called it doesn't know what ServerProxy is. However if I write _pre_save like this: def _pre_save(self): if self.

Re: CSS and PNG files in templates

2005-08-23 Thread Jacob Kaplan-Moss
On Aug 23, 2005, at 6:12 AM, Andy Shaw wrote: Or more simply put, the Django web server doesn't serve your media (e.g. images, PNG, CSS) and there isn't a plan to (the related ticket is marked as WONTFIX). Which majorly blows IMHO. It does seem somewhat contradictory to refuse to let the bu

Re: fun with imports

2005-08-23 Thread Jacob Kaplan-Moss
On Aug 23, 2005, at 6:28 AM, [EMAIL PROTECTED] wrote: I have a model that's making an xml-rpc call in _pre_save(). If I import ServerProxy at the top of the model file: from xmlrpclib import ServerProxy when _pre_save() is called it doesn't know what ServerProxy is. See "Using module global

Re: CSS and PNG files in templates

2005-08-23 Thread Bryan L. Fordham
On Tue, Aug 23, 2005 at 12:12:31PM +0100, Andy Shaw wrote: > It does seem somewhat contradictory to refuse to let the built-in server > serve static media in general whilst hacking it so that it does output > the admin media. Presumably this is so that the admin CSS/Javascript is > available,

Re: fun with imports

2005-08-23 Thread Bryan L. Fordham
On Tue, Aug 23, 2005 at 07:36:06AM -0500, Jacob Kaplan-Moss wrote: > See "Using module globals in models" at http://code.djangoproject.com/ > wiki/DataModelPitfalls -- the short answer is that your model is > turned into a virtual module at run time, and the namespace changes. A couple of us

Re: CSS and PNG files in templates

2005-08-23 Thread Sam Newman
On 8/23/05, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > The point is that serving media from Django is a Bad Idea(tm), and > one of the philosophies behind Django is that we want to make it > easier to do the right thing than to do the wrong thing. Without CSS or JavaScript, people attemp

HTMLField

2005-08-23 Thread Krzysztof Drozd
hi how to get in django textfield with formating (like a wiki)? The TextField ingnores HTML tags. and how to add a url to text in Field? thanks kd.

Re: CSS and PNG files in templates

2005-08-23 Thread Andy Shaw
Jacob Kaplan-Moss wrote: The point is that serving media from Django is a Bad Idea(tm), and one of the philosophies behind Django is that we want to make it easier to do the right thing than to do the wrong thing. I'm not going to go into why serving media from an application server is bad

Re: CSS and PNG files in templates

2005-08-23 Thread Andy Shaw
Bryan L. Fordham wrote: Sure it's useful. It's not unusual at all to have static content served from a server that's designed for that (ie apache) even when you're running a very expensive app server such as weblogic. Okay, I was exaggerating somewhat. But as I see it, there are three basic

Re: importing modules

2005-08-23 Thread rb
Figured out my own problem: the I kept trying to import "project.apps.application.module" when the django configuration means that my sys.path is actually already in the project directory. Importing "apps.application.module" works fine.

Re: HTMLField

2005-08-23 Thread Krzysztof Drozd
wow: http://tinymce.moxiecode.com/index.php great stuff :)

Re: SetEnv in mod_python

2005-08-23 Thread Adrian Holovaty
On 8/23/05, Krzysztof Drozd <[EMAIL PROTECTED]> wrote: > if i get my.net/admin/ i t produce 404 :( > > PythonPath "['/var/www/ap'] + sys.path" > SetHandler python-program > SetEnv DJANGO_SETTINGS_MODULE tutgw.settings.main > PythonHandler django.core.handlers.modpython

Re: CSS and PNG files in templates

2005-08-23 Thread Adrian Holovaty
On 8/23/05, Sam Newman <[EMAIL PROTECTED]> wrote: > Or more simply put, the Django web server doesn't serve your media > (e.g. images, PNG, CSS) and there isn't a plan to (the related ticket > is marked as WONTFIX). Which majorly blows IMHO. My two cents: I can see the value in having the develo

Re: HTMLField

2005-08-23 Thread Adrian Holovaty
On 8/23/05, Krzysztof Drozd <[EMAIL PROTECTED]> wrote: > wow: http://tinymce.moxiecode.com/index.php Yeah, some folks have integrated Django with JavaScript WYSIWYG libraries. Check it out: TinyMCE: http://www.socialistsoftware.com/?p=8 Xinha: http://www.socialistsoftware.com/?p=10 -- Adrian Ho

Re: CSS and PNG files in templates

2005-08-23 Thread [EMAIL PROTECTED]
From what I understand the dev server is base on BaseHTTPServer, so it should be easy to write that for some of the resquests asking for /static (or anything the developper passes as a parameter) be handled directly thru it and be served by BaseHTTPServer on the filesystem(another config var?).

Dynamic Filters for Generic Views

2005-08-23 Thread [EMAIL PROTECTED]
Hi Folks, I have the date_based Generic Views working nicely, but I'm trying to add on the capability to filter the items in the view based on one of the fields (status) - this has to be chosen by the user - currently I was trying this through passing a value in the URL, but I'm not sure if it's

Re: HTMLField

2005-08-23 Thread Chuck Thier
I got FCKeditor (http://www.fckeditor.net/) working with Django last night. After a little more tweaking, I'll post some instructions. ChuckOn 8/23/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: On 8/23/05, Krzysztof Drozd <[EMAIL PROTECTED]> wrote:> wow: http://tinymce.moxiecode.com/index.php Ye

Re: Dynamic Filters for Generic Views

2005-08-23 Thread [EMAIL PROTECTED]
Okay, so I'm making some progress here. This line in my URLCONF will pass the status__exact = E. Problem is, it's hard coded. How do I set it up so that I can pass an arbitrary value as the desired 'status__exact'? (r'^(?P\d{4})/(?P[a-z]{3})/(?P\w{1,2})/E/$', 'django.views.generic.date_based.arc