Re: Command "python manage.py runserver" causes import error

2009-10-03 Thread Karen Tracey
On Sat, Oct 3, 2009 at 4:19 PM, Ken wrote: > I'm setting up my first Django and my first project on a Windows XP > machine, following the Django tutorial part 1 (http:// > docs.djangoproject.com/en/dev/intro/tutorial01/#intro-tutorial01). > > I'm stuck at the point where it

Re: Error with unittests for django.contrib.auth: ERROR: Error is raised if the provided email address isn't currently registered

2009-10-03 Thread Anderson Santos
Hello, I've run on the same problem and now I see that all my custom templates overrides the default template. I checked that if I rename my custom project/templates/registration folder to something else the test runs ok, but if I rename the template so it doesn't conflicts, it will work fine.

Will it lost some features(middleware/contextprocessor) of Django when using Jinja2 ?

2009-10-03 Thread John Wang
Hi all, I want to use Jinja2 in a django project but keep some features django, e.g, middleware and context processor. My question is, can I still use middleware and contextprocess in django when replace it template with Jinja2 ? BTW, what most i like jinja2 is that i can define macros in it

Re: How to change name for model in Admin?

2009-10-03 Thread adelaide_mike
Thanks for the pointer. I find that the verbose_name works as advertised in the case of a model named "Agency", where I use the verbose name "office". However, in the case of the model Franchise the verbose name "company" refuses to work. Anyone know why? Mike On Oct 4, 2:11 am, Nan

Re: Is it possible to use custom template tag inside another tag?

2009-10-03 Thread Aaron Watters
(troll alert) What you need is to use WHIFF configuration templates which allow recursive embedding of "tags" (applications really). As far as I know WHIFF can't be used in Django because Django can't embed an arbitrary WSGI application (I'd love to be wrong). Nevertheless, please check out:

Re: How to customize the default comments form from contrib.comments

2009-10-03 Thread kmike
Define custom form: class NoEmailCommentForm(CommentForm): def __init__(self, *args, **kwargs): super(NoEmailCommentForm, self).__init__(*args, **kwargs) self.fields['email'].required = False Then put def get_form(): return NoEmailCommentForm in your comment

Syndication: ttl attribute not working with Rss201rev2Feed?

2009-10-03 Thread janedenone
Hi, when using the ttl attribute for an RSS 2.0 feed, Django will throw an AttributeError ('int' object has no attribute 'replace'). This does not happen with Atom feeds. Is this a known issue? It can be easily reproduced with the following code: feed = Rss201rev2Feed(feed_object.title,

Command "python manage.py runserver" causes import error

2009-10-03 Thread Ken
I'm setting up my first Django and my first project on a Windows XP machine, following the Django tutorial part 1 (http:// docs.djangoproject.com/en/dev/intro/tutorial01/#intro-tutorial01). I'm stuck at the point where it says to test the installation by starting the Django development server

How to customize the default comments form from contrib.comments

2009-10-03 Thread Guillermo
Hi, Specifically, I don't want to require users to enter their email addresses or an url. Regards, Guillermo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Message Box with yes and no option ( confirm a deleting operation )

2009-10-03 Thread wancharle sebastiao quirino
sory my english i speak portuguese. msgbox are made with javascript and not with python, or php or ruby you can create a template tag to do it for you but this is not the responsibility django or python. Is responsibility template. 2009/10/2 Nicu Marcu > Hello, > >

Re: Populating an ImageField

2009-10-03 Thread Nan
Thanks. For a simpler case than what I'm dealing with, yes, that would probably work. On Oct 3, 2:21 pm, kmike wrote: > If you have one default logo then maybe the 'right' way is to use > 'default' parameter of ImageField? > > On 3 окт, 22:07, Nan

Re: Django comments

2009-10-03 Thread kmike
If you want additional field (paragraph_id) in Comment model you can create your own model as decribed here: http://docs.djangoproject.com/en/dev/ref/contrib/comments/custom/#ref-contrib-comments-custom On 3 окт, 01:46, cirip wrote: > Hi, > > I am just reading about django

context size restrictions for render

2009-10-03 Thread Gabriel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi all, I'm trying to render the result of a libdiff.HtmlDiff table. The len of the returned string is about 499759 chars. Is there any size restriction for the render? It render the template just fine, ignoring the content of the variable

Re: Populating an ImageField

2009-10-03 Thread kmike
If you have one default logo then maybe the 'right' way is to use 'default' parameter of ImageField? On 3 окт, 22:07, Nan wrote: > Nope, but I finally found what seems to be the "right" way to do this > (copies the file to the appropriate upload_to location, etc): > > from

Re: Exception while rendering after installing contrib.comments

2009-10-03 Thread Daniel Roseman
On Oct 3, 6:23 pm, guillermooo wrote: > Inside django.contrib.comments there is: > > 1) a folder named "url" with an __init__.pyc file > 2) a file named "url" with a few urls > > I've solved the problem renaming the "url" folder to "url_". > > Maybe this is a

Re: Exception while rendering after installing contrib.comments

