Re: rest API create a signed_cookies including my token

2018-12-17 Thread Andréas Kühne
Hi, I wouldn't use session based backends at all - because then you will need to do session based login instead of using the token. This is not a standard way of doing rest requests at least. What I would do is just save the token in localstorage on the client. This is the way we do it for handli

Re: rest API create a signed_cookies including my token

2018-12-17 Thread cyril moreau
Hi, I thought also about storing the token in the local storage, but according to my research it is not safe because it is open to xss attack and the token will be accessible from any browser's tab using javascript. Is localstorage widely used to store the token even if it is not safe ? That i

Re: Trouble With Tutorial #1 - NameError: name 'polls' is not defined

2018-12-17 Thread Daniel Hepper
Check out this repository: https://github.com/consideratecode/django-tutorial-step-by-step It's not updated for Django 2.1 yet, but the differences should not matter in your case. Hope that helps, Daniel On Sun, Dec 16, 2018 at 8:18 PM Sarthak Khandelwal wrote: > can you send your file structu

Re: Password reset from address

2018-12-17 Thread Larry Martell
Thanks for the reply, Andréas, but I just found this in the docs, which I had missed before: https://docs.djangoproject.com/en/2.1/ref/settings/#std:setting-DEFAULT_FROM_EMAIL On Fri, Dec 14, 2018 at 3:51 PM Andréas Kühne wrote: > > Hi, > > Check the views for password reset in the django.contri

Re: rest API create a signed_cookies including my token

2018-12-17 Thread Andréas Kühne
The only way to get the localstorage is if you get malicious code on your own page. The localstorage is specific for your site - it even is different if you have http and https for the same site. The way it could be exploited would be if you include js on your site (some third party thing) that sc

Re: Password reset from address

2018-12-17 Thread Andréas Kühne
Hi, Yes - but that sets the from email on ALL emails that don't specifically define any other - if that's what you are after - that would work :-) Regards, Andréas Den mån 17 dec. 2018 kl 16:28 skrev Larry Martell : > Thanks for the reply, Andréas, but I just found this in the docs, > which I

Enterprise web application with admin interface

2018-12-17 Thread Mario Daniel Carugno
Hi everyone ! My question is simple: *Is possible (or good) to build an enterprise web application using only > the admin interface ?* I've heard that the admin interface is very customizable/extensible, so it sounds like a great idea. Thanks ! -- You received this message because you are

Error of channels

2018-12-17 Thread cn . lujianxin
I had an error while build a chatroom useing django-channels: I tried follow the official website: https://channels.readthedocs.io but while i build a room to chat with many people, an error occered: Exception inside application: Reader at end of file File "/home/lujianxin/VirtualEnvs/demo/li

Re: No query results on heroku, but working on local development server

2018-12-17 Thread Ketan Varia
Hi Mathew, I am still learner of django but I had faced similar issue while deploying my code to heroku. I followed below steps. - local server installed postgres database and updated settings.py - taken local backup of database pg_dump -U postgres --no-owner --no-acl -f ** - Deploy

Attribute Error: 'None Type' object has no attribute 'split'

2018-12-17 Thread Richard Balwane
Using reverse to shortcut URLs, addressing compatibilities of sorts although am running the following; dj-database-url==0.5.0 Django==2.1.4 django-crispy-forms==1.7.2 gunicorn==19.9.0 mysqlclient==1.3.14 Pillow==5.3.0 psycopg2==2.7.6.1 pytz==2018.7 My problem is that now my "detail" isn't

Re: Trouble With Tutorial #1 - NameError: name 'polls' is not defined

2018-12-17 Thread BALA KRISHNAN
you can change this url from your app from django.conf.urls import include, url from django.contrib import admin from django.views.generic import TemplateView from rest_framework import routers from user_profile.views import UserViewSet router = routers.DefaultRouter() router.register(r'user', U

Re: Error of channels

2018-12-17 Thread Andrew Godwin
I've seen a lot of people have a similar error but I'm never sure what causes it - that said, I generally advise them to check their Redis logs to see if Redis is OK, as that could cause this? Andrew On Mon, Dec 17, 2018 at 11:36 AM wrote: > I had an error while build a chatroom useing django-c

Re: Trouble With Tutorial #1 - NameError: name 'polls' is not defined

2018-12-17 Thread Aakash Choudhary
Share the code I'll debug the error On Mon, 17 Dec 2018, 00:47 Sarthak Khandelwal can you send your file structure after this step? > I am having a similar problem, after adding views to url according to the > tutorial in the documentation, when I was trying to run the server i was > having a sim

Re: rest API create a signed_cookies including my token

2018-12-17 Thread cyril moreau
I have read different posts or article that warn people about storing session data in the local storage. OWASP or http://cryto.net/~joepie91/blog/2016/06/13/stop-using-jwt-for-sessions/ That is why i would like to create a session coo

how to use sessionauthentication with a custom Model user and define _auth_user_id

2018-12-17 Thread cyril moreau
Hi, I am trying to use the sessionauthentication with a custom user Model but it fails and i dont know why. My custom Model is :user/user.py from django.db import models from django.core.mail import send_mail from django.contrib.auth.models import PermissionsMixin from django.contrib.auth.base_us

Django on IIS

2018-12-17 Thread Larry Martell
Anyone have any experience setting up a Django app to work with IIS? I have inherited what I was told is a working system, but it's not working. Before I post details of my issues and questions I wanted to see if anyone here has successfully got a Django app to run with IIS. -- You received this

Re: Django on IIS

2018-12-17 Thread Alex Heyden
I have recently, and it was equal parts misery and pain. FastCGI via wfastcgi, as outlined at http://blog.mattwoodward.com/2016/07/running-django-application-on-windows.html I also had to downgrade from Python 3.7 to Python 3.6 I wouldn't really consider myself an expert on the subject. All I can

Re: Django on IIS

2018-12-17 Thread Mike Dewhirst
On 18/12/2018 2:16 PM, Alex Heyden wrote: I have recently, and it was equal parts misery and pain. FastCGI via wfastcgi, as outlined at http://blog.mattwoodward.com/2016/07/running-django-application-on-windows.html I also had to downgrade from Python 3.7 to Python 3.6 I wouldn't really consi