Re: Load Templates from outside TEMPLATE_DIRS

2009-09-11 Thread Kenneth Gonsalves
On Saturday 12 Sep 2009 9:26:15 am mviamari wrote: > I'm trying to load a template file from outside of TEMPLATE_DIRS, i.e. > the template file does not reside in any of the template directories > specified in TEMPLATE_DIRS. > > Does anyone know if this is possible? I tried just specifying a

Re: Running Django on Tornado's HTTP server

2009-09-19 Thread Kenneth Gonsalves
On Monday 14 Sep 2009 1:56:32 am Bret Taylor wrote: > he module: > > import django.core.handlers.wsgi > import os > import tornado.httpserver > import tornado.ioloop > import tornado.wsgi > > def main(): > os.environ["DJANGO_SETTINGS_MODULE"] = 'myapp.settings' >

problem installing photologue

2009-09-21 Thread Kenneth Gonsalves
hi, I am on latest trunk and using latest photologue trunk. When I install it as per instructions I get the error given below. I haven't a clue as to what that message means. I know it has nothing to do with unicode as my db is unicode. If I comment out 'photologue' in installed apps, the app

Re: django vps hosts

2009-09-23 Thread Kenneth Gonsalves
On Thursday 24 Sep 2009 7:24:25 am neri...@gmail.com wrote: > I think I'm ready to finally switch to a django vps host due to > problems with django on DreamHost. Can anyone recommend a good vps > host? slicehost gandi.net linode -- regards kg http://lawgon.livejournal.com

Re: list some django-powered web sites

2009-09-24 Thread Kenneth Gonsalves
On Thursday 24 Sep 2009 1:36:37 pm Anrs wrote: > hi everybody, We want to develop a Bussiness web site with Django > framework, but we can't decide django's performance. So, would you list > some > large-scale web sites that used django for us? http://djangosites.com -- regards kg

Re: Running Django on Tornado's HTTP server

2009-09-29 Thread Kenneth Gonsalves
On Saturday 19 Sep 2009 5:13:39 pm Kenneth Gonsalves wrote: > On Monday 14 Sep 2009 1:56:32 am Bret Taylor wrote: > > he module: > > > > import django.core.handlers.wsgi > > import os > > import tornado.httpserver > > import tor

Re: Running Django on Tornado's HTTP server

2009-09-29 Thread Kenneth Gonsalves
On Tuesday 29 Sep 2009 2:44:26 pm Ramdas S wrote: > can I serve media > > > > from tornado, and if so, a pointer as to how? > > > > solved - managed to run several django sites of an nginx instance using > > virtual hosts and individual tornado servers for each virtual host. > > Coolness > >

Re: Running Django on Tornado's HTTP server

2009-09-29 Thread Kenneth Gonsalves
On Tuesday 29 Sep 2009 8:07:55 pm Javier Guerra wrote: > On Tue, Sep 29, 2009 at 4:24 AM, Kenneth Gonsalves > > <law...@thenilgiris.com> wrote: > > will document after trying it in production - a zillion times faster > > faster than. ? flup? faster than apa

Re: Running Django on Tornado's HTTP server

2009-09-29 Thread Kenneth Gonsalves
On Tuesday 29 Sep 2009 2:44:26 pm Ramdas S wrote: > > > cool - this worked out of the box - but no css and js - can I serve > > > media from tornado, and if so, a pointer as to how? > > > > solved - managed to run several django sites of an nginx instance using > > virtual hosts and individual

is this an i18n bug or a feature?

2009-10-07 Thread Kenneth Gonsalves
hi, I recently added malayalam to an app I run - unfortunately Malayalam does not load. (Tamil and english work fine). I then found that django itself does not have malayalam. That deficiency is being rectified, but in the meantime why should malayalam not load? I tried to create

Re: is this an i18n bug or a feature?

