Re: raise error for form attribute

2017-05-11 Thread Naveen Yadav


On Wednesday, 10 May 2017 16:48:00 UTC+5:30, Naveen Yadav wrote:
>
> Hi,
>
> I am working on my first issue 
> . Part of solution seems 
> like 
> 1. checking the concerned fields 
> 2. raising the error if required
>
>
> After going through the source code, I realized there two ways to resolve 
> the issue, first one seems raise error at appropriate place although a few 
> doubts about this
>
> *raise error:*
>
>1. appropriate place to raise error clean() of form class, Will it be 
>fine if i raise error here ?
>
> *non_field_error*
>
> second solution would be add non_field_error for the form.
>
> Any feedback would be helpful
>
> Thanks.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/5516d7d4-079a-4253-8477-9220516ea877%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Problems around SchemaEditor._alter_field

2017-05-11 Thread Florian Apolloner
I've pushed an initial PR [1], sadly I had to change one of the signatures. 
But I think this is an okayish change for 2.0 given that it is internal API 
anyways.

Cheers,
Florian

https://github.com/django/django/pull/8487/

On Tuesday, May 9, 2017 at 3:24:46 PM UTC+2, Florian Apolloner wrote:
>
> I am currently trying to (again?) write a database backend for Informix. 
> So far so good, but I am running into one major issue: All of Django's 
> other databases support changing null/default properties via "ALTER TABLE 
> ALTER col DROP NULL/DEFAULT" or what not. In Informix I can only use "ALTER 
> TABLE MODIFY" and rewrite the column completely [1]. This means that I 
> would need more information in [2] (which I initially tried in 
> https://github.com/django/django/commit/2b3a9414570af623853ca0f819c7d77d0511f22c
>  
> before noticing that I need to repeat the whole column declaration). I am 
> looking into options to extend _alter_field [3] in a way that I can either 
> add a database feature that says something along the line of: "field 
> property changes need full remake" and then call into 
> _alter_column_type_sql directly, or at least factor the (for me) annoying 
> parts out into _alter_column_properties.
>
> Which of the two would you prefer?
>
> Thanks,
> Florian
>
> [1] 
> https://www.ibm.com/support/knowledgecenter/en/SSGU8G_12.1.0/com.ibm.sqls.doc/ids_sqs_0290.htm
>  
> [2] 
> https://github.com/django/django/blob/837259a63ff03fbc0ca2bc2999a6fbc8c6c40bcc/django/db/backends/base/schema.py#L39-L42
>  
> [3] 
> https://github.com/django/django/blob/837259a63ff03fbc0ca2bc2999a6fbc8c6c40bcc/django/db/backends/base/schema.py#L581-L640
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/3562f71f-4298-454e-832f-22c6324ae4e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.