question about FieldPathFiled

2005-12-12 Thread Fat
I add a FieldPathFiled in my code fp = meta.FilePathField(path="c:/windows", match="*.gif", recursive=True) but in admin mode , I got error message. . File "C:\Python24\lib\pprint.py", line 291, in _safe_repr rep = repr(object) File "C:\Python24\Lib\site-packages\django\core\formfield

Re: save and session

2005-12-12 Thread Dody Suria Wijaya
(doh, why jumbled, re-post..) Thanks, I'll paste it here: class ModelsAddRequest: def process_request(self, request): for x in dir(django.models.intranet): klass = django.models.intranet.__dict__[x] if isinstance(klass, meta.ModelBase): klass.request =

Re: save and session

2005-12-12 Thread Dody Suria Wijaya
Thanks, I'll paste it here: class ModelsAddRequest: def process_request(self, request): for x in dir(django.models.intranet): klass = django.models.intranet.__dict__[x] if isinstance(klass, meta.ModelBase):

Re: Calling templates within templates - a'la Mason

2005-12-12 Thread ToddG
Just on the very unlikely chance you're not aware of it, Myghty is Mason++ implemented in Python, and would probably let you work as you did with Mason (if you want to). http://www.myghty.org/

Re: Calling templates within templates - a'la Mason

2005-12-12 Thread Robert Wittams
Joel wrote: > I gave django a try at work to develop a survey application. Turned out > pretty sweet, I felt very productive and spent most of my time > concentrating on survey tasks. I felt frustrated twice, these are the > hurdles I faced that I feel I have probably missed obvious solutions > >

Re: Which user posted the blog entry.

2005-12-12 Thread Ian Holsman
from my understanding there is only way to get at it in the presave, and that is to either set the field in middleware, or in the custom manipulator before the object gets 'saved' I blogged about it here http://feh.holsman.net/articles/2005/12/07/some-basic-audit-functionality and provided some c

Calling templates within templates - a'la Mason

2005-12-12 Thread Joel
I gave django a try at work to develop a survey application. Turned out pretty sweet, I felt very productive and spent most of my time concentrating on survey tasks. I felt frustrated twice, these are the hurdles I faced that I feel I have probably missed obvious solutions - Parsing data from the

Re: Serving both Django content and plain files with mod_python

2005-12-12 Thread Richie Hindle
[Richie] > can I have some root URLs served by Django and some served by Apache? [Adrian] > http://www.djangoproject.com/documentation/modpython/#serving-media-files [Bryan] > I would use the LocationMatch: > > > SetHandler None > > > and add txt and ico to the regular expression. Wond

Re: Serving both Django content and plain files with mod_python

2005-12-12 Thread Bryan Murdock
On 12/12/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 12/12/05, Richie Hindle <[EMAIL PROTECTED]> wrote: > > I'd like the root page of my site - http://example.com/ - to be served by > > Django. But there also static files that need to live in the root > > directory, eg. robots.txt and f

Re: Serving both Django content and plain files with mod_python

2005-12-12 Thread Adrian Holovaty
On 12/12/05, Richie Hindle <[EMAIL PROTECTED]> wrote: > I'd like the root page of my site - http://example.com/ - to be served by > Django. But there also static files that need to live in the root > directory, eg. robots.txt and favicon.ico. Using Apache/mod_python, can I > have some root URLs

Serving both Django content and plain files with mod_python

2005-12-12 Thread Richie Hindle
Hi, I'd like the root page of my site - http://example.com/ - to be served by Django. But there also static files that need to live in the root directory, eg. robots.txt and favicon.ico. Using Apache/mod_python, can I have some root URLs served by Django and some served by Apache? Thanks, --

Re: save and session

2005-12-12 Thread plisk
Dody Suria Wijaya wrote: Is it possible in djanggo to access current request's session variables inside _pre_save or _post_save function? I need to save current login userid into a "last_update_userid" field automatically by simply calling .save() Try hack in this thread http://gro

Re: Which user posted the blog entry.

2005-12-12 Thread Steffen Glückselig
Brett Hoerner wrote: > Remember that the Admin screen is under your control. You could just > not display the User bit in the Admin, allow it to be posted as blank > (blank=True), and the use _pre_save to grab the current User (session?) > and set it. I am looking for such a solution. How cou

save and session

2005-12-12 Thread Dody Suria Wijaya
Is it possible in djanggo to access current request's session variables inside _pre_save or _post_save function? I need to save current login userid into a "last_update_userid" field automatically by simply calling .save() Thanks -- dsw

Re: Which user posted the blog entry.

2005-12-12 Thread Brett Hoerner
Remember that the Admin screen is under your control. You could just not display the User bit in the Admin, allow it to be posted as blank (blank=True), and the use _pre_save to grab the current User (session?) and set it.

Re: Which user posted the blog entry.

2005-12-12 Thread [EMAIL PROTECTED]
Yes I guess that would be acceptable, accept that produces a drop down for the user to choose. So I could create a blog entry and say that it was written by "Bill", another user in the system. I would think there would be a way to get at who created that object from the object itself. Maybe fro

HTTP Response POST

2005-12-12 Thread Bsoltani
I'm trying to do Paypal authentication with django and it requires me to take a post from paypal, append a value to it, and then send it back. I have no problem getting the post from paypal, but what is the best way to send it back to paypal. I know it involves the HttpResponse object, but i'm l

Re: restructuredtext filter

2005-12-12 Thread [EMAIL PROTECTED]
Even better. Thanks again!

Re: restructuredtext filter

2005-12-12 Thread Jacob Kaplan-Moss
On Dec 12, 2005, at 12:28 PM, [EMAIL PROTECTED] wrote: I had to copy django/contrib/markup/templatetags/markup.py to django/templatetags and the with the {% load markup %} line the filter works now. You don't have to do that either. Just put "django.contrib.markup" in your INSTALLED_APPS sett

Re: restructuredtext filter

2005-12-12 Thread [EMAIL PROTECTED]
I do now! I had to copy django/contrib/markup/templatetags/markup.py to django/templatetags and the with the {% load markup %} line the filter works now. Thank you for your help!

Re: restructuredtext filter

2005-12-12 Thread James Bennett
On 12/12/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Today, I moved to the development version of django using svn. I have > everything working like before except the restructuredtext filter. I > have tried the same as above, and also changing the import line to Do you have the tag {% lo

restructuredtext filter

2005-12-12 Thread [EMAIL PROTECTED]
I was previously using the 0.90 Egg file, and I got the restructuredtext filter working by adding: from django.contrib.markup.templatetags import markup into my views.py file for my app. Then I could say someting like: article.content|restructuredtext in my .html file, and it worked. Today,

Re: Which user posted the blog entry.

2005-12-12 Thread Cheng Zhang
On Dec 12, 2005, at 10:11 PM, [EMAIL PROTECTED] wrote: I was digging around the source for djangoproject.com and noticed that in the blog model, it looks like the user has fills in the "author" as a text field. Is there a better way for the blog to know which user posted that entry? Can tha

Which user posted the blog entry.

2005-12-12 Thread [EMAIL PROTECTED]
I was digging around the source for djangoproject.com and noticed that in the blog model, it looks like the user has fills in the "author" as a text field. Is there a better way for the blog to know which user posted that entry? Can that info be gotten by who was logged in and made that post?