2009-10-07 Thread Kenneth Gonsalves
On Thursday 08 Oct 2009 7:05:27 am Karen Tracey wrote: > On Wed, Oct 7, 2009 at 8:15 PM, Kenneth Gonsalves <law...@thenilgiris.com>wrote: > > hi, > > > > I recently added malayalam to an app I run - unfortunately Malayalam does > > not > > load. (Tam

Re: Is django comment's honeypot really useful?

2009-10-07 Thread Kenneth Gonsalves
On Thursday 08 Oct 2009 9:32:23 am Joshua Partogi wrote: > I want to ask for your advice here regarding the honeypot field in > django comments. Is it really useful to prevent spam? Or should we add > another method for spam prevention and shouldn't really rely on this > honeypot. I currently

Re: Simple Form and Model question

2009-10-10 Thread Kenneth Gonsalves
On Saturday 10 Oct 2009 11:34:11 am LuisC wrote: > So, what is the argument Clientes() is specting??? Why in shell the > field list with values are the correct arguments?? you are using keyword arguments in the shell and positional arguments in the view - maybe that is the problem? -- regards

Re: efficiently deleting content based on how old it is

2009-10-10 Thread Kenneth Gonsalves
On Sunday 11 Oct 2009 9:07:38 am buttman wrote: > you could also do it this way: > > http://pythonblog300246943.blogspot.com/2009/09/cron-jobs-with-django-made- >easy.html interesting - but the author's commenting module is b0rked, so was unable to add a comment (I hope he sees this and sets it

Re: Apache WSGI DJANGO

2009-10-11 Thread Kenneth Gonsalves
On Sunday 11 Oct 2009 12:14:13 pm lafada wrote: > Apache says, > > File does not exist: /var/lib/python-support/python2.5/django/contrib/ > admin/media/js/actions.js > > When I tried to locate server says, > /usr/lib/python2.5/site-packages/django/contrib/admin/media/js/ > actions.js > > what may

Re: __unicode__(self) doesn't work

2009-10-11 Thread Kenneth Gonsalves
On Monday 12 Oct 2009 10:39:48 am Denis Bahati wrote: > class Poll(models.Model): > question = models.CharField(max_length=200) > pub_date = models.DateTimeField('date published') > def __unicode__(self): > return self.question > def was_published_today(self): > return

Re: Hi All: __unicode__(self)

2009-10-11 Thread Kenneth Gonsalves
On Monday 12 Oct 2009 11:05:38 am Denis Bahati wrote: > class Poll(models.Model): > question = models.CharField(max_length=200) > pub_date = models.DateTimeField('date published') > def __unicode__(self): > return self.question > def was_published_today(self): > return

Re: Hi All: __unicode__(self)

2009-10-12 Thread Kenneth Gonsalves
On Monday 12 Oct 2009 11:25:27 am Russell Keith-Magee wrote: > On Mon, Oct 12, 2009 at 1:44 PM, Kenneth Gonsalves > > <law...@thenilgiris.com> wrote: > > On Monday 12 Oct 2009 11:05:38 am Denis Bahati wrote: > >> class Poll(models.Model): > >> que

migrating apps from pre MR branch

2009-10-12 Thread Kenneth Gonsalves
hi, I had 4 legacy sites running on pre-MR django, written back in 2005. Since feature requests were minimal once the apps were complete, there was no reason to upgrade them. Recently however, after I started using virtualenv for my trunk apps, I was having problem with admin log in on the

Re: looking for simple comment app

2009-10-14 Thread Kenneth Gonsalves
On Wednesday 14 Oct 2009 12:47:34 pm andreas schmid wrote: > im looking for a simple comment app. > i need commmenting for instances only by logged in users and the author > is obviously request.user, dont need any preview or whatever. maybe a > mail notification on instances i commented on. > >

Re: newbie. need help in validation

2009-10-14 Thread Kenneth Gonsalves
On Wednesday 14 Oct 2009 3:04:10 pm danin wrote: > I am new to Django (started 2 weeks back). right now i am > designing one application having model- > class info(models.Model): >name=models.CharField(max_length=100) >dob=models.DateField() >dod=models.DateField() >

Re: newbie. need help in validation

2009-10-14 Thread Kenneth Gonsalves
On Wednesday 14 Oct 2009 3:08:00 pm robin nanola wrote: > try reading this > http://www.cotellese.net/2007/12/11/adding-model-field-validation-to-the-dj >ango-admin-page/ I do not think validators exist in django now - that blog post was done in 2007. -- regards kg

Re: Running Tornado instead of modwsgi apache

2009-10-15 Thread Kenneth Gonsalves
On Friday 16 Oct 2009 4:16:26 am Graham Dumpleton wrote: > > > Are you certain that the web server is the performance bottleneck? In > > > my experience, it rarely is. > > > > That argument aside, can we get an answer? > > But what he states is very important and shouldn't just be ignored. > >

Re: Running Tornado instead of modwsgi apache

2009-10-15 Thread Kenneth Gonsalves
On Friday 16 Oct 2009 8:10:08 am djangou...@gmail.com wrote: > Blog post with tornado setup? :) http://www.djangosnippets.org/snippets/1748/ -- regards kg http://lawgon.livejournal.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: django + mod_python + apache2 config problem

