perfomance question

2009-05-20 Thread Rodrigo
. Wouldn't be significantly more fast to query for Contacts.objects.all() [offset:limit]? Instead of cut a big list and querying for all objects at the same time? Regards, Rodrigo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Re: coltrane sample at "practical django projects" book has a templates error

2010-04-22 Thread Rodrigo
could you post your urls.py ? On Apr 21, 6:51 pm, xota wrote: > Or I do something bad, I was searching in google and some pepople have > same/similar error without replies, can you help me, this is my error: > > Caught an exception while rendering: Reverse for > 'coltrane_category_list' with argu

May I use an html form outside django to login?

2010-10-21 Thread Rodrigo
I have my doubts that csrf protection won't allow me, in that case I'd like to discuss how to circumvent that fact (if it's the correct way to do it) or which other kind if changes should I do to fullfill my needs. Thanks in advance. -- You received this message because you are subscribed to the

Cannot add inlines to Flatpages

2010-01-30 Thread Rodrigo
I'm following the tutorial on the book "Practical Django Projects", and I just can't inline the SearchKeywords to Flatpages, maybe the problem lays in the fact that I'm using the development version of django. It doesn't output any error, it just shows the flatpages standard admin page, without any

Re: Cannot add inlines to Flatpages

2010-01-30 Thread Rodrigo
Ok, just restarted (I actually restarted many times) and it magically started working. On Jan 31, 12:47 am, Rodrigo wrote: > I'm following the tutorial on the book "Practical Django Projects", > and I just can't inline the SearchKeywords to Flatpages, maybe the >

Django not reading the URLConf (urls.py)

2010-02-27 Thread Rodrigo
If I update any line on the urls.py, this doesn't reflect on the server. I can even DELETE the file, and all the urls are still working. I've tried restarting runserver many times, even restarting the computer, and nothing happens. The last test I did was deleting settings.py, to see if there was

Re: Django not reading the URLConf (urls.py)

2010-02-28 Thread Rodrigo
I checked the ROOT_URLCONF and it was fine, and deleted all the *.pyc, without good results, but finally I found the problem. There was a copy of the same project in some other folder under the PYTHONPATH, so there was some kind of collision. Thanks everybody for helping me out. On Feb 28, 1:57 am

Devlopment vs.Production server

2007-12-26 Thread rodrigo
Hi, I am a complete Django newbie, and about to start developing my first project. Some questions about development vs. production servers: 1- do you usually develop on a local server and then move to a remote production server once it's done? Or develop on the production server? 2- how seamless

Re: Devlopment vs.Production server

2007-12-26 Thread rodrigo
ave been a *lot* of > changes since 0.96, so it would be best to develop against the same > version you'll be using in production. > Yeah, I meant 0.97 pre. Thanks, Rodrigo --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: Devlopment vs.Production server

2007-12-26 Thread rodrigo
> it takes about 5 minutes to upgrade your webfaction django. I am   > running latest svn trunk on webfaction You're right, of course. For future reference: http://forum.webfaction.com/viewtopic.php?id=276 thanks, Rodrigo --~--~-~--~~~---~--~~ Y

UnicodeEncodeError

2007-12-26 Thread rodrigo
UnicodeEncodeError. I also get the same error if I try to create a new Publication (that has Author as a ManyToManyField) I also get the UnicodeEncodeError. If I delete the offending entry in the DB, the errors go away. Any help is of course appreciated, Rodrigo -- The error: UnicodeEncodeEr

Problem with 'resolve' in non-root Apache installations

2011-02-08 Thread Rodrigo
IPT_NAME, and when I run 'resolve' against one of the mentioned urls it throws a 404. So far I've solved it by stripping SCRIPT_NAME before calling 'resolve' but I don't think that's optimal. Is this a normal behavior, or am I misunderstunding reverse and

Re: Looking for IDE + FTP

2011-02-08 Thread Rodrigo
If you work in Windows I would recommend PyScripter. It is lightweight and the fastest IDE I've tested so far (and I've used others like PyDev, Wing or NetBeans) It also features code completion, debugging, etc. I've used it to debug several Django applications and it worked like a charm. -- You

