Re: Trouble with regex

2008-08-18 Thread Fernando Rodríguez
El lun, 18-08-2008 a las 13:10 -0500, Malcolm Tredinnick escribió: > It looks like you might be making an assumption that the patterns are > concatenated. This isn't correct. > > The patterns in resume_templates.urls will be applied to the suffixes of > the URLs matching resumes (after the first

Re: Trouble with regex

2008-08-18 Thread Fernando Rodríguez
El lun, 18-08-2008 a las 10:35 -0700, Rajesh Dhawan escribió: > > You need to remove replace /jss/ there with jss/: > > (r'jss/(?P[-\w]+)/$', jss_list), > Ouch! O:-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gro

Re: Trouble with regex

2008-08-18 Thread Fernando Rodríguez
El lun, 18-08-2008 a las 12:49 -0500, Norman Harman escribió: > > I'm fairly certain the space indicates an urls came from an "include". > The spaces are not really part of regex. OK > > In latter case career would be word > > > Your urls should be like this: >(r'^(?P[-\w]+)/$', caree

Trouble with regex

2008-08-18 Thread Fernando Rodríguez
Hi, I have the following regexes on my django app urls.py: urlpatterns = patterns('', # List of all resumes for a given Career (r'(?P[-\w]+)/$', career_list), # List of all resume

Re: Error: cannot import name ugettext_lazy

2008-07-21 Thread Fernando Rodríguez
El lun, 21-07-2008 a las 12:10 -0500, James Bennett escribió: > You will not be able to follow along with the book using the Django > 0.96 release (as stated in the opening chapters). You will need to > instal a dev version from SVN. > Thanks, I just got version 0.97 from svn. --~--~

ImportError: cannot import name parse_lookup

2008-07-21 Thread Fernando Rodríguez
Hi, I'm implementing the coltrane blog app in "Practical Django Projects" and when I try to syncdb I get this error and traceback. I'm using version 0.97 downloaded from svn. Any ideas? O:-) PS Here's the traceback: Traceback (most recent call last): File "./manage", line 11, in execu

Error: cannot import name ugettext_lazy

2008-07-21 Thread Fernando Rodríguez
Hi, I'm implementing the coltrane blog app in "Practical Django Projects" and when I try to syncdb I get this odd error: Error: Couldn't install apps, because there were errors in one or more models: coltrane: cannot import name ugettext_lazy Anybody knows what this might mean? Thanks in adv

Re: escape filter

2008-07-15 Thread Fernando Rodríguez
El mar, 15-07-2008 a las 10:33 -0700, Malcolm Tredinnick escribió: > > I'm definitely not saying you definitely don't need this, but make sure > that you're doing it for the right reasons. Sending UTF-8 in all of it's > non-entity-encoded glory is very normal practice. OK, thanks. :-) --~--

Re: escape filter

2008-07-15 Thread Fernando Rodríguez
El mar, 15-07-2008 a las 12:30 -0500, Arien escribió: > Why do you need to use HTML entities for accented characters? What is > the problem you're trying to solve? > Aren't you suposed to display accented chars and stuff like ¡ or ¿ as html entities? --~--~-~--~~~---

Re: escape filter

2008-07-15 Thread Fernando Rodríguez
e in "The definitive guide to django" but saw none. I can't be the first one in need of this... > --Ned. > http://nedbatchelder.com > > Fernando Rodríguez wrote: > > Hi, > > > > I'm using this simple template with flatpages: > > > >

escape filter

2008-07-15 Thread Fernando Rodríguez
Hi, I'm using this simple template with flatpages: {{ flatpage.title|escape }} {{flatpage.title|escape}} {{ flatpage.content|escape }} I was expecting to see all accented chars in title and contents to be displayed properly escaped, however,

Re: list_display a Many to Many field

2008-07-10 Thread Fernando Rodríguez
El mié, 09-07-2008 a las 06:40 -0700, urukay escribió: > > this should work: > > def get_authors(self): > return self.authors.all() Thanks Radovan. Shouldn't it be self.authors.objects.all()? --~--~-~--~~~---~--~~ You received this message because you are

Re: Too many values to unpack error

