Conversation
|
I just noticed that this only applies the casts to data from the database, no? So assigning values from e.g. input will not cause them to be converted to their proper type. |
|
@JoostK Am I missing something?
|
|
Why did you delete @daylerees's name from the commits. Please rebase against his version, then make your changes on top, thus keeping his commits. |
|
@JosephSilber My bad, I didn't notice the |
|
@GrahamCampbell I did not "delete" any commits. There's no code here that's been taken from @daylerees's PR. I just built upon his idea. In fact, I originally didn't even plan on making my own PR, but Dayle nudged me to. Can you please stop acting like you own this place? There's only one man here that can dole out orders, and he's that tall chap from Arkansas. |
|
@JosephSilber I only ask people to do things that may be useful, to save the big man time. Also, in this case, sorry, yes, I was wrong... |
|
Any news on this? |
|
I think I would rather just let people use |
This PR is based on the work done by @daylerees in #4948. See that PR for more info.
It basically allows any type that
settypeaccepts, plusdate(not sure how usefularray,objectandnullcould be. Maybe we should prevent that?).This improves upon @daylerees's work thus:
SoftDeletingTraitto castdeleted_atto a date (it had been working automatically in 4.1 and has been restored here).There are no tests yet.
I'm trying to get a consensus about what people think of this implementation and if @taylorotwell thinks this should be added (and whether to 4.2 or 4.3).
Once everything is ironed out I'll be more than happy to write the tests.