Best practice for shareable web application

2008-11-28 Thread Leon Yeh | New Avenue.net
Hi All, Usually, when I am working on django project, I have one database per web site. So one company has all its database in one single mysql database. However recently I am working on a site that had requirements similar to basecamp web site. Here are the new requirement: 1. Multiple comp

Re: Best practice for shareable web application

2008-11-29 Thread Leon Yeh | New Avenue.net
found any thing that I would considered optimal solution. Somebody must have seen this problem before and could have solved it. I am going back to see if pinax project has something like this. Anyhow, back to my research. Leon Yeh Graham Dumpleton wrote: > > > On Nov 29, 2:34 pm, &

Multiple host for one single django project

2008-07-18 Thread Leon Yeh | New Avenue.net
Hi, I have been using one domain name for my django project. http://www.example.com. Now I need to add new domain name http://blog.example.com. In the new domain name, all the pattern should be same the main host(www) with one different pattern. For blog site, for ^$ pattern go to a differen

Generating widget based on class type for a Custom Form

2008-10-06 Thread Leon Yeh | New Avenue.net
Hi, I need to generate a different output based if it is a select input type or it is a text field. This code does not work. I am trying to do something like this: {% for field in form %} {% ifequal field.field.widget django.forms.widgets.Select %} {{ field.label_tag }} {{ field.errors }}

Re: Generating widget based on class type for a Custom Form

2008-10-07 Thread Leon Yeh | New Avenue.net
6)254-1757 x880 [EMAIL PROTECTED] Imagination Delivered. www.newavenue.net Ronny Haryanto wrote: > On Tue, Oct 7, 2008 at 7:09 AM, Leon Yeh | New Avenue.net > <[EMAIL PROTECTED]> wrote: >> I need to generate a different output based if it is a select input type >> or it is

Re: Generating widget based on class type for a Custom Form

2008-10-07 Thread Leon Yeh | New Avenue.net
Hi, I also need to switch the and tags, so attrs would not help. For example for select widget I need to generate and for other controls, I need to generate Thanks Leon Yeh Ulises wrote: >> and for other controls, I need to generate >> > > How about using widget.attrs? > > ht

Display image in django admin

2008-06-19 Thread Leon Yeh | New Avenue.net
Hi All, I have a small django admin site that I need to display image into the object list. The photo currently contained the path to image. When got to the page of django admin escape the html output. How can I make it so I can output raw html to the django admin ? class News(models.Model):