django_chatterbot

2019-04-17 Thread Abhineet Baranwal
Hello there, 
I am using* django chatterbot *but whenevere i typed any new sentence and 
hit enter then *the bot* returns always the current time.I do not know why 
it always respond with the current time .Any ideas?

And can anyone tell me how we can train my personal data with django 
chatterbot ?


-- 
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/02cefd26-feed-49be-9dc8-19cb80827a6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Proposal to format Django using black

2019-04-17 Thread Brice Parent

Le 17/4/19 à 2:33, Dan Davis a écrit :

+1 isort
-1 black

I think that codestyle checkers are better, because you teach yourself 
proper style for python.


I'm in a team in which we've enforced Black a bit more than a year ago, 
and I can tell you that now, everyone code in a blackish style from 
start. Black is still always executed, but doesn't make any change most 
of the time. It's just there to enforce the style, for newcomers and if 
we sometimes make some style mistakes.


A big win here.

[snip]

--
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/23ba5efe-f290-c3d7-e24f-8e109d61efb9%40brice.xyz.
For more options, visit https://groups.google.com/d/optout.


Re: Why does ModelForm do validation and not Model

2019-04-17 Thread Curtis Maloney

On 4/17/19 4:55 AM, Aymeric Augustin wrote:

Hello Will,

It's mostly for performance reasons, since validation can be expensive. 


Really? My memory was that it was (a) backward compatibility [model 
validation was added later], and (b) practicality [try catching 
everywhere in your code you save a model, and enforce catching 
validation exceptions there].


Models _support_ validation, but don't _enforce_ it.

--
Curtis

--
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/f162b3b7-3045-e1f2-e82e-e18fa6de49c5%40tinbrain.net.
For more options, visit https://groups.google.com/d/optout.


Re: Proposal to format Django using black

2019-04-17 Thread Jon Dufresne
> One thing we have not considered here is that after running black on
Django a huge portion of our outstanding merge requests will have
conflicts, some of which might be tricky to rebase. I’m not sure there is
much we can do about that though.

With a little bit of git-foo, this is actually not that bad. In past
projects, this is the approach I took:

$ git checkout my-branch
# Rebase on the parent of the commit introducing Black.
$ git rebase ^
# Fix normal merge conflicts.
# ...
# Rebase on the Black commit, instructing git to prefer the rebased
changes
# over the black changes. For rebase, the terminology is backwards,
hence
# "theirs".
$ git rebase  -X theirs
# Reformat your changes with black.
$ black .
# Amend the commit with the Black formatting changes.
$ git commit --ammend -a

-- 
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/CADhq2b7JD6C-wqyKgPVDK0JOvX_W_vgzAe%2Be6TcSkC6ArPm5jA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Force "required" fields to be included in a ModelForm

2019-04-17 Thread Will Gordon
Well shoot...this definitely seems like something only I'm running into. 
Appreciate y'alls feedback. 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/d024a7bd-b0c6-48ef-ad54-0e4f473757a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: GSOC Proposal : CrossDB JSON Field

2019-04-17 Thread Rohit Jha
Hi Carlton,

I have already submitted this proposal to Google, I will be glad if you can
go through it.

Thanks & Regards






On Wed, Apr 17, 2019 at 12:28 PM Carlton Gibson 
wrote:

> Deadline for submissions has passed. I’m reviewing this week.
>
> On Wed, 17 Apr 2019 at 08:52, Adam Johnson  wrote:
>
>> Hi Rohit!
>>
>> It seems your email thread has been missed by the list, I don't know why,
>> perhaps it hit some spam filters. There's also another thread from a
>> student proposing the same projectt:
>>
>>
>> https://groups.google.com/d/msgid/django-developers/415dbb68-d1a8-4642-8908-e6414dde1ad0%40googlegroups.com
>>
>> I think the last message on that thread is a big development with regards
>> to this project, since Raphael has written a third-party implementation
>> that has most of the features:
>> https://github.com/raphaelm/django-jsonfallback
>>
>> I'm not sure what we do with regards to two GSOC proposals for the same
>> task, maybe Carlton or others would like to weigh in?
>>
>> Thanks,
>>
>> Adam
>>
>> On Fri, 5 Apr 2019 at 03:02, Rohit Jha  wrote:
>>
>>> Hi
>>>
>>> I am Rohit Jha, I am a sophomore at IIT Roorkee. I am planning to
>>> participate in GSOC. My draft Proposal can be found here :
>>>
>>>
>>> https://docs.google.com/document/d/1jSEir_wuYlBqvQTmWJUF3mpquuIH4ElZG1hFBeMl1HI/edit?usp=sharing
>>>
>>> Feedback is much appreciated
>>>
>>> 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/fcaed3da-3b9f-44a0-85a5-7d5007775360%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>> Adam
>>
>> --
>> 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/CAMyDDM10QJiERJ_hPW9cGP5ZZmYhzNcG6Ufny57a9MuL1uNLiA%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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/CAJwKpyTg-x8QCVCTn4ziZ2kGbjzZx%2BRjDhe3P9Lthn_xzfxeGA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAJmB4Kca8B0P95EoqXRtsOURTH7_%2BEHO23ycTkstJy9bpJp0aA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Proposal to format Django using black