2008-07-10 Thread Fernando Rodríguez
El mié, 09-07-2008 a las 09:35 -0500, Arien escribió: > > TOPIC_CHOICES = ( ('general', 'General enquiry'), > > ('bug', 'Bug report'), > > ('suggestion' 'Suggestion'), > > ) > > You're missing a comma in the last-but-one line. (It evaluates to

Too many values to unpack error

2008-07-09 Thread Fernando Rodríguez
Hi, I'm getting this error while calling .as_table() on a form. This is how I define the form and the view function: from django import newforms as forms TOPIC_CHOICES = ( ('general', 'General enquiry'), ('bug', 'Bug report'), ('suggestion' 'Suggestion'),

list_display a Many to Many field

2008-07-09 Thread Fernando Rodríguez
Hi, I'm trying to display a many to many field in the admin interface. This is my model: class Book(models.Model): title = models.CharField(maxlength = 100, db_index = True) authors = models.ManyToManyField(Author) Publisher = models.ForeignKey(Publisher) publicationDate = model

Re: Still unable to log into the admin interface

2008-07-07 Thread Fernando Rodríguez
El lun, 07-07-2008 a las 17:55 +0100, Chris Hoeppner escribió: > Yeah, the book makes you comment those, but makes you uncomment them > again in the next (or the next) chapter =) I guess that's what happens when you're in a hurry and start skipping what you shouldn't. Serves me well. ;-) --~

Field class: Difference between blank and null

2008-07-07 Thread Fernando Rodríguez
Hi, I want one on my models to have an optional field. After checking the code in the Field class, there are two promising params to __init__(): blank=False, null=False What's the difference between both and which one should I use? Thanks! :-) --~--~-~--~~~---~--~

Re: Still unable to log into the admin interface

2008-07-07 Thread Fernando Rodríguez
El lun, 07-07-2008 a las 12:30 -0400, Karen Tracey escribió: > > [snip] > > MIDDLEWARE_CLASSES = [] #( >#'django.middleware.common.CommonMiddleware', >#'django.contrib.sessions.middleware.SessionMiddleware', >#'django.contrib

Re: Still unable to log into the admin interface

2008-07-07 Thread Fernando Rodríguez
El lun, 07-07-2008 a las 07:02 -0700, urukay escribió: > > never faced this kind of problem before :S..maybe if u write down or upload > somewhere ur settings.py file Here it is: --- # Django

Re: Still unable to log into the admin interface

2008-07-07 Thread Fernando Rodríguez
El lun, 07-07-2008 a las 04:24 -0700, urukay escribió: > > did u create user during SYNCDB? yes and i got no errors. > > > Fernando Rodríguez wrote: > > > > > > Hi, > > > > I followed the advice I got here, and added > >

Still unable to log into the admin interface

2008-07-07 Thread Fernando Rodríguez
Hi, I followed the advice I got here, and added django.contrib.auth django.contrib.contenttypes django.contrib.admin to settings.py and included the following pattern to urlsp.py: (r'^admin/', include('django.contrib.admin.urls')), I also included from django.contrib.auth.models import User

Django based CMS

2008-07-05 Thread Fernando Rodríguez
Hi, Is there any open source django based cms you would recommend? Th eonlyone I've seen so far is PyLucid. What else is there? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

Trouble activating the admin interface

2008-07-02 Thread Fernando Rodríguez
Hi, I'm learning django with "the definitve guide to django". On chapter 6, I tried to activate the admin interface fro the "books" app, by adding django.contrib.admin to the INSTALLED_APPS and then calling manage.py syncdb. It failed with the following error: --

Using WingIDE's shell instead of manage.py shell

2008-07-02 Thread Fernando Rodríguez
Hi, I'd like to use WingIDE's own python shell with django, instead of the terminal you get with manage.py shell. However, if I try to eval a file form within Wing, I get this error: Traceback (most recent call last): File "/home/fernando/", line 1, in File "/var/lib/python-support/python2

Development environment

2008-06-25 Thread Fernando Rodríguez
Hi, I'm currently learning django on Ubuntu, but my background is Windows, so I'm not a VIM kind of guy. What kind of IDE do you guys use or recommend? Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google