Disabling (or find a workaround for) the comment security checks

2010-05-05 Thread Federico Capoano
Hello to all, I've just launched my new web-site powered by django and i'm very satisfied. I've implemented StaticGenerator to improve the performance and loading speed and I have to admit is brilliant. Unfortunately i've noticed the comment system doesn't work. This happens because the pages of

Re: Django 1.2 release candidate available

2010-05-06 Thread Federico Capoano
I've been using the beta for a while and it works pretty good for what I've seen. On May 6, 6:40 am, James Bennett wrote: > Tonight we're proud to announce, finally, the first Django 1.2 release > candidate. If all goes well, it will also be the *only* release > candidate, and Django 1.2 final

Re: Disabling (or find a workaround for) the comment security checks

2010-05-07 Thread Federico Capoano
t; > Then use the form base classes with the functionality you want. > > (You'll probably want to exclude the CommentSecurityForm, and include > > the generic foreign key information some other > > way.)http://docs.djangoproject.com/en/dev/ref/contrib/comments/forms/ > &g

pg_get_serial_sequence("unknown", "unknown") - revision 13336

2010-06-08 Thread Federico Capoano
Hello to all, I just upgraded to revision 13336, I tried then to add a post on my blog but I got an error. I tried then to save any other object in the admin but I get always the same error: "DatabaseError: function pg_get_serial_sequence("unknown", "unknown") does not exist HINT: No function ma

Re: How to enable Static Generator

2010-06-09 Thread Federico Capoano
I wrote a blog post about it here: http://nemesisdesign.net/blog/coding/setup-django-staticgenerator-apache-mod_wsgi/ On May 20, 1:29 pm, vikk wrote: > Hi all, > > I got some of the documents to enable static generator but still for > away from the result. > Please show me the way to implement it

Re: pg_get_serial_sequence("unknown", "unknown") - revision 13336

2010-06-09 Thread Federico Capoano
I had probably the trunk equivalent to the just released 1.2 Thanks for your help. On Jun 9, 1:51 am, Russell Keith-Magee wrote: > On Wed, Jun 9, 2010 at 5:47 AM, Federico Capoano > > wrote: > > Hello to all, > > > I just upgraded to revision 13336, I tried then to add a pos

Re: pg_get_serial_sequence("unknown", "unknown") - revision 13336

2010-06-09 Thread Federico Capoano
I see. I think I'd like to upgrade postgresql .. but I don't know what would happen with webmin. Maybe I'll go to ask to the webmin support. Do you think upgrading from 7 to 8 is a difficult task on debian? I also think it should be written in the documentation and release notes. On Jun 9, 1:2

Re: pg_get_serial_sequence("unknown", "unknown") - revision 13336

2010-06-10 Thread Federico Capoano
ncompatibilities in point release changes). It will, in > part, depend on whether your version of webmin works with version 8. > > I guess you'll have to make the jump to 8 eventually tho' even if you > hold off for now :) > > Matt > > On Jun 9, 2:53 pm, Federico

UnicodeDecodeError (ordinal not in range) when deleting an inline item - 1.2.1

2010-06-14 Thread Federico Capoano
Hello to all. Version 1.2.1: In the admin, just noticed that when I delete any of the dynamic inlines (an image basically) of a form and then I hit the SAVE button the image is deleted successfully but I get this error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 13: ord

Re: Seeking Django vs. Joomla comparison

2010-06-19 Thread Federico Capoano
Bytheway Joomla is also a framework.. is a Content Management Framework. I've been using it for years but I have to say that from a performance point of view is CRAP. I also think that the scopes of Django and Joomla are very different. Django will never have the large adoption that Joomla has, be

Re: UnicodeDecodeError (ordinal not in range) when deleting an inline item - 1.2.1

2010-06-19 Thread Federico Capoano
The same code on my computer offline works without problems, so I guess It's a server configuration problem, what do you think? I read the this bit here: http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#if-you-get-a-unicodeencodeerror And it says to write something similar to: ex

Re: UnicodeDecodeError (ordinal not in range) when deleting an inline item - 1.2.1

2010-06-20 Thread Federico Capoano
ot; LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= Any hint? On Jun 19, 5:25 pm, Federi

Re: UnicodeDecodeError (ordinal not in range) when deleting an inline item - 1.2.1

2010-06-27 Thread Federico Capoano
Thanks for your help. I've been able to fix the problem thanks also to the Rackspace technical support. This is the answer, i post it cos it might be useful to someone else: "Greetings, I've added the two lines you provided to /etc/sysconfig/httpd - a file which is 'sourced' by the apache startu

