PostGIS intersects lookup with raster and geometry

2017-04-06 Thread Emanuele Di Giacomo
`ST_Intersects(ST_Polygon(raster), geom)`. Before submitting a patch, I'd like to be sure that I'm not missing something. Thanks, Emanuele [1]: https://docs.djangoproject.com/en/1.11/ref/contrib/gis/geoquerysets/#lookups-with-rasters [2]: https://postgis.net/docs/RT_ST_Intersec

Re: How to get sum of fields without using custom SQL?

2008-01-25 Thread Emanuele Pucciarelli
t.com/ticket/3566 (and will not for some time, it seems). Bye, -- Emanuele --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-use

Re: Looking for a security/encryption programmer for small contract

2008-01-23 Thread Emanuele Pucciarelli
nection, then you have just switched to a different problem :) Bye, -- Emanuele --~--~-~--~~~---~--~~ 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@goog

Re: Apache + mod_python (noob django/python/apache) import error in website url file

2007-08-01 Thread Emanuele Pucciarelli
7;/home/shawn/myCode'] + sys.path" Regards, -- Emanuele --~--~-~--~~~---~--~~ 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

Re: Match from list in URLconf

2007-07-30 Thread Emanuele Pucciarelli
in (Category, User, [...]): try: kwargs['queryset'] = model.objects.all() return object_detail(request, **kwargs) except ObjectDoesNotExist: pass return Http404 and this

Re: Match from list in URLconf

2007-07-30 Thread Emanuele Pucciarelli
ld probably look at 'slug' and 'slug_field' in Django's generic views. Since the username is unique, I guess that you can use it as a slug: ('^(?P\w+)/', object_detail, {'queryset': User.objects.all(), 'slug_field

Re: Template tag and combining variables & text

2007-07-29 Thread Emanuele Pucciarelli
return ImageNode(arglist[1:]) register.tag('img', do_img) (you can then subclass MixedNode for pretty much everything...) Regards, -- Emanuele --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &

Re: Is there any way to associate a view with a template?

2007-07-29 Thread Emanuele Pucciarelli <[EMAIL PROTECTED]>
ght want to look at the {% menu %} tag I've just shared on djangosnippets.org: http://www.djangosnippets.org/snippets/347/ . I don't know if it does the same thing that you're trying to do, but if it does, it could save you time :) Regards, -- Emanuele --~--~-~--~

Re: Rails Juggernaut like extension for python

2007-07-21 Thread Emanuele Pucciarelli <[EMAIL PROTECTED]>
re comments are always welcome :) Bye, -- Emanuele --~--~-~--~~~---~--~~ 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 unsubscrib

Re: Strange translation/encoding problem

2007-07-05 Thread Emanuele Pucciarelli <[EMAIL PROTECTED]>
least using an utf-8 source file (# -*- coding: utf-8 -*- at the start). Bye, -- Emanuele --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: django 0.90 -> 0.91 : raw_id_admin representation changed: HELP!

2006-01-16 Thread Emanuele
b, you're right: I tested many things but I didn't notice this little detail (not so little for my users). In any case I didn't expect a different behaviour of the code just upgrading django (and following carefully BackwardIncompatibleChanges notes) so forgive me, this time. Stay tuned, Emanuele

django 0.90 -> 0.91 : raw_id_admin representation changed: HELP!

2006-01-16 Thread Emanuele
'm currently studying Django code, but if you can help me and give suggestions for a solution I will appreciate it very much. Thanks in advance, Emanuele P.S.: changing author field and removing raw_id_admin=True is not a good solution in my case.

Re: admin interface: how to give read-only access?

2005-12-28 Thread Emanuele
OK, generic views is the way. Thanks! Emanuele

Re: admin interface: how to give read-only access?

2005-12-28 Thread Emanuele
This is _really_ interesting. I hope concrete planning on this in future. +1 Cheers, Emanuele

admin interface: how to give read-only access?

2005-12-27 Thread Emanuele
ews I mean)? BTW, by "read-only access" I mean the user can see list/detail admin pages for certain objects without having the possibility to modify/delete it. Thanks in advance, Emanuele

Re: choices in BooleanField: bug or feature?

2005-12-09 Thread Emanuele
bably in the last month many things happened in the source code of django :) This satisfies me completely, so there is no need to go further on BooleanField. Thanks again! Emanuele

Re: choices in BooleanField: bug or feature?

2005-12-09 Thread Emanuele
back to my original question (Bug of Feature?), I'm studying Django code to understand how can I improve BooelanField to handle choices as desired. But I'm a newbie and if you definitely consider that as a feature, It's better me to stop now and spend time on other things of my long todo list :) Thanks again, Emanuele

choices in BooleanField: bug or feature?

