Re: CharField with Oracle Backend Null Behaviour

2018-11-12 Thread vafzal
Hi Mariusz, Thanks for getting back to me, didn't realise that default was empty strings, that would work too. With regards to existing projects, migration should be really straightforward, just need to add a constraint to db on the next migration. It would generate migrations where no model ch

normalizing newlines in form fields

2018-11-12 Thread Jakub Kleň
I'm thinking if it wouldn't be nice if django automatically normalized newlines of data entered by the user. The implementation would be really simple, there's already a function for it in django.utils.text.normalize_newlines, and it would go into django.forms.fields.CharField.to_python the sam

Re: normalizing newlines in form fields

2018-11-12 Thread Tim Graham
Here's a ticket that was closed as wontfix. If you want it reconsidered, you should explain why you the think the arguments there aren't valid. https://code.djangoproject.com/ticket/19251 On Monday, November 12, 2018 at 9:58:39 AM UTC-5, Jakub Kleň wrote: > > I'm thinking if it wouldn't be nice i

Re: normalizing newlines in form fields

2018-11-12 Thread Jakub Kleň
Reason: Having consistent data representation in the database is nice, and maybe also useful in some use-cases, e.g. using the data to train a deep learning model. This tweak seems it could only help, and shouldn't break anything. If, for some reason a developer needs to use \r\n for display, he

Re: normalizing newlines in form fields

2018-11-12 Thread Jakub Kleň
Regarding the link you sent, I also think that the current behaviour is inconsistent. I'm now not sure if we should go with \n, or \r\n, but I think we definitely should normalize this. If you are writing to files on windows, all your browsers would send \r\n over post, so the files would be ge

Re: Simplify authentication backend interface

2018-11-12 Thread Collin Anderson
> Add default implementations for get_all_permissions() and has_perm(), either in PermissionMixin or in a new BaseBackend class. On a first glance, I think that makes sense to me. > Also note that the separation between user and group permissions may not be applicable with custom backends. That al

Re: Allow skipping CSRF check for Referer header

2018-11-12 Thread Collin Anderson
Aas a data point, I've customized my csrf checking to skip the referrer checking if there's a correct origin header. Though yes, it doesn't work in some browsers. (I haven't set up Referrer-Policy so that hasn't been an issue for me yet.) I think it's worth mentioning too that same-site cookies ar

Re: normalizing newlines in form fields

2018-11-12 Thread Collin Anderson
Maybe the newline character could be part of the setting, something like normalize_newlines_to='\n'. And then just do a normalize_newlines_to.join(value.splitlines()) could work. On Mon, Nov 12, 2018 at 10:49 AM Jakub Kleň wrote: > Regarding the link you sent, I also think that the current behav

Re: normalizing newlines in form fields

2018-11-12 Thread Jakub Kleň
>From what I have read so far, it would be probably better to normalize to '\r\n'. On Monday, November 12, 2018 at 3:58:39 PM UTC+1, Jakub Kleň wrote: > > I'm thinking if it wouldn't be nice if django automatically normalized > newlines of data entered by the user. The implementation would be re

Django Courier Management System Project

2018-11-12 Thread sakkhar saha
Dear All, I am Sakkhar form Bangladesh. Now I have a project idea. And i am a single man. My Project is Courier Management in Djnago. Please help for the idea. How i start my project. And How i Design my database table. My Project Feature. 1. User Can Add Your Order and Track his order. 2. A