Converting a query using extra from Postgres to Mysql

2010-08-25 Thread Federico Capoano
Hi to all django users, i just completed a project in which I used the extra() database API function in order to save the number of query used. Unfortunately the production server doesn't use Postgres but MySQL. I don't know why but I'm not making it to convert the query so it's compatible with M

Re: Converting a query using extra from Postgres to Mysql

2010-08-25 Thread Federico Capoano
}, ).only('name', 'slug') On Aug 25, 7:29 pm, Federico Capoano wrote: > Hi to all django users, > > i just completed a project in which I used the extra() database API > function in order to save the number of query used. Unfortunately the > production

What's the best way to develop an app that is similar the django admin?

2010-09-20 Thread Federico Capoano
Hi all, I try to explain it clearly. I have to develop an application that will implement similar functionality and look of the django admin, but in the frontend. So this application will have files management, clients management, and much more similar stuff, with add new, edit, delete, file upl

Re: What's the best way to develop an app that is similar the django admin?

2010-09-23 Thread Federico Capoano
Thanks for the answers guy, I knew a little bit model forms, but I'll check out also the other solution. On 22 Set, 09:29, Matthias Kestenholz wrote: > On Mon, Sep 20, 2010 at 3:13 PM, Federico Capoano > > wrote: > > Hi all, > > > I try to explain it clearl

Help with file upload using ModelForm

2010-09-23 Thread Federico Capoano
Hello to all, maybe is something really silly, but I don't get it. I'm using ModelForm to edit a database object that has a file input. The tag has enctype="multipart/form-data" and the view uses request.FILES. I can add and edit files without problems, but there is a case in which editing a f

Re: Help with file upload using ModelForm

2010-09-23 Thread Federico Capoano
Sorry ignore this. Changed from: form = PdfForm( initial ={ 'name': pdf.name, 'description': pdf.description, 'file': pdf.file, } ) to: form = PdfForm(instance = pdf) and it works fine

File Upload Content Type Verification

2010-09-24 Thread Federico Capoano
Is there a way we can check if a certain file being uploaded is really what it claims to be? Let's say I want to restrict files to PDF only, then I take a php script and I rename it PDF I can still upload it if using the following custom FileField that I just worked out yesterday: from django.db.m

Re: File Upload Content Type Verification

2010-09-24 Thread Federico Capoano
mages? What's the best way to avoid security issues? Maybe store the file somewhere hidden would be safer? On 24 Set, 13:08, Tom Evans wrote: > On Fri, Sep 24, 2010 at 11:28 AM, Federico Capoano > > wrote: > > Is there a way we can check if a certain file being uploaded is

Re: File Upload Content Type Verification

2010-09-24 Thread Federico Capoano
10 at 12:23 PM, Federico Capoano > > wrote: > > I can't trust the user because this field will be used in the > > frontend, which will be an app similar to the django admin, but much > > more limited. > > > So according to what you said, there is no standard

Upload above apache web root?

2010-09-29 Thread Federico Capoano
Hi everyone, is it possible to write a custom model filefield that upload files somewhere above the public directory? -- 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 unsubsc

Re: Upload above apache web root?

2010-09-30 Thread Federico Capoano
Is this not possible? I wonder why Django force to upload files only in a certain directory and doesn't allow more flexibility. On 29 Set, 19:46, Federico Capoano wrote: > Hi everyone, > > is it possible to write a custom model filefield that upload files > somewhere above the

Re: Upload above apache web root?

2010-09-30 Thread Federico Capoano
Yes you're right, I'm trying it out. I'll post a solution when I'm done. On 30 Set, 10:10, Xavier Ordoquy wrote: > Well, the documentation already tells you about > it:http://docs.djangoproject.com/en/1.2/topics/files/#the-built-in-files... > > Le 30 sept.

Re: Upload above apache web root?

2010-09-30 Thread Federico Capoano
PS: i'll post a solution so other noobs like me will see how to do that.. On 30 Set, 10:35, Federico Capoano wrote: > Yes you're right, I'm trying it out. I'll post a solution when I'm > done. > > On 30 Set, 10:10, Xavier Ordoquy wrote: > > > >

Re: Upload above apache web root?

2010-09-30 Thread Federico Capoano
, 10:40 am, Xavier Ordoquy wrote: > Hi, > > To me, it looks like the documentation already gave the answer. > > Regards, > Xavier. > > Le 30 sept. 2010 à 10:37, Federico Capoano a écrit : > > > > > PS: i'll post a solution so other noobs like me will see

Set Language in the Admin