2005-12-08 Thread Emanuele
nvalid input syntax for type boolean: "" INSERT INTO "boolean_tests" ("c","i","b") VALUES ('TRUE','0','') Exception Location: /usr/local/lib/python2.4/site-packages/django/core/db/base.py in execute, line 9 --- In my opinion this is a bug. Are there some reasons to consider this a feature? Thanks, Emanuele

Re: unexpected keyword argument 'member_name' (rev 1547)

2005-12-06 Thread Emanuele
In fact I've just updated to revision 1560 and the problem is still there. Then I added your submitted patch on "member_name" in formfields.py and now everything WORKS PERFECTLY!! Thanks a lot Gustavo!! And thanks to rob for having spent time on my problem. Emanuele

Re: unexpected keyword argument 'member_name' (rev 1547)

2005-12-06 Thread Emanuele
y+editinline to DDT and another foreignkey to Materiale. I don't know if this is enough to justify 'member_name': 'fornitura.0.materiale_id'. What do you think? Thanks for you help, Emanuele

Re: missing default values in formfields.FormWrapper(...)

2005-12-05 Thread Emanuele
Maybe this is relevant for those interested in the thread: manipulator.flatten_data() is available only on recent SVN version of Django. It is unfortunately NOT available in Django_0.90. Cheers, Emanuele

Re: unexpected keyword argument 'member_name' (rev 1547)

2005-12-05 Thread Emanuele
as possible. In any case, thanks for your help! Emanuele

unexpected keyword argument 'member_name' (rev 1547)

2005-12-05 Thread Emanuele
re","data","fornitore","codice_ddt_fornitore","costo_forniture"), list_filter=("cantiere","fornitore"), search_fields=("codice_ddt_fornitore",), ) unique_together = (("fornitore","codice_ddt_fornitore"),) pass pass """ Have you any clue? Thanks in advance, Emanuele

Re: missing default values in formfields.FormWrapper(...)

2005-12-05 Thread Emanuele
Thanks a lot! It works perfectly. I think this should go in 'Forms and Manipulators' docs as soon as possible! Emanuele

missing default values in formfields.FormWrapper(...)

2005-12-04 Thread Emanuele
_data={} automagically from model's definitions. How can I do it? Right now I'm only able to do it "by hand", like writing explicitely new_data={'city':'NoWhere', 'zip_code':'12345'} instead of new_data={}, which is not so nice. Thanks in a

Re: inserting multiple images EASILY

2005-11-30 Thread Emanuele
It's just a name for me, but if you think it worth spending time on it I'll try! Cheers, Emanuele

Re: inserting multiple images EASILY

2005-11-30 Thread Emanuele
Thanks for your solution. For my case it is still a bit too complicate for users (my users, I mean). Anyway it really cool! Emanuele

Re: inserting multiple images EASILY

2005-11-30 Thread Emanuele
oblem: "webdav"; but for me it is just a buzzword :) . I'll investingate this webdav too. Thanks for your help! Emanuele

inserting multiple images EASILY

2005-11-29 Thread Emanuele
w that drag and drop is not possible. I'm a newbie in this field. Any ideas? Thanks in advance, Emanuele

Re: genric views or formfields/manipulators?

2005-11-25 Thread Emanuele
dated POST to a proper view (note that this is not a "create" action). Or is it better to do it by hand using manipulators and formfields? Cheers, Emanuele

genric views or formfields/manipulators?

2005-11-24 Thread Emanuele
I need a simple form to let the user enter some parameters to generate a report from data present in the database. Which is the correct way to proceed? I created a model "Report_Request": class Report_Request(meta.Model): city = meta.ForeignKey(City) date_start = meta.DateField("From")

Re: Handling large applications

2005-11-19 Thread Emanuele
I can't help you on the whole problem (managing large applications), but restricting to having a model in multiple files, see here: http://www.djangoproject.com/documentation/model_api/#models-in-multiple-files Basically it's more or less the first option you proposed. Cheers, Emanuele

Re: NullBooleanField & default=Unknown & Unknown not acceptable: how to do it?

2005-11-01 Thread Emanuele
Ouch! Sorry for the confusion : maybe the forces of evil are close to my house. ;) Emanuele

Re: NullBooleanField & default=Unknown & Unknown not acceptable: how to do it?

2005-11-01 Thread Emanuele
Now I see. So "" means blank value. I missed it in the docs. Thank you again!! Emanuele

Re: NullBooleanField & default=Unknown & Unknown not acceptable: how to do it?

2005-10-31 Thread Emanuele
Wow! Thank you very much Adrian! I still don't understand where solution 1 avoids '' as a possible choice by the user, but anyway it's time for me to study validators: solution 2 seems perfect. Let's do it tomorrow, here it's late in the night :) Emanuele