One Question About Cache

2008-11-06 Thread Rodrigo Lopes
low-level cache with filesystem caching. How could I figure this out? Regards -- Rodrigo Lopes --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: One Question About Cache

2008-11-07 Thread Rodrigo Lopes
> > > -- > Regards > Dulmandakh > > > > -- Rodrigo Lopes --~--~-~--~~~---~--~~ 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.co

Related articles based on keywords.

2009-01-09 Thread Rodrigo Culagovski
I am developing a site for an academic publication that contains a few thousand articles. Each Article has a ManyToMany relationship with one or more Keywords from a controlled vocabulary. In the view for a single article, I would like to be able to pull up related articles based on shared keywor

Re: Great work with newforms-admin

2008-07-19 Thread Rodrigo Culagovski
Is there a complete reference for newforms-admin (not a FAQ, tutorial or changelist) other than the code itself? On Jul 19, 4:46 pm, "Tom Badran" <[EMAIL PROTECTED]> wrote: > Yes the first link is the one i used. > > Tom > > On Sat, Jul 19, 2008 at 6:21 PM, James Punteney <[EMAIL PROTECTED]> wrot

Re: Great work with newforms-admin

2008-07-19 Thread Rodrigo Culagovski
Thanks! Super fast, too. On Jul 19, 8:54 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Sat, Jul 19, 2008 at 8:50 PM, Rodrigo Culagovski <[EMAIL PROTECTED]> > wrote: > > > > > Is there a complete reference for newforms-admin (not a FAQ, tutorial &g

How to have both newforms-admin and previous version on the same machine?

2008-07-19 Thread Rodrigo Culagovski
I'm looking foward to trying out the merged newforms-admin on my upcoming projects. However, I have a few ongoing projects already developed using pre-newforms-admin django. I make changes to the projects on my local machine and test them before comitting them to the remote production sites, so, u

Re: How to have both newforms-admin and previous version on the same machine?

2008-07-19 Thread Rodrigo Culagovski
y from the project itself? Using Windows for development, Linux for production. Thanks! Rodrigo On Jul 19, 9:43 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Do not install django as part of site-packges. > Treat it as a python package like any other. > Create two direc

Django 1.0 and Textmate

2008-08-30 Thread Rodrigo Culagovski
Has anybody taken a crack at updating the Textmate Django bundles (python and template) for version 1.0? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djang

Using model instances as dictionary keys

2008-09-01 Thread Rodrigo Culagovski
I have a weird dictionary key issue: I have an 'Article' model, with textfields for Year and Country and foreignkeys for Magazine and Author. I generate a frequency list for each criteria (e.g.: Year=2005) which I use to keep the count. To do this, I subclassed dictionary like so: class dictinc(d

An academic journal's site

2008-09-23 Thread Rodrigo Culagovski
I'm starting work on a site for an academic journal that will both publish the articles from the paper version and also allow authors to submit new articles for review and publication. Looking for specific advice as well as general experience with this kind of site. Question 1 The articles' text

Unsaved object when passing a callable to "upload_path"

2008-09-24 Thread Rodrigo Culagovski
I'm trying to use the new ability to pass a callable to "upload_to" in fieldfields. I'm having problems with the object not being saved before the callable is called. Model: def file_path(instance, filename): return "uploads/files/%s/%s/%s_%s%s" % ( slugify(instance.article.author.la

Re: An academic journal's site

2008-09-24 Thread Rodrigo Culagovski
done and you > don't end with megabyte-sized rows in the database. Django's FileField > field is going to make this relatively straightforwards. > > Good point. Thanks, Rodrigo --~--~-~--~~~---~--~~ You received this message because you are subscr

Re: Unsaved object when passing a callable to "upload_path"

2008-09-24 Thread Rodrigo Culagovski
ld(choices=choices((0,"Text"),(1,"Figure"), (2,"Table"))) number= models.IntegerField() file= models.FileField(upload_to=file_path) On Sep 24, 11:51 am, Rodrigo Culagovski <[EMAIL PROTECTED]> wrote: > I'm trying to use the new ability to pass a c

Re: django-recommender 0.2, with content based recs

2008-09-24 Thread Rodrigo Culagovski
Looks nice. Which of the algorithms in Programming Collective Intelligence are you using, specifically? Thanks, Rodrigo On Sep 24, 11:36 am, bcurtu <[EMAIL PROTECTED]> wrote: > Hi, > > I have just updated my django-recommender to 0.2, including Content > Based Recommenda

Whither Validators?

2008-09-24 Thread Rodrigo Culagovski
Validators (django.core.validators) seem to have been removed from 1.0. What replaces them? --~--~-~--~~~---~--~~ 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@googl

Re: Whither Validators?

2008-09-24 Thread Rodrigo Culagovski
So, do you have to override the model's save method and do your validation there? On Sep 24, 3:20 pm, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 24 sep, 18:30, Rodrigo Culagovski <[EMAIL PROTECTED]> wrote: > > > Validators (django.core.validators) seem to h

Re: Whither Validators?

2008-09-25 Thread Rodrigo Culagovski
Ok, so if I raiseValidationError in the save() methods, will this just give a big fat ugly general error, or a cute "You have to provide your complete credit card number" error? Thanks for the clarification. Rodrigo On Sep 24, 7:41 pm, "Russell Keith-Magee" <[EMAIL PROT

Facebook-like functionality for an Intranet

2009-01-22 Thread Rodrigo C.
I need to create an Intranet for a client. I would like to include some facebook-like functionality, such as being able to create and join networks, setting permissions based on membership in said networks, being notified when a friend or someone in your network updates his status, writes somethin

Bound Inline Formset doesn't render FileField's current value, needs to be reentered.

2009-01-27 Thread Rodrigo C.
I have model that represents a file, and has a FileField, that I am rendering via an Inline Formset. When a user fills in the form it gets saved with no problems. However, I want the users to be able to continue editing the file, but when I re-display the newly created object, the data for the Fil

Re: Bound Inline Formset doesn't render FileField's current value, needs to be reentered.

2009-01-27 Thread Rodrigo C.
> This isn't a Django issue. It's a standard property of browsers: you > can't set an initial value for file input fields. This is a security > measure, to stop malicious pages uploading files from your hard drive > without your explicit instruction. I see. If there's no way to set the initial va

Re: Bound Inline Formset doesn't render FileField's current value, needs to be reentered.

2009-01-28 Thread Rodrigo C.
Hi Malcolm, thanks for your reply. > So, perhaps you could give a small, reduced to the minimum, example of > how you're setting all this up. Maybe it's a problem in inline formsets, > or maybe it's an oversight in your code. At the moment, hard to tell. > I included the View and Model in my ori

Re: Bound Inline Formset doesn't render FileField's current value, needs to be reentered.

2009-01-28 Thread Rodrigo C.
f it is showing a working example > of the kind of thing you want then, since the source is all available, the > answer is there somewhere. > > Karen Solid advice. Will look into it. Thanks, Rodrigo --~--~-~--~~~---~--~~ You received this message beca

Re: Limiting available fields in admin for non-superusers

2009-02-03 Thread Rodrigo C.
Never mind, it was easy. Basically, overriding the "get_form": def get_form(self, request, obj=None, **kwargs): if request.user.is_superuser: self.exclude = None On Feb 3, 5:42 pm, "Rodrigo C." wrote: > After following this article:http://www.b-list

Limiting available fields in admin for non-superusers

2009-02-03 Thread Rodrigo C.
e all fields, non- superusers see some fields). Is this possible without major surgery? Thanks, Rodrigo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

problems with django+fastcgi

2009-02-09 Thread Rodrigo Lazo
quot;threaded", daemonize="false") ` and my .htaccess , .htaccess | AddHandler fastcgi-script .fcgi | RewriteEngine On | RewriteCond %{REQUEST_FILENAME} !-f | RewriteRule ^(.*)$ engine.fcgi/$1 [QSA,L] ` -- Rodrigo Lazo (rlazo) --~--~-~--~~~-

Django unicode model pickle problem

2009-06-22 Thread Rodrigo Cea
I am having trouble pickling, and then saving to the DB, django models with Unicode text in them. The site is for Spanish speakers, so we need our ñs, és and ös. I implemented an unlimited undo feature for a Django site, using this PickleField snippet: http://www.djangosnippets.org/snippets/513/

Trouble rendering a ManyToManyField with CheckBoxSelectMultiple widget

2009-06-25 Thread Rodrigo Cea
] is not one of the available choices. I have tried various permutations for "choices", including choices= [(i.id,i) for i in Estilo.objects.all()], with no luck so far. Thanks, Rodrigo --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: Trouble rendering a ManyToManyField with CheckBoxSelectMultiple widget

2009-06-25 Thread Rodrigo Cea
Stupid mistake, I had to use a MultipleChoiceField instead of a plain ChoiceField. styles= forms.MultipleChoiceField (widget=forms.CheckboxSelectMultiple (), --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django u

UnicodeEncodeError on admin site

2009-07-21 Thread Rodrigo Gomes
", line 38, in _dec args[0] = force_unicode(args[0]) File "/Library/Python/2.5/site-packages/django/utils/encoding.py", line 52, in force_unicode s = unicode(str(s), encoding, errors) UnicodeEncodeError: 'ascii' codec can't encode character u'\xed'

Re: UnicodeEncodeError on admin site

2009-07-21 Thread Rodrigo Gomes
return self.nome_convidado + " - " + self.descricao_presente* On Tue, Jul 21, 2009 at 10:05 AM, Daniel Roseman wrote: > > On Jul 21, 1:27 pm, Rodrigo Gomes wrote: > > Hi, > > > > I'm getting the error below when i'm trying to edit a

Re: UnicodeEncodeError on admin site

2009-07-21 Thread Rodrigo Gomes
Hi Daniel, I just changed my method as you suggested, to def __unicode__(self) and the problem was solved. Thanks so much! Rodrigo On Tue, Jul 21, 2009 at 12:54 PM, Daniel Roseman wrote: > > On Jul 21, 3:46 pm, Rodrigo Gomes wrote: > > Hi Daniel, > > > > My databse en

Pass subdomain to a view function.

2009-04-08 Thread Rodrigo C.
d to be able to pass the subdomain to my view function. The site will be hosted on Webfaction, if that makes a difference. Thanks, Rodrigo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Validate image size in admin.

2009-06-07 Thread Rodrigo Cea
How can I validate, in the admin, that images uploaded by users have a minimum size in pixels? --~--~-~--~~~---~--~~ 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@go

Re: Validate image size in admin.

2009-06-07 Thread Rodrigo Cea
So if I followed this: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#adding-custom-validation-to-the-admin and the field I was cleaning was called "image", would the validation function be called "clean_image"? Thanks for the super quick response, Rodrigo On

Re: Validate image size in admin.

2009-06-07 Thread Rodrigo Cea
Beautiful, works like a charm. Also finally learned how to validate in the admin! Thanks, Rodrigo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Make a "save and preview" button in admin.

2009-06-07 Thread Rodrigo Cea
I have added a "preview" button to the admin, like so: # In "templates/admin/core/change_form.html" {% extends "admin/change_form.html" %} {% load i18n %} {% block object-tools %} {% if change %}{% if not is_popup %} Preview {{ form.data}} {% trans "History" %} {% if has_absolute_url %

Some ForeignKeys show up as list_filters, some don't.

2009-06-07 Thread Rodrigo Cea
I have a model with 4 ForeignKeys: 'autor','categoria','edicion' and 'dossier'. In admin.py, I am trying to assign them as "list_filter". However, only 2 of them actually show up within the filters, 'autor' and 'categoria'. All four show up as columns without any problems. Does anybody have any cl

Re: Some ForeignKeys show up as list_filters, some don't.

2009-06-07 Thread Rodrigo Cea
t show up at the side of the admin screen. " On Jun 8, 12:44 am, Rodrigo Cea wrote: > I have a model with 4 ForeignKeys: 'autor','categoria','edicion' and > 'dossier'. In admin.py, I am trying to assign them as "list_filter". > H

Re: Make a "save and preview" button in admin.

2009-06-17 Thread Rodrigo Cea
Thanks, I'll look into it and post back if I solve this. Rodrigo On Jun 17, 1:32 pm, Liam Chasteen wrote: > Check out the article on developerworks: > > http://www.ibm.com/developerworks/opensource/library/os-django-admin/... > > The method they show changes the redirect

Re: PyFacebook and python-twitter

2009-09-14 Thread Rodrigo Cea
Most of the time, if you don't know how / can't install them, you can simply drop a library into your Django project directory and it will just work. On Sep 13, 1:36 pm, Chris Babcock wrote: > On Sun, 13 Sep 2009 10:21:41 -0600 > > Adam Olsen wrote: > > On Sun, Sep 13, 2009 at 9:54 AM, simba w

Remote login via XML-RPC or SOAP?

2009-09-14 Thread Rodrigo Cea
I am creating a Django website for a client who won't give me access to their database or server, but will allow login / account creation on their server via SOAP or XML-RPC from my server, where the Django- based website will reside. I would like to get an idea beforehand about which route, SOAP

Re: Remote login via XML-RPC or SOAP?

2009-09-16 Thread Rodrigo Cea
> Why do we need such a mechanism for the relationship between > client database and the master server. Maybe you need something > else entirely. Could you tell more general idea. The general idea is to allow users to register and login on our server, but store all the users information on our cl

Re: HELP ME

2009-09-16 Thread Rodrigo Cea
ried unsuccessfully? The Django community is very, very helpful and patient, but you're not really helping them help you. Rodrigo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gro

Which compressor / packer for CSS and JS?

2009-09-29 Thread Rodrigo Cea
bout 10 of each). It also have a lot of images on each page. I would like to use a compressor to speed things up a bit. The project is a medium sized corporate site, on a single server (Dynamic, Static and DB) with no CDN. Mostly a brochure site, with plenty of images, flash and

Returning a file from a view

2009-10-01 Thread Rodrigo Cea
I am creating a password-protected file repository. I would like to create a login_required view that returns the file without revealing it's actual location in the file system. Can I return an actual file (not it's location) from a view? --~--~-~--~~~---~--~~ You r

Re: How to change name for model in Admin?

2009-10-04 Thread Rodrigo Cea
Please post the actual code that's not working. This should work regardless of the value of verbose_name. Rodrigo On Oct 3, 7:51 pm, adelaide_mike wrote: > Thanks for the pointer. > > I find that the verbose_name works as advertised in the case of a > model named "Ag

Crop interface for ImageFields?

2009-11-03 Thread Rodrigo Cea
Is there an app or snippet that integrates a cropping interface to image fields in the admin? Something in flash or javascript, like the one in flickr, for example? I have some photoshop-challenged users who are always uploading pictures in the wrong sizes. Said pictures get cropped automatically

Problem rendering and saving pre-existing file values in a generic_inlineformset

2009-11-11 Thread Rodrigo Cea
I have a generic_inlineformset_factory instance being rendered via a bound form so that users can modify an existing object. The form renders OK, except for the File and Image fields, which show up as empty. The CharFields in the same models have their correct values. If I try to save the form, I g

Retrieving a subclass instance when all you have is its parent class instance

2009-11-27 Thread Rodrigo Cea
I have a parent Class "ComponentBase", with abstract=False, that many other classes extend. The parent Class has a ForeignKey relation to another class, "Band". It is convenient to be able to get a list of all of a band's components without having to explicitly list each component class. I am doi

Can't run Django from the command line using just "manage.py runserver", following attempt to install Python2.6 on windows 7.

2009-11-30 Thread Rodrigo Cea
Following an abortive attempt to install Python2.6 on Windows 7, I can't run the Django dev server without prepending "python" before "manage.py runserver". I tried recently to install Python2.6 on a windows 7 system that already has python 2.5 installed. I had problems running some Django applica

Re: Can't run Django from the command line using just "manage.py runserver", following attempt to install Python2.6 on windows 7.

2009-12-01 Thread Rodrigo Cea
Thanks for the response. Doing some more tests python programs do work, they just seem to not recieve sys.argv. The results of calling "manage.py runserver" is the same as calling just "manage.py". Other simple scripts bear this out. Thanks, Rodrigo On Dec 1, 6:32 am, Joh

Re: Can't run Django from the command line using just "manage.py runserver", following attempt to install Python2.6 on windows 7.

2009-12-01 Thread Rodrigo Cea
Hi Ken, thanks for your response, I get the exact same results as you, .py=Python.File and Python.File="C:\Python25\python.exe" "%1" %* Thanks, Rodrigo On Dec 1, 11:49 am, Ken MacDonald wrote: > Hi, > Check this out - on my XP system anyway (understand it hasn't

Re: question about django-pagination

2009-12-19 Thread Rodrigo Cea
You can paginate whatever you want. From the docs: "Note that you can give Paginator a list/tuple, a Django QuerySet, or any other object with a count() or __len__() method. " On Dec 19, 3:33 am, Continuation wrote: > In the django-pagination, it uses the example: > {% autopaginate object_list %

Re: Thanks for (Geo)Django

2009-12-24 Thread Rodrigo Cea
Absolutely. Django and everybody who works on it has made my life richer in both the metaphoric and literal senses. Thanks! On Dec 24, 4:05 am, Gabriel Gunderson wrote: > On Wed, Dec 23, 2009 at 2:52 PM, Ariel Nunez wrote: > > Thanks one more time, I hope you all enjoy a lot what's little left

Odd error on trunk

2010-05-11 Thread Rodrigo Cea
I have a project that works OK using v1.1.1. However, if I try to run it on trunk, I get this error: "Error: cannot import name DateField". Just that, no traceback, etc. I have no reference to "DateField" in my project. There was 1 in django_extensions, but removing it and even not loading django

readonly form field

2010-08-24 Thread Rodrigo Lombardo
m-how-to-make-a-field-readonly-or-disabled-so-that-it-cannot-be My question is: Nowadays, there's a better way to do the same thing? Thanks, Rodrigo Nicola Twitter: http://www.twitter.com/rodnic -- You received this message because you are subscribed to the Google Groups "Django user

Re: readonly form field

2010-08-25 Thread Rodrigo Lombardo
Great answers, thanks! I'd like to complement this thread remembering the importance of overriding the save method to save just the desired fields and in this way, avoiding Django to validate read-only fields. Rodrigo Nicola Twitter: http://www.twitter.com/rodnic On Wed, Aug 25, 2010 at

hosting django applications

2010-08-27 Thread Rodrigo Lombardo
know if anyone here is happy with the Amazon's service. * The FreeBSD in this case will be a vps with 512mb of ram from rootbsd.net Thanks, Rodrigo Nicola Twitter: http://www.twitter.com/rodnic -- You received this message because you are subscribed to the Google Groups "Django u

Row Level Permissions?

2010-03-11 Thread Rodrigo Cea
onder if there's a more standard way to do it. Rodrigo -- 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, send email to d

Rendering ManyToManyField in template

2008-01-03 Thread Rodrigo Culagovski
RL is of the form: http://127.0.0.1:8000/articulos/1/ I tried to define a method within the Articulo class that would return the contents of 'identificadores', but got an 'iteration over non- sequence' error. Thanks, Rodrigo --~--~-~--~~~---~--~

Re: Rendering ManyToManyField in template

2008-01-03 Thread Rodrigo Culagovski
I forgot to show the identificadores class: --- class Identificador(models.Model): identificador = models.CharField(max_length=200,unique=True) def __unicode__ (self): return self.identificador class Admin: pass class Meta: verbose_name_plural = "identif

Re: Rendering ManyToManyField in template

2008-01-03 Thread Rodrigo Culagovski
Fixed it, in the class definition: @property def ids(self): return ' - '.join([a['identificador'] for a in self.identificadores.values()]) On Jan 3, 6:36 pm, Rodrigo Culagovski <[EMAIL PROTECTED]> wrote: > I forgot to show the identificadores class:

Re: Rendering ManyToManyField in template

2008-01-03 Thread Rodrigo Culagovski
Rajesh, I was missing the ".all" attribute in my previous attempts. Thanks, Rodrigo On Jan 3, 7:17 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > Hi, > > > > > {% block content %} > > {{articulo}} > > > > identificadores:

Replicating admin behavior in front end

2008-01-03 Thread Rodrigo Culagovski
,'categoria','ano') ordering = ('-ano',) search_fields = ('titulo','autores','revista') date_hierarchy = 'fecha_modificacion' save_on_top = True Basically, I wonder if there's some read-only, pub

Re: Replicating admin behavior in front end

2008-01-04 Thread Rodrigo Culagovski
> If I am understanding your requirement correctly you are looking for > databrowse. I actually tried that, but it doesn't really have the structure I need, and too many options. Basically, I want what the admin interface has: a paginated grid with various fields across the top allowing you to s

Error: (1241, 'Operand should contain 1 column(s)')

2008-01-06 Thread Rodrigo Culagovski
) results = results.filter(qset).distinct() if ano_min: results = results.filter(ano__gte=ano_min) if ano_max: results = results.filter(ano__lte=ano_max) if pais: results = results.fil

Passing a form via a generic view

2008-01-07 Thread Rodrigo Culagovski
iews.py and works for my other, non-generic views. Is there a way to pass the form via a generic view? Thanks, Rodrigo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Passing a form via a generic view

2008-01-07 Thread Rodrigo Culagovski
Ramiro, got it, thanks! Rodrigo On Jan 7, 3:20 pm, "Ramiro Morales" <[EMAIL PROTECTED]> wrote: > Rodrigo, > > On Jan 7, 2008 4:05 PM, Rodrigo Culagovski <[EMAIL PROTECTED]> wrote: > > > [...] > > > Since this parameter is not passed from the gen

Re: Error: (1241, 'Operand should contain 1 column(s)')

2008-01-07 Thread Rodrigo Culagovski
Malcolm, you're right, of course. That did the trick! Thanks, Rodrigo On Jan 7, 9:23 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2008-01-06 at 17:24 -0800, Rodrigo Culagovski wrote: > > I am getting the following error: > > > OperationalError a

Maximum ImageFIeld width

2008-01-08 Thread Rodrigo Culagovski
How can you validate that an ImageField's width is <= a maximum in pixels? --~--~-~--~~~---~--~~ 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 un

Django shared hosting

2008-01-17 Thread Rodrigo Culagovski
Webfaction, but would like the ton of space some hosts give you. Rodrigo --~--~-~--~~~---~--~~ 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@googlegro

Re: Error accessing "'/media" directory

2008-01-17 Thread Rodrigo Culagovski
Thanks, that did the trick! Cheers, Rodrigo On Jan 17, 8:35 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Jan 17, 2008 6:24 PM, Rodrigo Culagovski <[EMAIL PROTECTED]> wrote: > > > > > > > I am using the following in my urls.py: > &g

Error accessing "'/media" directory

2008-01-17 Thread Rodrigo Culagovski
#x27;media' it gets sent to '/contrib/admin/ media' instead of my media folder. I also hace this in urls.py: (r'^admin/', include('django.contrib.admin.urls')), thanks, Rodrigo --~--~-~--~~~---~--~~ You received this message becau

Counting over a ManyToManyField of a ManyToManyField, a question of style.

2008-03-27 Thread Rodrigo Culagovski
r_instance.books }} etc. in my templates. However, this seems excessively verbose and repeating oneself, and it seems like this problem would already have come up many times. Is there a more idiomatic, pythonic and djangoic way to do this? Thanks, Rodrigo --~--~-~--~~~---~--