2009-10-03 Thread guillermooo
Inside django.contrib.comments there is: 1) a folder named "url" with an __init__.pyc file 2) a file named "url" with a few urls I've solved the problem renaming the "url" folder to "url_". Maybe this is a bug? Regards, Guillermo On Oct 3, 6:32 pm, Guillermo

Trying to make django-mptt work with inherited models

2009-10-03 Thread phoebebright
Have spent quite a few hours on this one but not familiar enough with django inerds to make much progress. Here is the model: class Stuff(models.Model): name = models.CharField(max_length=140) parent = models.ForeignKey('self', null=True, blank=True, related_name='children')

Exception while rendering after installing contrib.comments

2009-10-03 Thread Guillermo
Hi, After installing the comments framework, I get the following error: The included urlconf django.contrib.comments.urls doesn't have any patterns in it I can't find any information about it. What could be causing it? I'm developing on Windows XP, Django trunk. Regards, Guillermo

Re: How to change name for model in Admin?

2009-10-03 Thread Nan
Yes. class Foo(models.Model): # field definitions here class Meta: verbose_name = 'Bar' See also: http://docs.djangoproject.com/en/dev/ref/models/options/#ref-models-options On Oct 3, 10:37 am, adelaide_mike wrote: > Hi again. > I have made a

Re: Populating an ImageField

2009-10-03 Thread Nan
Nope, but I finally found what seems to be the "right" way to do this (copies the file to the appropriate upload_to location, etc): from django.core.files.base import File def create_a_company(name, logo_path): company = Company() company.name = name logo_file = open(logo_path)

Re: Radar

2009-10-03 Thread Matt
oh that makes sense --~--~-~--~~~---~--~~ 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@googlegroups.com To unsubscribe from this group, send email to

How to change name for model in Admin?

2009-10-03 Thread adelaide_mike
Hi again. I have made a couple of confusing choices for table names in my database. I do not really want to change them in the PostgreSQL database. Can I change the labels given to them in the Admin. For example in the list of administratable tables and the pages that follow when doing add or

Re: Is it possible to use custom template tag inside another tag?

2009-10-03 Thread Maksymus007
On Sat, Oct 3, 2009 at 4:01 PM, Andrew wrote: > > Anyway, I thound that's not possible, so I will need to create > specific custom tag for this. > > On Oct 3, 2:07 pm, Andrew wrote: >> Hello, >> >> is there any way to use custom template tag inside {if}

Re: Is it possible to use custom template tag inside another tag?

2009-10-03 Thread Andrew
Anyway, I thound that's not possible, so I will need to create specific custom tag for this. On Oct 3, 2:07 pm, Andrew wrote: > Hello, > > is there any way to use custom template tag inside {if} or ifequal > tag? > > I have custom tag "getpreference" which accepts one

Is it possible to use custom template tag inside another tag?

2009-10-03 Thread Andrew
Hello, is there any way to use custom template tag inside {if} or ifequal tag? I have custom tag "getpreference" which accepts one parameter and returns string value or empty "" string. I want to check if value is not empty inside {if} or maybe {ifequal} tag, how do I do that? {% if

Re: Django running on Apache+WSGI and apache SSL proxy

2009-10-03 Thread Graham Dumpleton
On Oct 3, 8:05 pm, Fabrizio Buratta wrote: > 2009/10/3 Graham Dumpleton > > > > > I think I may know what you are talking about, but your explanation is > > a bit confusing. > > > To help understand, post your mod_wsgi configuration from

Syndication: Source of

2009-10-03 Thread janedenone
Hi, I wonder how the field for a feed is populated. For each item, I specify the pubdate upon initialization, but I don't see where Django grabs the feed-wide information. Grateful for any hint - Jan --~--~-~--~~~---~--~~ You received this message because you

Re: Django running on Apache+WSGI and apache SSL proxy

2009-10-03 Thread Fabrizio Buratta
2009/10/3 Graham Dumpleton > > I think I may know what you are talking about, but your explanation is > a bit confusing. > > To help understand, post your mod_wsgi configuration from backend. import os, sys sys.path.append('/usr/local/django')

Re: Django Tiny Mce: focus on tab

2009-10-03 Thread Joost Cassee
On 1 okt, 22:11, zweb wrote: > When I tab, the cursor just skips the tinymce text area and moves to > next field. ie it jumps from field tabindex 1 to field with tabindex > 3. tinymce editor has tabindex 2. I am using django tinymce. Just saw the (your?) new issue on

debug_toolbar and PYTHONPATH

2009-10-03 Thread Haroldo Stenger
hi folks, One of the install steps to get debug_toolbar up and running is adding 'debug_toolbar' to your PYTHONPATH. How is it meant to be done ? I was able to get debug_toolbar running, but that step got me really curious, since adding things explicitely to PYTHONPATH is not a common task

Re: doctest and sqllite

2009-10-03 Thread gentlestone
thx On 2. Okt, 19:40 h., Karen Tracey wrote: > On Fri, Oct 2, 2009 at 3:18 AM, gentlestone wrote: > > > Hello Karen, > > > another issue. If I'm using unicode characters in model's doctest: > > >    u""" > >    >>> osoba = Osoba(meno = u"Ľudmila",