CharField with primary_key=True: a possible bug?

2005-10-31 Thread Emanuele
uot;blank=False". Is it a bug or am I missing something? Cheers, Emanuele

Re: NullBooleanField & default=Unknown & Unknown not acceptable: how to do it?

2005-10-31 Thread Emanuele
;) that can't be accepted by the application (or admin interface to be precise), so the user is forced to explicitely choose 'Yes' or 'No'. But how to do it? Anyway thanks for the answer! Emanuele

NullBooleanField & default=Unknown & Unknown not acceptable: how to do it?

2005-10-28 Thread Emanuele
ding "Unknown" value as an admin interface constraint) I have no ideas. Hints? Thanks in advance, Emanuele

Re: 'Site administration' heading in django admin interface

2005-10-27 Thread Emanuele
OK, solved! I copied contrib/admin/templates/admin/base.html to my local admin directory of templates and commented out this line: {% if title %}{{ title }}{% endif %} and that's it. Thanks a lot, Emanuele

'Site administration' heading in django admin interface

2005-10-27 Thread Emanuele
r now, so is it possible to remove or customize that heading from user side? Thanks, Emanuele [*]: I hope to release it freely soon, just as an example of django capabilities for newbies like me. Stay tuned.

Re: error: (32, 'Broken pipe')

2005-10-24 Thread Emanuele
Yes! It's absolutely correct and I'm able to reproduce it as you guessed. If I click on a page while it's sent from server I got exactly that error message. Thank you for the answer. Emanuele

error: (32, 'Broken pipe')

2005-10-24 Thread Emanuele
2.3/socket.py", line 254, in write self.flush() File "/usr/lib/python2.3/socket.py", line 241, in flush self._sock.sendall(buffer) error: (32, 'Broken pipe') [24/Oct/2005 10:10:42] "POST /admin/koan/materiali/add/ HTTP/1.1" 302 0 ... -- Do you have hints? Thanks in advance, Emanuele

Re: "runserver" vs. "runserver :" : a bug?

2005-10-17 Thread Emanuele
t more of this feature in official docs will prevent other newbies like me to spend lots of time in this pitfall. Cheers, Emanuele

"runserver" vs. "runserver :" : a bug?

2005-10-15 Thread Emanuele
t and from any other host. Is it a correct behaviour? I look for it in the docs but I found nothing. Is it a bug? In the beginning I thought it was a firewall problem, so I went mad trying to trace it, but at the end I found this trick. Comments? Cheers, Emanuele

Re: big drop-down lists, raw_id_admin and custom primary key: a bug?

2005-10-06 Thread Emanuele
YESS! It works perfectly! Thank you very much, this solves an important problem in my application. Emanuele

Re: big drop-down lists, raw_id_admin and custom primary key: a bug?

2005-10-06 Thread Emanuele
I get "Please correct the error below. Enter a whole number." around poll entry. I just did an 'svn update' and django has the usual soft link to /usr/local/lib/python2.4/site-packages/ , so I think I'm running the correct version. Did I miss something? Anyway, thanks! Emanuele

Re: big drop-down lists, raw_id_admin and custom primary key: a bug?

2005-10-03 Thread Emanuele
ve when dealing with big drop-down lists, but it is not as easy as selecting from a list of meaningful names... Some sort of javascript (forgive me, I don't know javascript) should do that. Django automatic admin interface + models is going to become my favorite web RAD tool :) Emanuele

big drop-down lists, raw_id_admin and custom primary key: a bug?

2005-10-03 Thread Emanuele
ot;raw_pk_admin=True" option to insert custom primary keys in admin interface (and not only numeric stuff)? Thanks in advance, Emanuele

Re: newbie: unique and ForeignKey

2005-09-28 Thread Emanuele
** SOLVED ** Thank you very much for your help. Updating (now using softlinks instead of setup.py) solved perfectly my problem. I'm _really_ happy :) Emanuele

Re: newbie: unique and ForeignKey

2005-09-28 Thread Emanuele
The only things that are different from tutorial steps, in my case, are: 1) python2.4 instead of 2.3 2) I installed django using 'python setup.py install' instead of making a softlink to sources. I'm using postgresql and django's own web server. In any case, thanks for your time. Emanuele

Re: newbie: unique and ForeignKey

2005-09-28 Thread Emanuele
ow_bad_kwarg_error raise TypeError, "got unexpected keyword argument '%s'" % kwarg TypeError: got unexpected keyword argument 'person__exact' - HTH, Emanuele

newbie: unique and ForeignKey

2005-09-28 Thread Emanuele
roper way? What's wrong? Example code follows. Thanks in advance, Emanuele --- from django.core import meta class Person(meta.Model): name = meta.CharField("Name",maxlength=30) surname = meta.CharField("Surname",maxle