case-insensitive username

2017-11-19 Thread Mike Dewhirst
I have seen the two tickets and read the developer list thread[1]on this subject. Is there a best-practice approach to preventing usernames which are case-insensitively equivalent I'm hoping someone has achieved this and might be willing to share. My common.User inherits auth.models.AbstractUs

Re: How do I customize a user registration form so it only requires email and password fields?

2017-11-19 Thread 'Amitesh Sahay' via Django users
Hello Tom,  Django comes inbuilt with user authentication functions which is almost more than enough in most of the requirements.In your case, you just need to import User model in models.py and in views.py under "if" statement just return HttpResponse. You dont need to write anything else. For

How do I customize a user registration form so it only requires email and password fields?

2017-11-19 Thread Tom Tanner
I'm following this [tutorial](https://simpleisbetterthancomplex.com/tutorial/2017/02/18/how-to-create-user-sign-up-view.html) on making simple registration forms in Django. I'd like to make a user registration form that requires only two fields: "Email" and "Password." No second password field

Re: Would it be feasible or an overkill to use channels for real time notification in a Django application.

2017-11-19 Thread Andrew Godwin
You can indeed use Channels as the backbone of a notifications system using WebSockets, but you'll need to overlay your own state logic on top (notably, "what has already been sent to the client?") You can also in theory use Channels 1 to do long-polling, but this is likely going to make a lot more

Re: How to Speed up Loading the First Page of Django Project?

2017-11-19 Thread flora . xiaoyun . huang
Hi, The worker id and hit id are passed via GET. (It's a website for amazon mechanical turker to finish tasks.) And views.py checked their worker id and hit id to see whether they are valid. If they're valid, then the turker will be directed to the following pages. On Sunday, November 19, 2017

Re: Limit a view to superuser only

2017-11-19 Thread yingi keme
All of a sudden and out of the blue, it just worked. I had the re-run my server On Sunday, November 19, 2017 at 5:54:11 AM UTC-8, Jani Tiainen wrote: > > Hi. > > Could you paste the full traceback here because having an OSError sounds > like there is is something else wrong in your system. > > O

Re: Limit a view to superuser only

2017-11-19 Thread Jani Tiainen
Hi. Could you paste the full traceback here because having an OSError sounds like there is is something else wrong in your system. > On 19 Nov 2017, at 15.22, yingi keme wrote: > > I have a function that i want to be accessed only if the user is a supersuser. > > I have tried this > > from d

Would it be feasible or an overkill to use channels for real time notification in a Django application.

2017-11-19 Thread Rajesh Yogeshwar
I have a SAAS application built using django. I want to now add real time notifications to my application. Everywhere I have looked one of the top suggestions is to use channels. But what I would like get to know is - Would it be an overkill to use channels only for notifications purpose?

Limit a view to superuser only

2017-11-19 Thread yingi keme
I have a function that i want to be accessed only if the user is a supersuser. I have tried this from django.contrib.admin.views.decorators import staff_member_required @staff_member_required def my_view(request): template_name = 'Core\CustomizedAdmin.html' return render(request, templa

Re: How to Speed up Loading the First Page of Django Project?

2017-11-19 Thread Antonis Christofides
Hello, How does the verification work? Regards, Antonis Antonis Christofides http://djangodeployment.com On 2017-11-19 02:38, flora.xiaoyun.hu...@gmail.com wrote: > Thank you for your reply. The first page always loads slowly while the rest of > the pages loads at a normal speed. Whether I res

Re: Django field model for HTML parser?

2017-11-19 Thread Antonis Christofides
Hello, First of all: If you are just starting to learn, and because the amount you have to learn can be overwhelming, I'd suggest to not care about the wysiwyg editor at this stage. Pretend that your users can enter HTML in the field, and do all the rest. After you get some understanding of static