Re: lighttpd and admin

2009-10-14 Thread justquick
I have lighty setup for several of my projects using fastcgi and to make them work, i had to set FORCE_SCRIPT_NAME = '' instead of FORCE_SCRIPT_NAME = '/' give that a try and see if {% url %} et al are still working On Oct 14, 11:22 am, "Mark (Nosrednakram)" wrote: > Hello All, > > I setup l

Re: When would you use Context instead of RequestContext?

2009-10-14 Thread justquick
it helps performance slightly since it does not include the request itself or any of the other goodies in TEMPLATE_CONTEXT_PROCESSORS On Oct 14, 12:39 pm, ringemup wrote: > Is there ever a reason to pass a plain Context rather than a > RequestContext when rendering a template? --~--~-~--

Re: Admin Settings

2009-10-14 Thread justquick
try using 'foreign_key__field1' instead On Oct 14, 12:04 pm, freeav8r wrote: > Is it possible to do something like this: > > class MyModelAdmin(admin.ModelAdmin): >     list_display = (‘field1’, field2’, ‘foreign_key’, ‘foreign_key.field1’, > foreign_key.field2’,) > > admin.site.register(MyMode

Re: DateField() , AttributeError: 'str' object has no attribute 'strftime'

2007-08-06 Thread justquick
I have recently been working on a model and found this problem: class Image(Model): name = CharField(maxlength=255) owner = ForeignKey('user') file = ImageField(upload_to='Image/%Y-%m/', blank=True, null=True) description = TextField() datetime = DateTimeField(auto_now_add=Tru

Django or Cheetah (why not both)?

2007-11-11 Thread justquick
Hi all, I have been working with another developer to create a contrib addon for cheetah template processing. The new django.contrib.cheetah is now in production and can render django contexts and templates into responses faster than django's builtin template engine. I want to see if any of yo

Re: Django or Cheetah (why not both)?

2007-11-11 Thread justquick
inside the view. What do you sugest we name it? Dont want to step on your feet (or namespaces) J On Nov 12, 12:09 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 11/11/07, justquick <[EMAIL PROTECTED]> wrote: > > >I have been working with another developer

Re: Django or Cheetah (why not both)?

2007-11-11 Thread justquick
Now the project is going under the name django_cheetahtemplates to avoid contrib namespace confusion. Regardless of name, having cheetah templates is very handy and increases the rendering times of your templates. We are working on transferring over all the power of the django tags/filters to chee

Re: Feeds

2007-11-11 Thread justquick
Try giving your model a get_absolute_url(self) method which returns the absolute (http://...) url of the object for use in feed links. If that does not work, reply with the complete traceback (usually found by clicking 'Switch to copy-and-paste view' on a standard Django error report) Justin On

Re: Does Hostmonster support Django?

2007-11-11 Thread justquick
It is possible to install Django (of any version) onto a webserver if you own it and have shell access, like a dedicated server. Other webhosts have these features already installed and are "easily" configurable. The complete list is here: http://code.djangoproject.com/wiki/DjangoFriendlyWebHosts

Re: Does Hostmonster support Django?

2007-11-12 Thread justquick
I have the same problem. They sent me the same notice with a couple links to their forums with suggestions as how to keep your memory (RSS) down, like regular restarts of apache and setting DEBUG = False in the settings. Follow these tips and your memory usage should be within acceptable limits.

Multi Engine Template System (Django/Cheetah/Mako/Myghty/Genshi)

2007-11-14 Thread justquick
by a noticeable amount was Cheetah. Here are the average times (in milliseconds) for 100 trials of 5 sets of measurement. cheetah 0.827 mako 1.328 django 2.207 myghty 2.712 genshi 8.212 I also used pylab and the chart is available here http://i239.photobucket.com/albums/ff209/justquick/template_ben

Re: Multi Engine Template System (Django/Cheetah/Mako/Myghty/Genshi)

2007-11-14 Thread justquick
I am not talking about replacing the whole builtin template system so that framework wide requires changes. Django is the default rendering system, but others should be enabled. Django should continue to ship its template system, which is a great system and has loads practical tools for web design

Re: how to get auto recoder id?

2007-11-14 Thread justquick
Do a select statement on the values > > i just use this code: > > cursor = connection.cursor() > > sql = "insert into popo_status( author_id , body , time, type ) VALUES > > (%s, %s, now(), '2')" > > cursor.execute( sql,(str(row[0]),msg) ) cursor.execute("select id from popo_status where author_i

Re: Form Field Question from python noob

2007-11-14 Thread justquick
Python does not have static/public/private objects like java does. Whats happening is that self.date_form is referencing date_form and that happens in the __init__ method On Nov 14, 2:31 pm, johnny <[EMAIL PROTECTED]> wrote: > I have seen forms without the "self" in front of the fields, eg. more

Re: MySqldb error:

2007-11-14 Thread justquick
You do not have the MySQLdb module installed and this can be tricky to setup on a hosted site. If you do not have shell access, contact your administrator and ask for this module. Otherwise either get the package or source from here http://sourceforge.net/projects/mysql-python and install it throu

Re: design Q: where to put peoples names

2007-11-16 Thread justquick
> Can the username be Null? >From the help text on username attr: "Required. 30 characters or fewer. Alphanumeric characters only (letters, digits and underscores)." > What if it was 1,000,000 names, like if I was publishing a phone book? Then using the user model, which does keep track of a lot

Re: advice on template shortcomings

2007-11-18 Thread justquick
> {% for item in mydict.items %} >the key: {{ item.0 }} >the value: {{ item.1 }} >{% for subitem in item.1 %} >{{ subitem }} >{% endfor %} > {% endfor %} UGH! How come django can make things so simple and complicated at the same time? I personally dont use the django templ