2009-10-19 Thread Kenneth Gonsalves
jango in your trac and trac in your django. -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gro

Re: using ajax with django

2009-10-19 Thread Kenneth Gonsalves
> you need to install. > > As Anton says, you didn't need any special library to use ajax in django, > but if you need an "easy-way" try http://dajaxproject.com/ it may help > you. wow! looks real good. -- regards Kenneth Gonsalves Senior Project

spaces in urls

2009-10-24 Thread Kenneth Gonsalves
hi, I used to handle spaces in my urls by using [\w\s]+, and it used to work. Now I am getting this error: http://127.0.0.1:8886/message/This%20item%20is%20still%20under%20construction/ not found. latest svn head. -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http

Re: syncdb for INSTALLED_APPS throws errors

2009-10-29 Thread Kenneth Gonsalves
o the database, either it is not installed or it is not on the path. -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: how could i specify column by using ManyToManyField ?

2009-10-29 Thread Kenneth Gonsalves
opics/db/queries/#many-to-many- relationships -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post t

solving the %20 problem

2009-11-01 Thread Kenneth Gonsalves
Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@google

Re: solving the %20 problem

2009-11-01 Thread Kenneth Gonsalves
> these are usually user generated - they love to put spaces. I can handle spaces, but would like to know how the spaces become %20 and how to prevent this. -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ --~--~-~--~~~---

Re: solving the %20 problem