Re: Counting over a ManyToManyField of a ManyToManyField, a question of style.

2008-03-27 Thread Rodrigo Culagovski
gt; > and likewise for the other methods. Nice. Would this also be faster? Thanks, Rodrigo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Cleaning up Word's mess in text areas using tiny_mce

2008-04-07 Thread Rodrigo Culagovski
I am using tiny_mce to help the editors on a site edit text areas[1]. However, I worry that they will paste in text from Word and make a mess. Is there a way to strip out all the Word-generated crap (font tags, colors, etc.) while maintaining basic html tags like p, br, ul, etc? 1: http://code.dj

Re: Cleaning up Word's mess in text areas using tiny_mce

2008-04-09 Thread Rodrigo Culagovski
Thanks for the answers. I ended up using Pilgrim & Swartz's 'sanitize.py' [1], and adding a custom 'save' function to the classes where I need it, like so: def save(self): self.summary=util.SomeTags(self.summary,'utf8') self.body=util.SomeTags(self.body,'utf8') super(E

Dynamically limiting choices in admin.

2008-04-14 Thread Rodrigo Culagovski
I have 3 models: Magazine, Issue and Article. Each Magazine has 1 or more Issues and each Issue has 1 or more Articles. Article has models.ForeignKey(Issue) and models.ForeignKey(Magazine). Issue has models.ForeignKey(Magazine)). In the admin, when creating a new article, I choose which Magazine i

