These are chat archives for django/django

28th
Dec 2017
Paul A. Aranguren
@Paulguren
Dec 28 2017 02:51
hey I’ve been getting this random error
whenever i try to start my server, have you guys seen it?
(env) Pauls-MacBook-Pro:stomp_cont Paul$ python manage.py runserver
  File "manage.py", line 14
    ) from exc
         ^
SyntaxError: invalid syntax
Django2.0
mohammadreza
@ultra2mh
Dec 28 2017 11:19
@Paulguren i think you are using python 2
guys i m using django rest framework with jwt auth . by a login form in angular 4 im sending my login information with POST to http://localhost:8000/rest-auth/login/ and i will get token and user object .. so far its good. but now how should i redirect user to dashboard ? should i write a class and check token on django(backend ) ? or instantly redirect user to a component (dashboard) in angular section ? generally
how should i continue?
Marios Panagopoulos
@MariosPanag
Dec 28 2017 17:04
can someone tell me what's the regex URLValidator uses so i can do the same validation in the frontend ?
Salar Rahmanian
@softinio
Dec 28 2017 17:18
is this gitter channel an official django channel? or is iRC still the main one?
Roel
@roelzkie15
Dec 28 2017 23:28
@ultra2mh you should redirect in angular using Router navigateByUrl('some-url') method after you have successfully get your token from request but dont forget to store your token on cookies you will need this more further for the next requests