django admin missing meta tag for charcter encoding in the head

2012-04-03 Thread Ric
hi, the default django template need a meta tag for character encoding in the head -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group,

Jquery library update in django 1.4

2012-02-28 Thread Ric
hi, is it possibile to upgrade the jquery library in admin to the lastest version with the now django 1.4? for what i've seen there is just one little bug when you use the select all checkbox in admin changelist, all other javascript works out of the box -- You received this message because you

django.contrib.gis.measure

2012-02-23 Thread Ric
i've opened a ticket for a small issue in module django.contrib.gis.measure the MeasureBase class cannot be subclassed easily, so i've write a new MeasureBase class to allow developers to implement other Measure class (like weight, currency and so on) the code it's here

Re: start using less (and bootstrap!)

2012-02-04 Thread Ric
no no, my point is not to remove admin, you misunderstood me... what i'm talking about is the extend the current admin version, with a theme framework. the theme framework got a default theme, that is the current admin theme, but then developers can add their own theme. now making a theme for

Re: start using less (and bootstrap!)

2012-02-03 Thread Ric
a less compiler is needed to make developers add custom variables to match color scheme they like. i prefeer using an existing framework, a lot of work less to do, no docs to make, just a link. bootstrap it's fantastic, it's well done and is flexible. django should use a base style, already

start using less (and bootstrap!)

2012-02-02 Thread Ric
hi, i want to propose a long term idea. start using a less framework inside django. i'm using bootstrap for my django app. it's really cool. what i'am doing now is writing with less a new css to style django admin. my idea is that django should provide a faster way to write an app, and while

ModelBackend should have a get_anonymous_user method

2011-11-18 Thread Ric
ModelBackend should provide a method to get a fresh instance of AnonymousUser, and use this method to set a new instance of AnonymousUser in django.contrib.auth.get_user and django.contrib.auth.logout i've created a ticket https://code.djangoproject.com/ticket/17254 -- You received this

Re: add view_permission

2011-11-16 Thread Ric
ok this is my last message, i swear! i've created a new options.py file and a .diff, and i've attached it to the ticket you send to me. i've tested it and it works, it's pretty basic and there is more work to do. what i've done is to add a method has_view_permission, and check a view

Re: add view_permission

2011-11-16 Thread Ric
fine i'll keep in mind. On 16 Nov, 22:17, Aymeric Augustin <aymeric.augus...@polytechnique.org> wrote: > Hi Ric, > > I've noticed that you're posting a lot on this mailing list. Please remember > that each email sent here is broadcasted to around 7000 people, each of whom

Re: add view_permission

2011-11-16 Thread Ric
:43, Ric <riccardodivirgi...@gmail.com> wrote: > ok i can give a try... > > maybe it's difficult, not to much. i have to see inline models, and > give the right behavior > > so from github i can fork django 1.3.1, but actually i'm working with > the latest version. &g

Re: add view_permission

2011-11-16 Thread Ric
gus...@polytechnique.org> wrote: > Hi Ric, > > This feature request is quite common, and it's tracked > here:https://code.djangoproject.com/ticket/8936 > > A few people talked to me since I wrote the GSoC project description linked > in comment #5, but I don't think

Re: Error in formfield in django.db.models.field

2011-11-16 Thread Ric
should i have to open a ticket? On 14 Nov, 23:19, Ric <riccardodivirgi...@gmail.com> wrote: > form_class is not in kwargs if the method is declared like this > > def formfield(self, form_class=forms.CharField, **kwargs): > > a possible solution is to use a code like this &

Re: add view_permission

2011-11-16 Thread Ric
ch model. +1 > > On 17/11/2011, at 2:47 AM, Ric wrote: > > > > > > > > > i've been thinking about a new django admin feature, that could be > > backward implemented > > > it's about adding a view permission for models > > > so we can have &

add view_permission

2011-11-16 Thread Ric
i've been thinking about a new django admin feature, that could be backward implemented it's about adding a view permission for models so we can have 1.change_permission 2.delete_permission 3.add_permission and 4.view_permission in the changelist_view view_permission allow user to see the

Re: mark_safe(media) in django admin

2011-11-16 Thread Ric
i've created a ticket https://code.djangoproject.com/ticket/17239 sorry but i'm new, i'would like to contribute. let me know if it's fine. On 15 Nov, 07:02, Aymeric Augustin <aymeric.augus...@polytechnique.org> wrote: > On 14 nov. 2011, at 23:15, Ric wrote: > > > a minor b

Re: Error in formfield in django.db.models.field