2019-04-17 Thread Tom Forbes
I would be +1 for Black. I think it makes a lot of sense for a project like 
Django, and it does seem that a non trivial amount of both contributor and 
reviewer time is spent on formatting fixes.

The choice of double quotes by default used to annoy me, but after using black 
for a while I think that the benefits outweigh the downsides.

One thing we have not considered here is that after running black on Django a 
huge portion of our outstanding merge requests will have conflicts, some of 
which might be tricky to rebase. I’m not sure there is much we can do about 
that though.

Tom

> On 17 Apr 2019, at 09:26, Tobias Kunze  wrote:
> 
> Hi Dan,
> 
>> On 19-04-16 20:33:29, Dan Davis wrote:
>> +1 isort
>> -1 black
>> 
>> I think that codestyle checkers are better, because you teach yourself
>> proper style for python.
> 
> I appreciate this argument, but: As Django community our primary concern
> in this discussion has to be the impact black would have on the Django
> code base and the Django development process – educating our
> contributors cannot be a primary concern, compared to making
> contributions as easy as possible.
> 
> Tobias
> 
> -- 
> 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/20190417082648.miicsigxjwoevmkl%40cordelia.localdomain.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/AFFEB466-A328-4DA6-8845-F2DFB55C1ED1%40tomforb.es.
For more options, visit https://groups.google.com/d/optout.


Re: Proposal to format Django using black

2019-04-17 Thread Tobias Kunze
Hi Dan,

On 19-04-16 20:33:29, Dan Davis wrote:
>+1 isort
>-1 black
>
>I think that codestyle checkers are better, because you teach yourself
>proper style for python.

I appreciate this argument, but: As Django community our primary concern
in this discussion has to be the impact black would have on the Django
code base and the Django development process – educating our
contributors cannot be a primary concern, compared to making
contributions as easy as possible.

Tobias

-- 
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/20190417082648.miicsigxjwoevmkl%40cordelia.localdomain.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature


Re: Force "required" fields to be included in a ModelForm

