Re: simple tags and (auto)escaping

2008-11-27 Thread frank h.
forgot to add that I am using django-1.0.1 On Nov 26, 9:43 pm, "frank h." <[EMAIL PROTECTED]> wrote: > I am writing a simple tag as follows: > > - > from django.template import Library > from django.utils.safestring import mark_for_

simple tags and (auto)escaping

2008-11-26 Thread frank h.
I am writing a simple tag as follows: - from django.template import Library from django.utils.safestring import mark_for_escaping register = Library() @register.simple_tag def testtag(): return mark_for_escaping("&><%") - calling the tag from my template, inserts th

get to named url pattern from request.path

2007-12-18 Thread frank h.
hello, in a contextprocessor i am writing, i would like to use the "named url" of the current view instead of request.path. I toyd with django.core.urlresolvers.resolve() but that just returns the function configured in urls.py and not the name it was configured with to give an example: my urls.

Re: strange UnicodeDecodeError after update to latest trunk

2007-09-29 Thread frank h.
for others stumbling upon the same problem: I found a fix and filed a ticket at http://code.djangoproject.com/ticket/5640 On Sep 25, 11:17 am, "frank h." <[EMAIL PROTECTED]> wrote: > Hello all > ever since updating to latest trunk (past merge ofunicode-bra

strange UnicodeDecodeError after update to latest trunk

2007-09-25 Thread frank h.
Hello all ever since updating to latest trunk (past merge of unicode-branch), I get spurious UnicodeDecodeErrors sometimes accessing my views. I have posted about this problem earlier in the wrong group, django- developers: http://groups.google.com/group/django-developers/browse_thread/thread/54bf

Re: django as a platform for a commercial SaaS project?

2007-03-25 Thread frank h.
> If I wanted to create commercial quality hosted software, would django > be the best solution? it depends! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

use date_hierarchy from admin app in my own views

2007-02-02 Thread frank h.
hello, can I use the _very cool_ 'date_hierarchy' tag from the admin application in my own views? I have asked this before and received some answer http://groups.google.com/group/django-users/browse_frm/thread/30dc2ccb12f72059/185c211d00ed85ef?lnk=gst&q=date_hierarchy&rnum=4#185c211d00ed85ef ..t

Re: using oracle database with django running on an Intel Mac

2007-01-23 Thread frank h.
forgot to add: - I tried compiling with both gcc 4.01 and gcc 3.3 - invoking "python setup.py build" needs env ORACLE_HOME set, I set it to point to the instaclient directory frank h. wrote: > Hello all > I have an Intel based Macbook, universal Python 2.4 and the Oracle > in

using oracle database with django running on an Intel Mac

2007-01-23 Thread frank h.
Hello all I have an Intel based Macbook, universal Python 2.4 and the Oracle instaclient installed. I can connect fine to my Oracle db which runs on another server using sqlplus. I am on trunk (r4365) and I just want to use django to make some nice views of some of the tables in that oracle db -

Re: Django Admin - "Site administration"

2006-11-05 Thread frank h.
hej carl, check here http://www.djangoproject.com/documentation/tutorial2/#customize-the-admin-look-and-feel good luck -frank Carl Holm wrote: > Hello, > > It's probably obvious, but after searching the docs and beyond, I have > not been able to locate the origin of "Site administration", > whic

class Meta: ordering by foreign key

2006-10-10 Thread frank h.
is it possible? I am on the latest trunk, 0.96-pre... in the admin class, I can fake ordering by a foreign key field using the table name and list_select_related class Admin: list_select_related = True ordering = ['myapp_mytable.myfield'] the same does no

class Meta: ordering by foreign key

2006-08-31 Thread frank h.
is it possible? in the admin class, I can fake ordering by a foreign key field using the table name and list_select_related class Admin: list_select_related = True ordering = ['myapp_mytable.myfield'] the same does not seem to work for class Meta, which g

admin "page not found" after m-r migration

2006-05-29 Thread frank h.
Hello, I recently migrated to trunk and all seems great except that I cannot change the admin user when logged in as admin user... the error message in the browser is: Page not found (404) Request Method: GET Request URL:http://127.0.0.1:8000/admin/auth/user/1/ can anyone shed some l

Re: Subclassing question

2006-05-16 Thread frank h.
I just migrated to m-r having used inheritance in my models. I was seeing this behaviour http://groups.google.com/group/django-users/browse_frm/thread/13a94a5ac9b5ff8a/f6fbcdd419ddf89e?q=page+not+found&rnum=1#f6fbcdd419ddf89e only when I stumbled across your comment, did I realize that m-r does

Re: admin app doesnt work after m-r migration

2006-05-16 Thread frank h.
thanks malcolm, I had prepared the necessary database changes in a script a while ago turns out the documentation has changed since then... :-) following the steps in the updated http://code.djangoproject.com/wiki/RemovingTheMagic#Databasechangesyoullneedtomake and everything works!! thanks, -fr

admin app doesnt work after m-r migration

2006-05-16 Thread frank h.
Hi I just migrated to magic-removal and everything seems fine (my views work etc) ...except that when I try to login into the admin app, I get an error about OperationalError at /admin/ (1054, "Unknown column 'django_content_type.model' in 'field list'") Request Method: GET Request URL:

Re: "choices" field option - how to make dynamic?

2006-04-14 Thread frank h.
Thanks Adrian for your quick answer, I should have mentioned that I was aware of the FilePathField and have played around with it. the reason I cannot use it is that I want to display a list of _directories_ and not _files_ unfortunately I wasnt able to make FilePathField give me a list of direct

"choices" field option - how to make dynamic?

2006-04-14 Thread frank h.
Hello all, one field in my model is a "directory" field. I present the user with a choice of directories on the local filesystem in the admin app. Basically infolder = meta.CharField('Video infolder', maxlength=250, choices=getDirs()) with a custom getDirs method that uses python os module and r

hierarchical navigation by date in my external view

2006-01-27 Thread frank h.
Hello, I want my external view to feature a "date hierarchy", as the one that can be configured in the admin application. This is really one fantastic feature, I could use it all over the place in my applications! If only it was more readily accessible to the layman... But I understand that with t

Re: Help running Django with mod_python

2005-12-01 Thread frank h.
hej paolo, I am on OS X as well, and I had problems with Apache and mod_python. Turns out that my python (version 2.4.1 from fink) was the problem. the following worked for me: stop any apache that is currently running (fink or buildin) install python 2.4.1 framework build from http://undefined

use admin features in external applications

2005-11-12 Thread frank h.
hello, how can i reuse some features of the admin app in my external applications? the search_fields and date_hierarchy features are so nice! is there a simple way? -frank

ManyToManyField question

2005-10-16 Thread frank h.
Hello, I am on django revision 880 and I like it a lot. Currently, I am trying to get from a simple Model: = WEEKDAY_CHOICES = ( (0, 'Monday'), (1, 'Tuesday'), (2, 'Wednesday'), (3, 'Thursday'), (4, 'Friday'), (5, 'Saturd