2011-11-14 Thread Ric
hoiceField or forms.CharField) in that way is no form_class is passed, a default form_class is defined (TypedChoiceField or CharField) On 14 Nov, 21:22, Ric <riccardodivirgi...@gmail.com> wrote: > yes but definitely not the current code, because i cannot subclass > with super > > O

mark_safe(media) in django admin

2011-11-14 Thread Ric
a minor bug in django admin. in django.contrib.admin.options mark_safe is called to render media. in add_view and change_view we can find mark_safe(media) in changelist_view media is injected as an object (without mark_safe) i propose to pass the media object to the template (without

Re: Error in formfield in django.db.models.field

2011-11-14 Thread Ric
yes but definitely not the current code, because i cannot subclass with super On 14 Nov, 15:46, ptone <pres...@ptone.com> wrote: > On Nov 13, 11:55 pm, Ric <riccardodivirgi...@gmail.com> wrote: > > > > > > > > > > > the field class define th

Error in formfield in django.db.models.field

2011-11-13 Thread Ric
the field class define this code def formfield(self, form_class=forms.CharField, **kwargs): """ Returns a django.forms.Field instance for this database Field. """ defaults = {'required': not self.blank, 'label': capfirst(self.verbose_name),

Re: Attach a technincal html response to email on server error

2011-11-13 Thread Ric
yes of course i've read it in the documentation... i'v snv the code right now! sorry, i missed it. On 13 Nov, 15:03, Benjamin Wohlwend <piquad...@gmail.com> wrote: > Hi Riccardo, > > On Sun, Nov 13, 2011 at 2:51 PM, Ric <riccardodivirgi...@gmail.com> wrote: > > >

Re: Attach a technincal html response to email on server error

2011-11-13 Thread Ric
oh fantastic... but i read about security issue... and what about create a model, save the traceback in the db, and reopen it from the admin? On 12 Nov, 03:39, Karen Tracey <kmtra...@gmail.com> wrote: > On Fri, Nov 11, 2011 at 9:35 PM, Ric <riccardodivirgi...@gmail.com> wrote:

Re: Attach a technincal html response to email on server error

2011-11-11 Thread Ric
yeah i know it can be done... i can try to write it in future... it can be a subclass of something, i have to open the code. could be an interesting contribute? -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send

Re: Attach a technincal html response to email on server error

2011-11-10 Thread Ric
not a lot of javascript, really. just a script to expand the local vars... but make a an alternative content it's not easy. attach the html response it's pretty easy, maybe just a few line of code and some import -- You received this message because you are subscribed to the Google Groups

Re: Attach a technincal html response to email on server error

2011-11-10 Thread Ric
i don't think so... the debug response have got a lot of javascript... and a lot of email client (gmail, outlook) escape javascript and could brake some functionality of the web page... the safest way, in my opinion, is to leave the content of email as plain text and to attach the html file to

Attach a technincal html response to email on server error

2011-11-10 Thread Ric
hi, i receive django email on 500 error. with that kind of mail is difficult to debug, because i don't have a lot of informations. it's much more simple to debug when i set DEBUG = True and i receive an html technical response. with that response i can read a lot of informations (like vars,

Re: JsonField

2011-11-10 Thread Ric
i'm reading other post on this forum django use pickle to store non relational data with session... -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe

Re: TemplateResponse and loader should handle request

2011-11-10 Thread Ric
maybe even a simple request.template_folders could do the job... but it would work only with the new templateresponse class... On 10 Nov, 21:23, Ric <riccardodivirgi...@gmail.com> wrote: > i agree with nan, it would be a nice feature. > > On 10 Nov, 21:12, Ric <riccardodivirgi..

Re: TemplateResponse and loader should handle request

2011-11-10 Thread Ric
i agree with nan, it would be a nice feature. On 10 Nov, 21:12, Ric <riccardodivirgi...@gmail.com> wrote: > > If you're using class-based views, override get_templates to provide the > > right templates for the request. > > i would like a django-wide feature, t

Re: TemplateResponse and loader should handle request

2011-11-10 Thread Ric
> If you're using class-based views, override get_templates to provide the > right templates for the request. i would like a django-wide feature, to customize admin folder and third party app. -- You received this message because you are subscribed to the Google Groups "Django developers"

Re: TemplateResponse and loader should handle request

2011-11-10 Thread Ric
the first thing i have thought was that "loader shouldn't care about the request" but, request could be an optional argument, that can be none, with this simple thing i can create a custom template loader, and add whatever folder i want, based on request. it's a way to customize a Site. i manage

Re: JsonField

2011-11-10 Thread Ric
it was just an idea, Russel... maybe too hard to accomplish in the right way. i can use json field in my trunk and that's good for me. i thought maybe, with validators, django could be be able to accomplish some of the features of a non relational data store, without messing up with low lowel

Re: JsonField

2011-11-10 Thread Ric
Nov, 20:20, Ric <riccardodivirgi...@gmail.com> wrote: > that is just a proposition, i know that if you need a non relation db > the best thing to do is to have a non relational data store. > > but you need a relational data store only if you need to query non > relational data, i

Re: JsonField

2011-11-10 Thread Ric
that is just a proposition, i know that if you need a non relation db the best thing to do is to have a non relational data store. but you need a relational data store only if you need to query non relational data, in the other cases you can use a relational db, because relational db got foreign

Re: JsonField

2011-11-07 Thread Ric
we can use validators to let the developers validate non relational data. On 7 Nov, 12:45, Tom Evans <tevans...@googlemail.com> wrote: > On Sat, Nov 5, 2011 at 11:48 AM, Ric <riccardodivirgi...@gmail.com> wrote: > > this is my proposition to have custom data inside a model field &g

Re: JsonField

2011-11-06 Thread Ric
it's a good code. you wrote: # TODO: Look for date/time/datetime objects within the structure? and there is no need, because it's handled by djangojsonencoder On 7 Nov, 07:06, schinckel wrote: > I'm doing just this in several cases: I packaged up a JSONField into a >

Re: I want to pass the Exception info from Http404 to handler404 view and consequently the 404.html

2011-11-06 Thread Ric
for me a simple solution to this is issue, is that django should be able to recognize an HttpResponse as error and return it like: raise HttpResponseRedirect(url) or raise HttpResponse(render_to_template("errors/user_not_logged"), context = RequestContext(context), status_code = 401) with this

TemplateResponse and loader should handle request

2011-11-06 Thread Ric
request.url_conf has been added with django 1.3. in my opinion, the loader object should handle the request, so that can be sublassed to pass different template folder based on request params. i need this feature for my app, is it possible to have different template folder based on request

Re: JsonField

2011-11-06 Thread Ric
i'm posting this comment into the ticket. On 6 Nov, 20:14, Ric <riccardodivirgi...@gmail.com> wrote: > i'm watching the ticket right now. > maybe there is no need to to create a class > JSONDateEncoder(json.JSONEncoder) because there is DjangoJSONEncoder > already. > t

Re: JsonField

2011-11-06 Thread Ric
save method. we should use the same logic here and encode a json object to string only when we call the save method, no need for a get_%s_json in the field api. On 6 Nov, 01:36, Russell Keith-Magee <russ...@keith-magee.com> wrote: > On Sat, Nov 5, 2011 at 7:48 PM, Ric <riccardodivirgi.

JsonField

2011-11-05 Thread Ric
this is my proposition to have custom data inside a model field a json data field, the code is simple as this, and it works with lastest django release from django.db import models from django.core.serializers.json import simplejson, DjangoJSONEncoder import StringIO class

Re: New admin feature: Delete and replace with existing object

2010-07-12 Thread Ric
On Fri, Jul 9, 2010 at 10:37 PM, Ric <riccardodivirgi...@gmail.com> wrote: > > i'll reply one by one > > >  * What if you have multiple models referring to Author? Do you > > assume > > that every related model will be updated the same way? > > >  * What

Re: New admin feature: Delete and replace with existing object

2010-07-09 Thread Ric
i'll reply one by one * What if you have multiple models referring to Author? Do you assume that every related model will be updated the same way? * What if you have multiple foreign keys from Blog to Author? Do you assume that every foreign key on a single model will be updated in the same

Re: New admin feature: Delete and replace with existing object

2010-07-08 Thread Ric
uss...@keith-magee.com> wrote: > On Wed, Jul 7, 2010 at 3:41 PM, Ric <riccardodivirgi...@gmail.com> wrote: > > Hello i opened a ticket, but somone suggest me to discuss this new > > feature here. > > >http://code.djangoproject.com/ticket/139

Re: New admin feature: Delete and replace with existing object

2010-07-08 Thread Ric
se objects from 3 to 10, the use choose to substitute with object 3 and all Banana and Apple in the database will be replaced with a Tree, using the queryset update method. is it clear? On 7 Lug, 15:20, Russell Keith-Magee <russ...@keith-magee.com> wrote: > On Wed, Jul 7, 2

New admin feature: Delete and replace with existing object

2010-07-07 Thread Ric
Hello i opened a ticket, but somone suggest me to discuss this new feature here. http://code.djangoproject.com/ticket/13900 i would like to edit django.contrib.admin.options.ModelAdmin?.delete_view and add a helpful feature. Instead of deleting all the nested objects, the delete_view could