Integrating GeoDjango with Esri API

2020-11-20 Thread Rodrigo Cea
I'm developing a mapping website. I will be consuming map layers from ESRI Online. I see they have a fairly sophisticated Python API. The site will be django based. I wonder how easy it would be to use GeoDjango for local storage and editing of geographical data as well as other, not

How to change a language's label in Django language specific URLs using i18n_patterns?

2017-01-06 Thread Rodrigo Cea
I'm using Django's i18n_patterns, so my URLs look like www.domain.com/pt/title. I want to change the language code in the URL to a different string, say, for example 'br' instead of 'pt', so the same url above would be rendered www.domain.com/*br*/title. I only want to change the language's

How can I limit a 'list_filter' to a certain subset of objects?

2011-11-03 Thread Rodrigo Cea
Explanation: I have 3 models: Client, Project and Task. Each Client has 1 or more Projects. Each Project has 1 or more Tasks. A Client can only see the Projects assigned to him and the Tasks assigned to one of his Projects. This is already working, overriding "queryset" in the ModelAdmin

What apps or snippets to use for Facebook and Twitter registration, login and posting?

2011-03-02 Thread Rodrigo Cea
I am developing a site that I want to link with Facebook and Twitter. So as to not reinvent the wheel, I'm looking for apps or snippets that can help with this, specifically: 1) allow users to register and login with their Facebook and/or Twitter accounts. 2) Have these accounts be linked to

Django on IIS randomly changing LANGUAGE_CODE

2011-01-19 Thread Rodrigo Cea
I hava a Django production site on IIS 6.0. The LANGUAGE_CODE is set to 'es-cl' There are forms on the site. Sometimes the site seems to switch to English, returning validation errors on dates written in dd/mm/ format. The errors themselves are in English (whereas they're normally in Spanish).

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

Row Level Permissions?

2010-03-11 Thread Rodrigo Cea
What's the current state of the art for Row Level Permissions? I need to set permissions for users on a MPTT-based page tree, where each user will be allowed to edit only a specific branch, using the admin. I found this: http://www.djangosnippets.org/snippets/1054/, which might work, but wonder

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

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: > {%

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
> maybe), you wouldn't see the args. > Ken > > C:\>*assoc .py* > .py=Python.File > > C:\>*ftype Python.File* > Python.File="C:\Python25\python.exe" "%1" %* > > On Tue, Dec 1, 2009 at 7:18 AM, Rodrigo Cea <rodrigo...@gmail.com> wrote: &

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
e new security scheme that MS has come up with to > not allow associations at the CMD level?  sounds like that would break > too much stuff though, I'll try it at work tomorrow and if it's not an > association thing, I'll check back on this thread. > > J > > On Nov 30, 8:36 am, Rodrigo

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

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

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

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

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

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

Which compressor / packer for CSS and JS?

2009-09-29 Thread Rodrigo Cea
What is your experience or advice on using a compressor or asset packager in Django? For JS, CSS and (maybe) image sprites? I have a site going into production tomorrow. It is recieving an "E" grade in YSlow's "make fewer requests", as it has a lot of CSS and JS files (about 10 of each). It also

Re: HELP ME

2009-09-16 Thread Rodrigo Cea
> but not working on my form validation, I think the validation does not > work because the field is formamig and example ModelChoiceField fields > are Charfield > You still haven't explained what it is that is not working. You will not get any useful answers until you do this. "Does not work"

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

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: 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

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

Trouble rendering a ManyToManyField with CheckBoxSelectMultiple widget

2009-06-25 Thread Rodrigo Cea
I am rendering a ManyToManyField with a CheckboxSelectMultiple widget like so: class CreateBandForm(ModelForm): styles= forms.ChoiceField(widget=forms.CheckboxSelectMultiple(), choices=[(i,i) for i in Style.objects.all()]) class Meta: model = Band fields =

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:

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

2009-06-17 Thread Rodrigo Cea
hod they show changes the redirect after saving changes, but > should be easily modifiable to simply create a popup preview window > when the user clicks the "Save and continue editing button". This is > how I plan to implement it myself. > > Regards, > Liam > > On J

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

2009-06-08 Thread Rodrigo Cea
ow up at the side of the admin screen. " On Jun 8, 12:44 am, Rodrigo Cea <rodrigo...@gmail.com> 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". > However, onl

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

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

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 to

Re: Validate image size in admin.

2009-06-07 Thread Rodrigo Cea
Jun 7, 9:38 pm, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Sun, Jun 7, 2009 at 9:37 PM, Rodrigo Cea <rodrigo...@gmail.com> wrote: > > > How can I validate, in the admin, that images uploaded by users have a > > minimum size in pixels? > > Use the form

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