Missing help_text for ManyToManyFields with filter_interface

2008-04-14 Thread Rodrigo Culagovski
The help_text for my ManyToManyFields dissapears when I use "filter_interface=models.HORIZONTAL" (or "=models.VERTICAL"). I figure that it's the JavaScript in the filter_interface, as the help_text is there before the JavaScript modifies the field. Using trunk. --~--~-~--~~

Re: Dynamically limiting choices in admin.

2008-04-14 Thread Rodrigo Culagovski
What I'm thinking is do it backwards: give Magazine a ManyToManyField(Issue), and Issue a ManyToManyField(Article), so you create or select a Magazine, add an Issue, and then add Articles to it. Thanks! Rodrigo On Apr 14, 4:19 pm, "Richard Dahl" <[EMAIL PROTECTED]> wrote: >

Re: Missing help_text for ManyToManyFields with filter_interface

2008-04-15 Thread Rodrigo Culagovski
Thanks, I tried it and it didn't work (the filter_interface stopped showing). I removed the filter_interface from now, as the help_text is mandatory. Will wait for a solution in trunk, I guess. Thanks, Rodrigo On Apr 14, 5:50 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: &

Search with Stemming, Accents and Entities

2008-04-23 Thread Rodrigo Culagovski
I am implementing an academic publications database, and am looking for a search solution. I need at the very least Stemming and Accented Characters support (i.e.: searching for "alvarez" returns "álvarez" and v.v.). Some of the fields have a tinymce editor, so the data is stored with html entitie