2009-11-01 Thread Kenneth Gonsalves
> keys = environ.keys() > keys.sort() > for key in keys: > print >> output, '%s: %s' % (key, repr(environ[key])) > print >> output > > output.write(input.read(int(environ.get('CONTENT_LENGTH', '0' > > return [output.ge

Re: Remote developer opportunity

2009-11-02 Thread Kenneth Gonsalves
On Monday 02 Nov 2009 1:17:01 pm Kashif Azeem wrote: > I am interested. If you can write a little bit about yourself, type of > work, how to apply? > please take this offlist -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpli

Re: solving the %20 problem

2009-11-02 Thread Kenneth Gonsalves
On Monday 02 Nov 2009 9:54:11 am Kenneth Gonsalves wrote: > On Monday 02 Nov 2009 9:36:23 am Graham Dumpleton wrote: > > > these are usually user generated - they love to put spaces. I can > > > handle spaces, but would like to know how the spaces become %20 and

Re: Remote developer opportunity

2009-11-02 Thread Kenneth Gonsalves
On Monday 02 Nov 2009 3:37:38 pm Chris Withers wrote: > Kenneth Gonsalves wrote: > > On Monday 02 Nov 2009 1:17:01 pm Kashif Azeem wrote: > >> I am interested. If you can write a little bit about yourself, type of > >> work, how to apply? > >

Re: Accessing 'bytea' field using django.

2009-11-03 Thread Kenneth Gonsalves
e documentation for custom field types to roll your own. Generally speaking though, media should be served separately from django itself - often by a different webserver from a different machine. -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ --~--~

Re: language switching in admin

2009-11-07 Thread Kenneth Gonsalves
nguage modifiying the main > admin template and giving them a change language form? > well I added the change language form to the main base.html form in admin (by overriding it), but the call to "/i18n/setlang/" is not working. Maybe a path problem. Any clues? -- regards Kenne

Re: language switching in admin

2009-11-07 Thread Kenneth Gonsalves
On Sunday 08 Nov 2009 9:47:53 am Kenneth Gonsalves wrote: > > And letting the users to change their language modifiying the main > > admin template and giving them a change language form? > > > > well I added the change language form to the main base.html form in

Re: language switching in admin

2009-11-08 Thread Kenneth Gonsalves
On Sunday 08 Nov 2009 9:51:23 am Kenneth Gonsalves wrote: > > well I added the change language form to the main base.html form in admin > > (by overriding it), but the call to "/i18n/setlang/" is not working. > > Maybe a path problem. Any clues? > &

Re: How to handle this race condition?

2009-11-09 Thread Kenneth Gonsalves
tell me which middleware/decorator should I use to make sure > all those run within a single transaction? I'm pretty new to this. > transaction_commit_on_success - not too sure of the spelling. -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/

Re: A simple database project

2009-11-10 Thread Kenneth Gonsalves
out ModelAdmin.search_fields in the docs. Not sure that this is what you are looking for though. -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: admin.site.register() - help

2009-11-11 Thread Kenneth Gonsalves
mention what error you are getting -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegrou

Re: admin.site.register() - help

2009-11-11 Thread Kenneth Gonsalves
On Thursday 12 Nov 2009 9:33:20 am neridaj wrote: > I don't get an error, the models just aren't showing up in the admin. > what does syncdb say? -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ -- You received this message because you are subs

Re: admin.site.register() - help

2009-11-11 Thread Kenneth Gonsalves
not see any error in indentation, but the best way to check is to press 'compile' on your ide and see if any errors show - indentation errors will show. -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ -- You received this message because you are subscri

Re: Making the case for Django (vs. Drupal)

2009-11-12 Thread Kenneth Gonsalves
with the one hole in django in the past 4 years. btw, I tried to comment on your blog, but was rejected saying I was behind a proxy. Given that practically any one on a LAN is behind a proxy, this in practice prevents comments. -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS ht

Re: actions & triggers

2009-11-12 Thread Kenneth Gonsalves
ng for something like this? http://docs.djangoproject.com/en/dev/topics/signals/ -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: The job of a django web designer

2009-11-15 Thread Kenneth Gonsalves
to code without Dreamweaver. > perfect answer - especially the last point -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

Re: Making the case for Django (vs. Drupal)

2009-11-15 Thread Kenneth Gonsalves
curity holes. And I find it impossible to counter this. I do also point out to plone vs drupal, but there again the argument is the drupal is more widely used and hence has more observable vulnerabilities. It does not sound logical. -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS h

Re: Making the case for Django (vs. Drupal)

2009-11-15 Thread Kenneth Gonsalves
On Monday 16 Nov 2009 6:50:10 am Christophe Pettus wrote: > On Nov 15, 2009, at 5:10 PM, Kenneth Gonsalves wrote: > > I do also point out to plone vs drupal, but there again the > > argument is the drupal is more widely used and hence has more > > observable > &g

Re: first project taking it too production server

2009-11-16 Thread Kenneth Gonsalves
g the drupal installation in any way... > do you have shell access? is python *really* available (not just the binary, but all the modules? -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ -- You received this message because you are subscribed to th

Re: Making the case for Django (vs. Drupal)

2009-11-16 Thread Kenneth Gonsalves
t a django issue (could be wrong). -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com.

Re: Django i18n

2009-11-16 Thread Kenneth Gonsalves
have done everything else correctly, it should work. -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

Re: Making the case for Django (vs. Drupal)

2009-11-16 Thread Kenneth Gonsalves
On Tuesday 17 Nov 2009 8:46:31 am Mike Ramirez wrote: > On Monday 16 November 2009 18:08:35 Kenneth Gonsalves wrote: > > On Monday 16 Nov 2009 10:44:27 pm Mike Ramirez wrote: > > > > it is precisely this assumption that does not seem logical to me. But > > >

Re: Django and reportlab table question

2009-11-16 Thread Kenneth Gonsalves
ngs like different languages, types etc. -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us.

Re: Help with manage.py syncdb

2009-11-16 Thread Kenneth Gonsalves
the python module used to connect to mysql - or maybe you installed it wrong. (usually the last line of a traceback tells you what you did wrong) -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ -- You received this message because you are subscribed to the

Re: first project taking it too production server

2009-11-17 Thread Kenneth Gonsalves
drupal site. It would be good if you told us who your host is. -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send em

Re: Django javascript includes

2009-11-17 Thread Kenneth Gonsalves
On Tuesday 17 Nov 2009 3:45:01 pm Thierry wrote: > In Django its simply a line of template code. > what line of code is this? -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ -- You received this message because you are subscribed to the

Re: Multiple sites on a single server

2009-11-19 Thread Kenneth Gonsalves
rwarded from apache to a lighttpd instance. I have my sites path > containing each project (sites/site1 sites/site2 etc.) and have had this > setup for quite some time with absolutely zero problems. > I used to do this - I find it much easier to do it with nginx -- regards Kenneth Gon

Re: FAQ?

2009-11-19 Thread Kenneth Gonsalves
oned in the IRC topic. -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscr

Re: How best to display a report?

2009-11-21 Thread Kenneth Gonsalves
in the docs. -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from

Re: WebFaction warning

2009-11-27 Thread Kenneth Gonsalves
ng FUD from one instance. -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To un

Re: sorl thumbnail: messed-up thumb file path

2009-12-06 Thread Kenneth Gonsalves
On Sunday 06 Dec 2009 4:27:47 pm omat wrote: > Sorl thumbnail is creating invalid directories for thumbnails in my > development environment (mac os x, django dev server). > do not blame Sorl thumbnail - please post that part of your model that shows 'upload_to' setting. -- regard

handling changed files in ModelForm

2009-12-13 Thread Kenneth Gonsalves
? -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group,

csrf error on login and admin

2009-12-14 Thread Kenneth Gonsalves
login view in the prescribed manner. Any clues as to what is going wrong? -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: csrf error on login and admin

2009-12-14 Thread Kenneth Gonsalves
On Monday 14 Dec 2009 4:20:54 pm Kenneth Gonsalves wrote: > I just upgraded to the latest trunk. I get csrf cookie not set error on > attempting to log in - both on site and in admin. I have added the > middleware as prescribed and also added the {% csrf_token %} within the > form

Re: Forms not same fields than Models

2008-03-26 Thread Kenneth Gonsalves
On 26-Mar-08, at 6:44 PM, didier rano wrote: > I need to have a Form (newforms) with different fields than my > Model. In fact, one form instance will generate several models > instances. Haves you seen it before ? How create and update it ? http://www.djangosnippets.org/snippets/463/ --

Re: Problem with nested loop

2008-03-28 Thread Kenneth Gonsalves
On 29-Mar-08, at 10:13 AM, Brandon Taylor wrote: > Sorry, that's my fault. I was trying to simplify the naming a bit for > the post. 'work_category' should just be 'category' could you paste the relevant models also (preferably without 'simplifying') -- regards kg

Re: Problem with nested loop

2008-03-28 Thread Kenneth Gonsalves
On 29-Mar-08, at 10:30 AM, Brandon Taylor wrote: > Sure. This app is for my portfolio. Here's my models.py > > class WorkCategory(models.Model): > title = models.CharField(max_length = 30) > position = models.PositiveSmallIntegerField() > > def __unicode__(self): >

Re: Problem with nested loop

2008-03-28 Thread Kenneth Gonsalves
On 29-Mar-08, at 10:52 AM, Brandon Taylor wrote: > So, to simplify my question, how can I access the child objects of a > 'work_category' through the nested for loop, given my model structure? each WorkSample will have one work_category which you can access like this: worksamples =

Re: Problem with nested loop

2008-03-29 Thread Kenneth Gonsalves
On 29-Mar-08, at 11:17 AM, Brandon Taylor wrote: > What I would like to accomplish is output that looks as such: > > Category name > > Sample Name > Sample Name > Sample Name > > > Category name > > Sample Name > Sample Name > Sample Name > > wc = WorkCategory.objects.all() for

Re: Problem with nested loop

2008-03-29 Thread Kenneth Gonsalves
On 29-Mar-08, at 11:43 AM, Kenneth Gonsalves wrote: > {% for w in wc %} w.title<-- forgot this > > {% for sample in w.workcategory_set.all %} > sample > {% endfor %} > > {% endfor %} -- regards kg http://lawgon.livejournal.com http:/

Re: Problem with django unit testing

2008-03-30 Thread Kenneth Gonsalves
On 30-Mar-08, at 1:31 PM, [EMAIL PROTECTED] wrote: > Any one who can help me? Thank you so much! be patient - it is a weekend ;-) -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/code/ --~--~-~--~~~---~--~~ You received this message

Re: mark_safe for a html field

2008-03-30 Thread Kenneth Gonsalves
On 31-Mar-08, at 7:20 AM, Marc Garcia wrote: > does anybody know a simple way to mark a model field as safe html (and > tell django not to escape this field content)? http://www.djangoproject.com/documentation/templates/#automatic-html- escaping -- regards kg http://lawgon.livejournal.com

Re: Using Django for Teaching

2008-03-30 Thread Kenneth Gonsalves
On 31-Mar-08, at 9:58 AM, Todd O'Bryan wrote: > Sorry this is two weeks late (it's been a bear of a two weeks), but > I use Django with high school students who've done the equivalent > of a year of college programming--the AP Computer Science AB > curriculum. what age would these

Re: 'module' object has no attribute 'day_abbr' --Problem editing using Admin

2008-03-30 Thread Kenneth Gonsalves
On 31-Mar-08, at 10:28 AM, Ryan Vanasse wrote: > class Event(models.Model): > eventName = models.CharField(maxlength=63) > #eventDate = models.DateField() > start_time = models.DateTimeField() > end_time = models.DateTimeField() > eventLocation =

Re: Custom ID field with random string

2008-03-31 Thread Kenneth Gonsalves
On 31-Mar-08, at 2:30 PM, Julien wrote: > I just thought I'd try to make it clearer what I'm after. Instead of > having numbers as ID for my objects, I'd like to have random strings > (e.g. "sadfwetbtyvt32452" or "fd70982876adhfd"...). Those strings have > to be unique across the table. > Is

Re: Error adding an excluded field

2008-04-01 Thread Kenneth Gonsalves
On 02-Apr-08, at 7:59 AM, [EMAIL PROTECTED] wrote: > def cartuchoFallado(request, numinfo): > if request.method == 'POST': > data = copy(request.POST) > data['informe'] = numinfo > form = forms.CartuchoFalladoFrm(data) > if form.is_valid(): >

Re: unique=True doesn't seem to do its job

2008-04-02 Thread Kenneth Gonsalves
On 02-Apr-08, at 12:03 PM, Julien wrote: > get() returned more than one Project -- it returned 2! Lookup > parameters were {'slug__exact': u'hello'} > > I have the same issue on the front end using ModelForm. > > Shouldn't that raise an IntegrityError, and then reload the form page > with an

Re: how do I create a zebra table using a template?

2008-04-11 Thread Kenneth Gonsalves
On 11-Apr-08, at 9:36 PM, Kenneth Gonsalves wrote: > On 11-Apr-08, at 9:28 PM, Chas. Owens wrote: > >> {% if forloop.counter % 2 %} > > divisibleby http://www.djangoproject.com/documentation/templates/#divisibleby -- regards kg http://lawgon.livejournal.com http://nrcfo

Re: how do I create a zebra table using a template?

2008-04-11 Thread Kenneth Gonsalves
On 11-Apr-08, at 9:28 PM, Chas. Owens wrote: > {% if forloop.counter % 2 %} divisibleby -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/code/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: how do I create a zebra table using a template?

2008-04-11 Thread Kenneth Gonsalves
On 11-Apr-08, at 9:42 PM, Jeff Gentry wrote: > On Fri, 11 Apr 2008, Kenneth Gonsalves wrote: >>> {% if forloop.counter % 2 %} >> divisibleby > > Actually, he should be using 'cycle' my reply was simply to let him know that there are such things as filte

Re: Allowing html tags for filter.

2008-04-11 Thread Kenneth Gonsalves
On 11-Apr-08, at 10:05 PM, Dmitriy Sodrianov wrote: > I have a custom filter that outputs some html code. The problem is > that it converts all "greater than" and "less than" symbols to > appropriate and symbols. How is it possible to say to > filter not to do this? unless we see the code

Re: Templates won't translate

2008-04-12 Thread Kenneth Gonsalves
On 12-Apr-08, at 10:15 PM, Basti wrote: > Probably I'm only being stupid but I can't get my templates to be > translated. Everything else (translation in views etc.) works fine. does the template stuff appear in django.po? -- regards kg http://lawgon.livejournal.com

Re: Django Tutorial Site not in Admin

2008-04-13 Thread Kenneth Gonsalves
On 13-Apr-08, at 3:54 PM, garazy wrote: > It does not appear in the admin when I login with the superuser > account that got created when I installed the project. Please let me > know what other information you need me to provide to debug this large > problem. please post your models.py file

Re: Help with getting drop-downs to work

2008-04-13 Thread Kenneth Gonsalves
On 14-Apr-08, at 8:25 AM, Karen Tracey wrote: > I just tried that command and it works for me. Are you behind a > corporate firewall? I've seen reports that they sometimes > interfere with svn traffic, depending on how they are configured. > The usual workaround is to use https://

Re: How to use dojo toolkit in django?

2008-04-14 Thread Kenneth Gonsalves
On 14-Apr-08, at 12:43 PM, Duke wrote: > How to use dojo toolkit in django project? > Where to store the dojo toolkit in the project and how to use them in > the html page? http://www.djangoproject.com/documentation/serialization/ -- regards kg http://lawgon.livejournal.com

Re: How to use dojo toolkit in django?

2008-04-14 Thread Kenneth Gonsalves
On 14-Apr-08, at 2:02 PM, Kenneth Gonsalves wrote: >> How to use dojo toolkit in django project? >> Where to store the dojo toolkit in the project and how to use them in >> the html page? > > http://www.djangoproject.com/documentation/serialization/ sorry - that is for

Re: Looping....

2008-04-15 Thread Kenneth Gonsalves
On 15-Apr-08, at 4:06 PM, Duke wrote: > How to use Loop counter iteration (ie) looping 10 time in Django > Template language (html) use 'for' -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/code/ --~--~-~--~~~---~--~~ You received

Re: Looping....

2008-04-15 Thread Kenneth Gonsalves
On 15-Apr-08, at 4:23 PM, Duke wrote: > Can u give some example since for iteration over a array or a > dictionary http://www.djangoproject.com/documentation/templates/#for -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/code/

Re: Looping....

2008-04-15 Thread Kenneth Gonsalves
On 15-Apr-08, at 9:04 PM, Darryl Ross wrote: > Duke wrote: >> They are looping over a list >> I am looking for >> for (i = 0; i < 10; i++) { >> printf("Hello, World!); >> } >> link for looping statement > > > I am not aware of any tag that will allow you to do that, out of > the box.

Re: Something wrong with dividing

2008-04-16 Thread Kenneth Gonsalves
On 17-Apr-08, at 10:57 AM, Poz wrote: > I've got a small problem. I am a newbie and I can't figure out what is > wrong with the script below. > > I'm trying to count up the "likes" and divid them by the > "likes"+"dislikes", but all I get when I divided them is > 0.0 >>> a = 1

Re: Django en Dreahost

2008-04-17 Thread Kenneth Gonsalves
On 18-Apr-08, at 5:01 AM, Juanjo Conti wrote: >>2. Download, Compile and install Python 2.5. DH default is 2.3 and >>2.4. > > Why this? Does not Django run with Python <= 2.3? afaik no -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/code/

BooleanField in newforms returns 'on' and not True

2008-04-18 Thread Kenneth Gonsalves
hi according to the docs a BooleanField in newforms: "Normalizes to: A Python True or False value." but in svn version 7387 I am getting a value of u'on'. Is this a bug in the documentation or am I misreading the docs? -- regards kg http://lawgon.livejournal.com

Re: how do designers create content

2008-04-20 Thread Kenneth Gonsalves
On 20-Apr-08, at 12:03 PM, lee wrote: > Do the designers use text base editting like ultraedit or > or graphics based software like dreamweaver? Most of the artist I know > don't do much coding and are into photoshop, illustrator and > dreamweaver. On sites like lawrence.com where there are

Re: how do designers create content

2008-04-20 Thread Kenneth Gonsalves
On 20-Apr-08, at 12:16 PM, James Bennett wrote: > On Sun, Apr 20, 2008 at 1:33 AM, lee <[EMAIL PROTECTED]> wrote: >> designers. Do the designers use text base editting like ultraedit or >> or graphics based software like dreamweaver? Most of the artist I >> know >> don't do much coding and

Re: 'message_set' causes ProgrammingError while handling Exception

2008-04-20 Thread Kenneth Gonsalves
On 21-Apr-08, at 12:50 AM, radioflyer wrote: > > Hello, > I need some help with the code after the IntegrityError exception. > > > s = Student.objects.get(pk=student_id) > > if request.method == 'POST': > form = ChangeForm(request.POST) > if form.is_valid(): > try: >

Re: Layout Questions

2008-04-20 Thread Kenneth Gonsalves
On 21-Apr-08, at 3:05 AM, Greg Lindstrom wrote: > I'll be happy to post some code, but I'd like some direction on how > to set up a page. I would like a header and sidebar. The footer > is optional, but I think it gives a nice, finished look to the page > (and it's where I have the

Re: 'message_set' causes ProgrammingError while handling Exception

2008-04-20 Thread Kenneth Gonsalves
On 21-Apr-08, at 6:42 AM, radioflyer wrote: > I've decided to manually check for uniqueness after form validation > and before saving, and that seems to work fine for now. > > Things like 'unique_for_date' and 'unique_together' seem to work great > in the admin interface, but in the wild, you

Re: A modeling/implementation quiz

2008-04-21 Thread Kenneth Gonsalves
On 21-Apr-08, at 8:15 PM, Michael wrote: > What about using the count() method on a filtered subset to get your > id? > > Eg: > p = People(type="S") > p.id = People.objects.filter(type=p.type).count() + 1 I dont know what the context of this is, but this would only give the id if you

Re: Weblog archive links are bad

2008-04-21 Thread Kenneth Gonsalves
On 22-Apr-08, at 2:44 AM, Jon Lesser wrote: > I tried to open a trac ticket on this, but it thinks I'm a spammer. fill in your profile or register at the site and it will accept you -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/code/

<    1   2   3   4   5   6   7   8   9   10   >