2019-04-17 Thread Tobias Kunze
On 19-04-16 17:34:11, Will Gordon wrote:
>In the same way that editable fields are forced to not be included in a 
>ModelForm (
>https://github.com/django/django/blob/master/django/forms/models.py#L146), 
>I would like to propose that "required" fields (`blank=False`) be forced to 
>be included in a ModelForm.

Is there anything missing in Django that would prevent you from doing
this in a subclass of ModelForm? My projects tend to go with one or two
common base classes in between actual forms/views and Django's
forms/views, and I'd argue that this is not too much trouble for a
feature like this.

I'm also against adding a warning for this by default – I'd like to keep
warnings reserved for issues with more of an impact. I think for every
one of my larger projects, I'd have to silence this warning, which is
annoying (and keeping it there introduces warning fatigue, which Django
so far does a good job of avoiding).

Tobias

-- 
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/20190417080037.uu2ybg3etwespmen%40cordelia.localdomain.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature


Re: Force "required" fields to be included in a ModelForm

2019-04-17 Thread PARTH PATIL
Yes I agree with others, that this should not be implemented. As I find
this too much specific to just your case.

There are many cases, like what if there is some required field which the
developer wants to set by themselves and don't want user to edit that
(transaction details maybe for a shopping site).

You may Inherit a class from modelform and overide the behaviour for your
project, buy I dont think this should be included in Django.

Best Regards,
PARTH PATIL


On Wed, 17 Apr 2019, 12:15 pm Harro,  wrote:

> I'm against, there are lots of cases where a modelform is used to edit an
> exitsting object and thus the required fields are already set and you don't
> want them to be editable.
>
> If it's a trivial patch then you should think about extending modelform in
> your own project enforce it there and then use it instead of the normal
> modelform.
>
> I also think a good test setup/protocol will catch missing fields pretty
> quickly as you won't be able to actually create the object.
>
> On Wednesday, 17 April 2019 02:34:12 UTC+2, Will Gordon wrote:
>>
>> In the same way that editable fields are forced to not be included in a
>> ModelForm (
>> https://github.com/django/django/blob/master/django/forms/models.py#L146),
>> I would like to propose that "required" fields (`blank=False`) be forced to
>> be included in a ModelForm.
>>
>> While I understand that a developer can force this inclusion themselves,
>> but on a large project, it should not be necessary to always ensure that a
>> Model and ModelForm are in sync.
>>
>> Since this is probably a non-trivial patch (
>> https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/submitting-patches/#non-trivial-patches)
>> I need to provide evidence that this has been discussed. As such, I'm open
>> to any and all opinions!
>>
> --
> 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/a51d1c72-c724-448f-b804-344cb33d176f%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAJSC-ifeKKX0zp1F48dm%3DQSRe%2BBds4r4_nM_0fn3ih9CpTVQUw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: GSOC Proposal : CrossDB JSON Field

2019-04-17 Thread Carlton Gibson
Deadline for submissions has passed. I’m reviewing this week.

On Wed, 17 Apr 2019 at 08:52, Adam Johnson  wrote:

> Hi Rohit!
>
> It seems your email thread has been missed by the list, I don't know why,
> perhaps it hit some spam filters. There's also another thread from a
> student proposing the same projectt:
>
>
> https://groups.google.com/d/msgid/django-developers/415dbb68-d1a8-4642-8908-e6414dde1ad0%40googlegroups.com
>
> I think the last message on that thread is a big development with regards
> to this project, since Raphael has written a third-party implementation
> that has most of the features:
> https://github.com/raphaelm/django-jsonfallback
>
> I'm not sure what we do with regards to two GSOC proposals for the same
> task, maybe Carlton or others would like to weigh in?
>
> Thanks,
>
> Adam
>
> On Fri, 5 Apr 2019 at 03:02, Rohit Jha  wrote:
>
>> Hi
>>
>> I am Rohit Jha, I am a sophomore at IIT Roorkee. I am planning to
>> participate in GSOC. My draft Proposal can be found here :
>>
>>
>> https://docs.google.com/document/d/1jSEir_wuYlBqvQTmWJUF3mpquuIH4ElZG1hFBeMl1HI/edit?usp=sharing
>>
>> Feedback is much appreciated
>>
>> 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/fcaed3da-3b9f-44a0-85a5-7d5007775360%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> Adam
>
> --
> 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/CAMyDDM10QJiERJ_hPW9cGP5ZZmYhzNcG6Ufny57a9MuL1uNLiA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAJwKpyTg-x8QCVCTn4ziZ2kGbjzZx%2BRjDhe3P9Lthn_xzfxeGA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: GSOC Proposal : CrossDB JSON Field

2019-04-17 Thread Adam Johnson
Hi Rohit!

It seems your email thread has been missed by the list, I don't know why,
perhaps it hit some spam filters. There's also another thread from a
student proposing the same projectt:

https://groups.google.com/d/msgid/django-developers/415dbb68-d1a8-4642-8908-e6414dde1ad0%40googlegroups.com

I think the last message on that thread is a big development with regards
to this project, since Raphael has written a third-party implementation
that has most of the features:
https://github.com/raphaelm/django-jsonfallback

I'm not sure what we do with regards to two GSOC proposals for the same
task, maybe Carlton or others would like to weigh in?

Thanks,

Adam

On Fri, 5 Apr 2019 at 03:02, Rohit Jha  wrote:

> Hi
>
> I am Rohit Jha, I am a sophomore at IIT Roorkee. I am planning to
> participate in GSOC. My draft Proposal can be found here :
>
>
> https://docs.google.com/document/d/1jSEir_wuYlBqvQTmWJUF3mpquuIH4ElZG1hFBeMl1HI/edit?usp=sharing
>
> Feedback is much appreciated
>
> 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/fcaed3da-3b9f-44a0-85a5-7d5007775360%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Adam

-- 
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/CAMyDDM10QJiERJ_hPW9cGP5ZZmYhzNcG6Ufny57a9MuL1uNLiA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Proposal to format Django using black

2019-04-17 Thread Matthias Kestenholz
After dozens of mails it's clear that this is certainly a controversial
topic -- especially, as always, string quoting.

I think there is an overwhelming benefit in adopting black and not
deviating from the defaults even if the only benefit of this is just never
having to discuss these choices again.

Adopting black has helped in all projects I (help) maintain. A few of them
are well known, but the specific projects do not matter much.

And I'm one of those people who hesitated because I didn't like many of the
choices black made but I adapted really quickly.

Thanks,
Matthias

On Sat, Apr 13, 2019 at 5:35 PM Herman S  wrote:

> Hi.
>
> I propose that Django starts using 'black' [0] to auto-format all Python
> code.
> For those unfamiliar with 'black' I recommend reading the the projects
> README.
> The short version: it aims to reduce bike-shedding and non value-adding
> discussions; saving time reviewing code; and making the barrier to entry
> lower
> by taking some uncompromissing choices with regards to formatting.  This is
> similar to tools such as 'gofmt' for Go and 'prettier' for Javascript.
>
> Personally I first got involved contributing to Django couple of weeks
> back,
> and from anecdotal experience I can testify to how 'formatting of code'
> creates
> a huge barrier for entry. My PR at the time went multiple times back and
> forth
> tweaking formatting. Before this, I had to research the style used by
> exploring
> the docs at length and reading at least 10-20 different source – and even
> those
> were not always consistent. At the end of the day I felt like almost 50%
> of the
> time I used on the patch was not used on actually solving the issue at
> hand.
> Thinking about code formatting in 2019 is a mental energy better used for
> other
> things, and it feels unnecessary that core developers on Django spend
> their time
> "nit-picking" on these things.
>
> I recently led the efforts to make this change where I work. We have a
> 200K+
> LOC Django code-base with more than 30K commits. Some key take-aways: it
> has
> drastically changed the way we work with code across teams, new engineers
> are
> easier on-boarded, PR are more focused on architectural choices and "naming
> things", existing PRs before migration had surprisingly few conflicts and
> were
> easy to fix, hot code paths are already "blameable" and it's easy to blame
> a
> line of code and go past the "black-commit", and lastly the migration went
> without any issues or down-time.
>
> I had some really fruitful discussions at DjangoCon Europe this week on
> this
> very topic, and it seems we are not alone in these experiences. I would
> love to
> hear from all of you and hope that we can land on something that will
> enable
> *more* people to easier contribute back to this project.
>
> I've set up how this _could_ look depending on some configurables in Black:
>
> * Default config: https://github.com/hermansc/django/pull/1
> * Line length kept at 119: https://github.com/hermansc/django/pull/3
> * Line length kept at 119, no string normalization:
> https://github.com/hermansc/django/pull/2
>
> Please have a look at the Black documentation. It explains the benefits
> better
> than I possibly could do here.
>
> With kind regards,
> Herman Schistad
>
> [0]: https://github.com/ambv/black
>
> --
> 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/CAN%3DnMTx0EE5WfXuccv_e3MBuCxp9u_pAV_ow5MxNST6MptTDBw%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
www.feinheit.ch — berat...@feinheit.ch — +41 555 11 11 41

-- 
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/CANvPqgBua2Jsga7f4jTaaW45%3DcROcxXt1zUbx2wH%2Bs4TJRp7Hg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Force "required" fields to be included in a ModelForm

2019-04-17 Thread Harro
I'm against, there are lots of cases where a modelform is used to edit an 
exitsting object and thus the required fields are already set and you don't 
want them to be editable.

If it's a trivial patch then you should think about extending modelform in 
your own project enforce it there and then use it instead of the normal 
modelform.

I also think a good test setup/protocol will catch missing fields pretty 
quickly as you won't be able to actually create the object.

On Wednesday, 17 April 2019 02:34:12 UTC+2, Will Gordon wrote:
>
> In the same way that editable fields are forced to not be included in a 
> ModelForm (
> https://github.com/django/django/blob/master/django/forms/models.py#L146), 
> I would like to propose that "required" fields (`blank=False`) be forced to 
> be included in a ModelForm.
>
> While I understand that a developer can force this inclusion themselves, 
> but on a large project, it should not be necessary to always ensure that a 
> Model and ModelForm are in sync.
>
> Since this is probably a non-trivial patch (
> https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/submitting-patches/#non-trivial-patches)
>  
> I need to provide evidence that this has been discussed. As such, I'm open 
> to any and all opinions!
>

-- 
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/a51d1c72-c724-448f-b804-344cb33d176f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Force "required" fields to be included in a ModelForm

2019-04-17 Thread Matthias Kestenholz
 Please don't do this.

There are very good reasons for NOT including blank=False fields by default
such as batch-editing some field with a formset or inlineformset or just
offering different forms to users with different access levels (as Tobias
wrote).

Django started recommending using `fields` instead of `exclude` with good
reasons. Why push people towards `exclude` again now? I think we should
instead trust developers who specify `fields` that those actually are the
fields they want in the form. Using `fields` *is* explicit already.

If it is hard to put this behavior into a base form class in your own
project and use this base class everywhere then that would be a good reason
to consider changing a thing or two in Django.

Thanks,
m.

On Wed, Apr 17, 2019 at 3:14 AM Will Gordon  wrote:

> Would it be weird to just make it so that the "required" field *must* be
> present in exclude? This way, if you *accidentally* leave off a required
> field, you're quickly notified about itbut if you explicitly mark it as
> something to exclude, it makes it clear to everyone exactly what you're
> trying to do? The whole "explicit is better than implicit" and what not.
>
> --
> 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/c0b7e5d5-f422-42be-ace8-c0201a2f79a7%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
www.feinheit.ch — berat...@feinheit.ch — +41 555 11 11 41

-- 
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/CANvPqgDoTQoh1WDzNXaj1Ob%2BOV-pG8CxugQhwumuZQ_VQLPnzA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.