Re: Search with Stemming, Accents and Entities

2008-04-24 Thread Rodrigo Culagovski
Jarek, it looks like Solr has its own database. The application is in Django, so it wouldn't make any sense to replicate the database in the search engine. Thanks, Rodrigo On Apr 24, 5:37 am, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Rodrigo Culagovski napisał(a): > > &g

Page-trees in admin system

2008-04-28 Thread Rodrigo Culagovski
I am starting to develop a site with Django. I will need to implement a 'pagetree' that serves static pages, (similar to the contrib.flatpages), with 3 or 4 levels of depth. I have already done this for previous Django driven sites, but wonder if there is a better way. My model looks like: class

Re: Page-trees in admin system

2008-04-28 Thread Rodrigo Culagovski
Matthias, that looks like what I'm looking for. Does it work in trunk? thanks! Rodrigo On Apr 28, 3:13 pm, Matthias Kestenholz <[EMAIL PROTECTED]> wrote: > Hi, > > > > On Mon, 2008-04-28 at 12:03 -0700, Rodrigo Culagovski wrote: > > I am starting to develop a

Row-level permissions, recommendations?

2008-05-06 Thread Rodrigo Culagovski
What's the state of the art for row-level permissions in Django? I'm working on an application where I need to allow users to edit their own personal info but nobody else's. What app, hack, patch or branch should I use in order to be able to do this via the admin site? T

Re: New to django and python. error following tutorial w/ the shell

2008-05-06 Thread Rodrigo Culagovski
Can you post the code 5 lines before and after the one that's giving you the error? Many times python will report a syntax error in one line that's actually caused by a missing parenthesis, semicolon, etc., in a line before. On May 6, 9:58 am, Jason Ourscene <[EMAIL PROTECTED]> wrote: > I tried w

  1   2   >