Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-09 Thread Markus Holtermann
Hi Akshesh, thank you for your proposal! Sounds like a good plan. On Thursday, March 10, 2016 at 8:16:10 AM UTC+11, akki wrote: Once the index is added to a model, the model can inject itself into the >> index, or the schema editor can use the originating model to get data it >> needs. No need

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-09 Thread Gavin Wahl
Would you be able to support partial indexes as well? On Tuesday, March 8, 2016 at 7:46:02 AM UTC-7, akki wrote: > > Hi > > My name is Akshesh Doshi (akki). I am a student at Indian Institute Of > Technology, Roorkee (IITR). I have been contributing to Django >

Re: deprecating the "escape" half of django.utils.safestring (#24046)

2016-03-09 Thread Collin Anderson
Ohh. Nevermind. Sorry for not reading the whole thing. I forgot about the {% autoescape off %} case. On Wed, Mar 9, 2016 at 10:11 PM, Collin Anderson wrote: > This makes sense to me. mark_for_escaping() seems like a no-op to me. > > On Sat, Mar 5, 2016 at 11:16 AM, Tim Graham wrote: > >> Aymeri

Re: deprecating the "escape" half of django.utils.safestring (#24046)

2016-03-09 Thread Collin Anderson
This makes sense to me. mark_for_escaping() seems like a no-op to me. On Sat, Mar 5, 2016 at 11:16 AM, Tim Graham wrote: > Aymeric raised this ticket [0] while working on multiple template engines: > > > "Since any data that isn't explicitly marked as safe must be treated as > unsafe, I don't un

Re: Improving MSSQL and Azure SQL support on Django

2016-03-09 Thread Cristiano Coelho
"Improve documentation/examples [decrease confusion]: There's already so much awesome content out there on getting started with Django (but not many are referencing MSSQL as the db of choice or why MSSQL is a great option)." I wouldn't think of MSSQL as a great option for django at least until i

Re: [ GSoC2016 ] Integration of django and angular2

2016-03-09 Thread Cristiano Coelho
In my opinion angular + django + django-rest-framework is a very powerful combo, and using django templates mixed with angular (for anything else than the index page) is really a bad idea due to templates being very slow and rendered by python. Angular must run against a 100% web api with its o

Re: [ GSoC2016 ] Integration of django and angular2

2016-03-09 Thread Tim Graham
I'm not sure what the end product you have in mind would look like, but I don't think Django (core) is going to adopt tight integration with any JavaScript framework. You pointed to a third-party package... what's the problem with it and how would your proposal differ? On Wednesday, March 9, 20

Re: TransactionManagementError is raised when autocommit …

2016-03-09 Thread Aymeric Augustin
Hi Tore, I’ve been meaning to check whether your use case was supported, because it should be. I’m sorry, it took me a few days to find the time to investigate. While I was testing, I produced an exception which looks similar to the problem you originally reported: https://code.djangoproject.co

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-09 Thread akki
Hi Josh and Anssi, Thanks for the feedback. Much appreciated. > - The earlier part of your proposal seems to focus on allowing postgres > users to define more complex indexes that they previously haven't been able > to use. Oracle is then highlighted also for allowing functional indexes. I

[ GSoC2016 ] Integration of django and angular2

2016-03-09 Thread Вадим Горбачев
Hello. I am a student of the St. Petersburg State Polytechnical University. But I am also a web-developer . Now the problem of integration of django and angular2 is very interesting to me. And I want to submit the application in this direct

Re: Override the default form field for a model field

2016-03-09 Thread Johannes Hoppe
I got that, but you can't just make it your default widget, it will always require more information. And I don't really like "defaults", again pep20. I currently don't have any need for action, therefore I won't do anything. If you want to make a draft on how to refactor it, I'm happy to rev

Re: Override the default form field for a model field

2016-03-09 Thread James Pic
I just meant that currently, if a user wants to make Select2 the default widget for a model field, it is necessary to subclass the modelfield class and override the model field's formfield() method just to change the default widget it uses, sorry if it wasn't clear ! -- You received this message

Re: Override the default form field for a model field

2016-03-09 Thread Johannes Hoppe
Regarding django-select2: I don’t want to provide fields at this point. Django has the concept of widgets, and that is all I need for select2. You could overwrite the widget for all forms with a template processor, but why? You’d need to know which db columns you need too search to fil

Re: Summer of Code Idea: Class-based [Object] Permissions

2016-03-09 Thread Tim Graham
1. Not sure, but it seems similar to the access mixins introduced in Django 1.9: https://docs.djangoproject.com/en/1.9/releases/1.9/#permission-mixins-for-class-based-views 2. Any large feature that is twelve weeks worth of work for which you can find a mentor for should be okay. You should incl

Re: Override the default form field for a model field

2016-03-09 Thread James Pic
On Wed, Mar 9, 2016 at 3:09 PM, Johannes Hoppe wrote: > We'll you can change the `default` form Field using > `django.db.models.Field.formfield`. Do you mean that, for example, an app like django-select2 could provide the following model fields ? - Select2WidgetForeignKey, - Select2WidgetOneToOn

Re: Override the default form field for a model field

2016-03-09 Thread Johannes Hoppe
We'll you can change the `default` form Field using `django.db.models.Field.formfield`. But that is actually the thing I don't like I think this needs to go: https:// github.com/django/django/blob/d5f89ff6e873dbb2890ed05ce2aeae628792c8f7/django/ db/models/fields/__init__.py#L869-L905 But at t

Re: Override the default form field for a model field

2016-03-09 Thread James Pic
Hi ! Currently, by default, django's ModelForm uses form fields which are known to be compatible for the modelfield. By "compatible", I mean that it works when the ModelForm calls: - ModelField.value_from_object() to get the initial formfield value for the model's field, via model_to_dict: https

Re: Override the default form field for a model field

2016-03-09 Thread Johannes Hoppe
Hi Tim, and I guess that's you James? Thanks for pointing me towards this discussion. Tho I do like the idea for the sake of `django-select2`, I think it's a bad idea for Django. I don't think that `django.db` should be even aware of `django.forms`. I don't even like the current implementation t