2010-11-14 Thread Federico Capoano
Hi guys, i'm developing an app in 3 languages, en, es and it. My browser accepts all of them with priority to italian. Since I've done that the admin started to show up in italian. How can I force it back to english? In the setting I put LANGUAGE_CODE = 'en-gb' -- You received this message b

Nested Categories in Admin

2010-11-14 Thread Federico Capoano
Hi all, I would like to find a way to get categories and subcategories displayed in the admin, in the form of a multiple select. Like: parent child1 child2 parent2 child3 Do I have to make a custom field or is there already a solution around? Thanks -- You received this message b

Re: OT: getting strange attempted gets

2010-11-14 Thread Federico Capoano
No one is attacking your server, that's just the django server telling you what's going on in your app (when you perform any action the server logs it). On Nov 14, 4:50 pm, John Fabiani wrote: > Hi, > I'm a newbie to not only django but web programming in general. > > I have noticed that when I r

Re: Set Language in the Admin

2010-11-16 Thread Federico Capoano
16 someLiang > > > > > > > > > > > perhaps you need to comment the statement in your setting.py > > > 'django.middleware.locale.LocaleMiddleware', > > > 2010/11/15 Federico Capoano > > > Hi guys, > > >> i'm developing an

Re: Nested Categories in Admin

2010-11-16 Thread Federico Capoano
Any suggestion? On Nov 14, 6:15 pm, Federico Capoano wrote: > Hi all, > > I would like to find a way to get categories and subcategories > displayed in the admin, in the form of a multiple select. > > Like: > > parent > child1 > child2 > parent2 >

Re: Nested Categories in Admin

2010-11-17 Thread Federico Capoano
Sorry I couldn't find anything, I'll search more. On Nov 16, 3:00 pm, derek wrote: > You will need to use Javascipt: handwritten or via framework e.g. > JQuery. Its been asked about before on this mailing list and numerous > people have blogged on it. > > On Nov 16, 1

Re: Set Language in the Admin

2010-11-18 Thread Federico Capoano
Thanks On Nov 16, 11:19 am, Tom Evans wrote: > On Tue, Nov 16, 2010 at 9:58 AM, Federico Capoano > > wrote: > > This will affect the frontend too? > > Yes, I'd replace it with a customized version of the LocaleMiddleware, > something like this ou

Re: Set Language in the Admin

2010-11-23 Thread Federico Capoano
I got rid of the LocaleMiddleware. To translate the frontend of the application I'm using http://bitbucket.org/carljm/django-localeurl/overview It seems the best solution for me. On Nov 18, 1:29 pm, Federico Capoano wrote: > Thanks > > On Nov 16, 11:19 am, To

Caught UnicodeDecodeError when using {% get_available_languages as langs %}

2010-11-26 Thread Federico Capoano
Hi all, this is my settings.py _ = lambda s: s LANGUAGES = ( ('en', _('English')), ('es', _('Español')), ('it', _('Italiano')), ) When I use {% get_available_languages as langs %} I get this error: TemplateSyntaxError at / Caught UnicodeDecodeError while rendering: 'ascii' codec can't d

Re: Caught UnicodeDecodeError when using {% get_available_languages as langs %}

