Re: Have var available in every context passed to a template?

2009-11-21 Thread Christophe Pettus
On Nov 21, 2009, at 6:48 PM, apramanik wrote: > Is there a way (either via decorators or some other mechanism) to get > an var/object (say request.user) to be in the context passed to every > template. The reason I want to do this is my base template uses > "user.is_authenticated" in a branch.

Have var available in every context passed to a template?

2009-11-21 Thread apramanik
Hi all, Is there a way (either via decorators or some other mechanism) to get an var/object (say request.user) to be in the context passed to every template. The reason I want to do this is my base template uses "user.is_authenticated" in a branch. Thanks Abhik -- You received this message

Problems creating custom multi-widget....

2009-11-21 Thread mediumgrade
I am trying to create my own Dojo-aware Django widgets. I have defined the following class DojoDateWidget(forms.widgets.DateTimeInput): format = '%Y-%m-%d' def __init__(self, *args, **kwargs): kwargs.setdefault('attrs', {}).update({'dojoType': "dijit.form.DateTextBox",

Re: How best to display a report?

2009-11-21 Thread Kenneth Gonsalves
On Sunday 22 Nov 2009 3:38:24 am adelaide_mike wrote: > Django 1.0.2 being used to create, manage and report on data in > tables. I am using ReportLab to generate a .pdf which I store with a > known name in a sub-directory. > it is there in the docs - search for reportlab in the docs. --

How best to display a report?

2009-11-21 Thread adelaide_mike
Please excuse my lack of knowledge about the following. (If I knew the answer, I would not be asking...) Django 1.0.2 being used to create, manage and report on data in tables. I am using ReportLab to generate a .pdf which I store with a known name in a sub-directory. I have seen websites

Re: Any users groups around San Diego?

2009-11-21 Thread Todd Blanchard
Wow, thanks. I can actually walk to that one! -Todd On Nov 21, 2009, at 11:34 AM, Donna Snow wrote: > Todd, > > Have you tried Meetup? If you can't find one there.. start one :-) > > Found this Django San Diego - meeting December 1: > > http://djangosd.jottit.com/ > > Django group was merged

Re: Forms ModelMultipleChoiceField with checkboxes?

2009-11-21 Thread aa56280
Yes, have a look at this: http://docs.djangoproject.com/en/dev/ref/forms/widgets/#specifying-widgets The widget class for Checkboxes would be django.forms.widgets import CheckboxSelectMultiple Hope that helps. On Nov 19, 3:19 am, Benjamin Wolf wrote: > Hello, > > I'm using

Re: Any users groups around San Diego?

2009-11-21 Thread Donna Snow
Todd, Have you tried Meetup? If you can't find one there.. start one :-) Found this Django San Diego - meeting December 1: http://djangosd.jottit.com/ Django group was merged into here: http://www.kernel-panic.org/meetings/lpsg http://wiki.python.org/moin/LocalUserGroups#California If you

Any users groups around San Diego?

2009-11-21 Thread Todd Blanchard
I'm still kind of struggling to get off the ground with django and think I'd benefit from some face time with other developers. I'm in San Diego. Any resources? -Todd -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Django tag cloud

2009-11-21 Thread Carlos Ricardo Santos
I used this approach, was explained on "Learning website development with Django book", give a look there: * * * * *style.css *file: * * .tag-cloud-0 { font-size: 100%; } .tag-cloud-1 { font-size: 120%; } .tag-cloud-2 { font-size: 140%; } .tag-cloud-3 { font-size: 160%; } .tag-cloud-4 { font-size:

Re: MemoryError when adding a lot of data

2009-11-21 Thread Doug Blank
On Sat, Nov 21, 2009 at 7:44 AM, Doug Blank wrote: [snip] > It does seem that: > > Table.objects.all().delete() > > is "leaking" memory (eg, continues to use memory) and is very slow. > I'm trying to find a better (faster, less memory) method similar to > the manage.py

Django tag cloud

2009-11-21 Thread Alessandro Ronchi
I have a model with with a variable number of objects. I want to make a tag cloud with font-size to be a proportion of objects.count() (wich goes from 1 to 150 ). Obviously I can't use that number in font-size (150pt is too big) and I have to make a proportion (150 -> 20pt, 1 -> 5pt, 50 ~>10pt

Re: Template variables and tags confusion... (regarding concatenation)

2009-11-21 Thread chefsmart
Exactly. Thanks. On Nov 21, 4:45 pm, Tim Chase wrote: > > When I do in a template I get > id="item_1"> in the rendered html as expected. > > > Now I want to do {% cycle '' ' > class="odd" id="item_{{ product.id }}">' %}, but the desired > > concatenation does

Re: MemoryError when adding a lot of data

2009-11-21 Thread Doug Blank
On Fri, Nov 20, 2009 at 10:22 PM, Karen Tracey wrote: > On Fri, Nov 20, 2009 at 6:19 PM, Doug Blank wrote: >> >> Some additional data: >> >> I'm using Django 1.1 on Fedora11 with sqlite backend. I get the same >> kind of spiking of memory usage if I just

Re: Template variables and tags confusion... (regarding concatenation)

2009-11-21 Thread Tim Chase
> When I do in a template I get id="item_1"> in the rendered html as expected. > > Now I want to do {% cycle '' ' class="odd" id="item_{{ product.id }}">' %}, but the desired > concatenation does not happen. > > How do I achieve what I want? sounds like you want something like -tim

Template variables and tags confusion... (regarding concatenation)

2009-11-21 Thread chefsmart
Hi, When I do in a template I get in the rendered html as expected. Now I want to do {% cycle '' '' %}, but the desired concatenation does not happen. How do I achieve what I want? Regards. -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Internal server error 500 with mod_wsgi

2009-11-21 Thread Alessandro Ronchi
On Thu, Nov 19, 2009 at 7:26 PM, Karen Tracey wrote: > > > So I guess you are looking to pull django and satchmo out of > /var/www/vhosts/hobbygiochi.com/django/, not /var/www/vhosts/ > detectorpoint.com/django/. I'd guess the detectorpoint.com paths are > already in