2010-11-26 Thread Federico Capoano
1.3 alpha 1 SVN-14688 On Nov 26, 8:46 pm, Federico Capoano wrote: > Hi all, > > this is my settings.py > > _ = lambda s: s > > LANGUAGES = ( >   ('en', _('English')), >   ('es', _('Español')), >   ('it', _('

Re: Caught UnicodeDecodeError when using {% get_available_languages as langs %}

2010-11-26 Thread Federico Capoano
Thanks Tom. On Nov 26, 9:15 pm, Tom Evans wrote: > On Fri, Nov 26, 2010 at 7:46 PM, Federico Capoano > > > > > > > > > > wrote: > > Hi all, > > > this is my settings.py > > > _ = lambda s: s > > > LANGUAGES = ( > >  

preventing template from converting html entities

2010-02-24 Thread Federico Capoano
Hello to all, simple question: I have the following HTML in a template: But it gets rendered this way: That is, the " entity is converted to the respective character, ". Very nice, but i'd need " Is there a filter or something i can use to tell the Django Template System to render " ? Thank

Re: preventing template from converting html entities

2010-03-11 Thread Federico Capoano
nications.com/ > alex.robb...@5qcommunications.com > 800-747-4214 ext 913 (p)http://www.ask5q.com/twitter/ > > On Thu, Feb 25, 2010 at 8:33 AM, Alex Robbins > > > > wrote: > > I think you can do that with title={% filter force_escape > > %}"{{ villa.name }

Retrievecomments for a given model

2010-03-24 Thread Federico Capoano
Hello to all, I don't understand how I can retrieve the most recent comments for a given model, something like: {% load comments %} {% get_comment_list for post as comment_list %} By using this code I get an empty list.. :-S -- You received this message because you are subscribed to the Googl

Re: Retrievecomments for a given model

2010-03-24 Thread Federico Capoano
I made a custom template tag. On Mar 24, 7:45 pm, Federico Capoano wrote: > Hello to all, > > I don't understand how I can retrieve the most recent comments for a > given model, something like: > > {% load comments %} > {% get_comment_list for post as comment_list %

JOIN instead of multiple SELECT

2010-03-31 Thread Federico Capoano
Hello to all, has been a while i've been wondering how to optimize Django's queries to the database, for example by setting it to use JOIN to retrieve foreign keys instead of multiple selects. for example if I have a blog object that has a category foreign key and I write in a template {{ blog.c

Re: JOIN instead of multiple SELECT

2010-03-31 Thread Federico Capoano
e database be hit again? Best Regards Federico On Mar 31, 10:49 pm, Rolando Espinoza La Fuente wrote: > On Wed, Mar 31, 2010 at 3:30 PM, Federico Capoano > > wrote: > > Hello to all, > > > has been a while i've been wondering how to optimize Django's queries &g

Re: JOIN instead of multiple SELECT

2010-04-01 Thread Federico Capoano
> On Wed, Mar 31, 2010 at 5:22 PM, Federico Capoano > > wrote: > > Thanks, > > > how many things i've learnt today, to optimize the number and length > > of query by using: > > > * select_related > > * only > > * extra > > > Do y

Re: JOIN instead of multiple SELECT

2010-04-01 Thread Federico Capoano
What about this solution to generate static files? http://superjared.com/projects/static-generator/ On Apr 1, 12:49 am, Rolando Espinoza La Fuente wrote: > On Wed, Mar 31, 2010 at 5:22 PM, Federico Capoano > > wrote: > > Thanks, > > > how many things i've learnt

Receiving [Django] ERROR via email even if DEBUG = True

2011-07-20 Thread Federico Capoano
Hi, i'm using django 1.4 alpha from SVN. I get email notification for errors on my local machine which I use to develop. How can I turn these notifications off? DEBUG is True on my settings.py. Thanks -- You received this message because you are subscribed to the Google Groups "Django users"

GenericIPAddressField validation error not translated

2011-08-11 Thread Federico Capoano
Hi all, i'm using the new GenericIPAddressField and validation errors are not translated to the language of my project. Pheraps this field hasn't been internationalized yet? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

Re: GenericIPAddressField validation error not translated

2011-08-18 Thread Federico Capoano
How can I contribute? On Aug 13, 6:50 am, Karen Tracey wrote: > On Thu, Aug 11, 2011 at 2:58 PM, Federico Capoano > wrote: > > > Hi all, > > > i'm using the new GenericIPAddressField and validation errors are not > > translated to the language of my project. &

database i18n

2011-02-22 Thread Federico Capoano
I'm quite surprised that django doesn't have a native i18n solution for models. I've been trying some apps but one doesn't work with latest versions, one is no longer developed, another one has no documentation, another one simply doesn't work. Tomorrow I'm going to try again and pheraps try some

Re: database i18n

2011-02-23 Thread Federico Capoano
anguages), too, as you must use icontains > - you can not use startswith or endswith > - no support for django-tagging > > regards > > Henrik > > > > > > > > >reply to message: > >date: 22.02.2011 13:13:18 > >from: "Federico Capoano&qu

Supporting a wider range of awesome PostgreSQL features in Django - including hstore, JSON and full text search

2014-02-23 Thread Federico Capoano
I found this on django's blog: https://www.kickstarter.com/projects/mjtamlyn/improved-postgresql-support-in-django Very interesting! Anybody knows if they intend to redevelop everything from scratch or reuse and improve existing implementations? Federico -- You received this message because

Django key/value JSON widget

2020-07-22 Thread Federico Capoano
Hey everyone, I'm looking for a key/value widget to edit a JSON flat object, like this widget here: https://django-hstore.readthedocs.io/en/latest/#django-admin-widget (I made this one a while ago, but I'm not maintaining that project anymore). But I'm having no luck in finding it, there must

Re: Django key/value JSON widget

2020-08-17 Thread Federico Capoano
the widget in action. Best regards Federico Capoano On Wednesday, July 22, 2020 at 1:34:01 PM UTC-5 Federico Capoano wrote: > Hey everyone, > > I'm looking for a key/value widget to edit a JSON flat object, like this > widget here: > https://django-hstore.readthedocs.io/en

Re: Django key/value JSON widget

2020-08-19 Thread Federico Capoano
On Wed, Aug 19, 2020 at 3:43 AM Roger Gammans wrote: > Hi > > Thanks that looks useful. > > On my rather long TODO list is to turn use this ( > https://github.com/josdejong/jsoneditor > ) npm package to build a less > restrictive json widget... > There's

SynchronousOnlyOperation: bug or misconfiguration?

2020-12-18 Thread Federico Capoano
I have a celery task which performs queries and network operations. When deployed with celery with gevent concurrency, I occasionally (but not always) get reports of SynchronousOnlyOperation exceptions being raised. I described the problem in detail on StackOverflow: SynchronousOnlyOperation fr

Django admin filters + select2 + loading many options asynchronously

2021-08-04 Thread Federico Capoano
Hi everyone, when adding adming filters by foreign key in the admin, sometimes the possible values are too many to load. So I am thinking, why not load values asynchronously and show these with select2? Probably only a certain number of values should be fetched and then while scrolling more va

Re: Any django reusable app for outdoor & indoor location, GPS tracking?

2017-11-21 Thread 'Federico Capoano' via Django users
sophy-to-django-projects-a-report-from-the-real-world On Tuesday, September 26, 2017 at 12:13:30 PM UTC+2, Federico Capoano wrote: > > Hi everyone, > > before building my own reusable app all over again, I wanted to ask here > if there is any reusable django app that does ind

Re: Any django reusable app for outdoor & indoor location, GPS tracking?

2018-05-04 Thread 'Federico Capoano' via Django users
eusable app but nonetheless I hope it will be a useful addition to the django ecosystem. Best regards Federico On Tuesday, November 21, 2017 at 3:34:16 PM UTC+1, Federico Capoano wrote: > > Hi everyone, > > I'd like to provide an update on this topic. > > First of all, I thi

Django m2m through model with classic admin widget

2016-08-22 Thread 'Federico Capoano' via Django users
Hi, this is a tough question, i've posted it to stackoverflow here: http://stackoverflow.com/questions/39076392/django-m2m-through-model-with-classic-admin-widget I include the text of the question here to make it easier to respond: I need to customise a through model of a many-to-many relations

Re: Django m2m through model with classic admin widget

2016-08-22 Thread 'Federico Capoano' via Django users
ngo, there's > an open ticket to allow using the widget as long as there aren't any extra > required fields on the through model: > https://code.djangoproject.com/ticket/12203 > > On Monday, August 22, 2016 at 6:00:06 AM UTC-4, Federico Capoano wrote: >> >>

Any django reusable app for outdoor & indoor location, GPS tracking?

2017-09-26 Thread 'Federico Capoano' via Django users
Hi everyone, before building my own reusable app all over again, I wanted to ask here if there is any reusable django app that does indoor location and or GPS tracking. I'm not looking for something full featured, but rather a starting point to which I can contribute to. Best regards Fed

Re: Django admin: is there an event, or another way to call a Javascript function, when a Django Admin Popup (the green plus icon) completes ?

2017-09-30 Thread 'Federico Capoano' via Django users
Hi James, I was banging my head on the wall for this issue, you saved me some precious time, thank you! I wonder why such a mechanism is not included by default into Django, I will bring up this issue on the development mailing list. Federico On Thursday, November 26, 2015 at 11:58:22 AM UT

Re: Django admin: is there an event, or another way to call a Javascript function, when a Django Admin Popup (the green plus icon) completes ?

2017-09-30 Thread 'Federico Capoano' via Django users
Opened a new thread on django-developers: https://groups.google.com/d/msg/django-developers/BsudgRRCKb4/airBUyhaAwAJ On Saturday, September 30, 2017 at 6:32:51 PM UTC+2, Federico Capoano wrote: > > Hi James, > > I was banging my head on the wall for this issue, you saved me some

Re: Callable field in fieldset's field

2020-04-16 Thread 'Federico Capoano' via Django users
Is this the kind of thing you're looking for? https://github.com/openwisp/openwisp-firmware-upgrader/tree/1e9fa26d75a48ae9274c2708ea9a10134a2bb9d0/openwisp_firmware_upgrader/base/admin.py#L150-L186 Fed On Wednesday, April 15, 2020 at 4:15:48 PM UTC-5, Gagan Deep wrote: > > Greetings of the day,