Upgrading django from 1.8 to 2.2.0

2020-01-31 Thread Santhosh sridhar
Hi, 
Im upgrading my django project from 1.8 to 2.2.0. I have done the below 
changes.

1. Added on_delete to all the Foreign Key fields
2. Changed the url reverse import as from django.urls import reverse
3. Included path/re_path instead of url in all the app's url files.
4. Changed the MIDDLEWARE_CLASSES import in settings files to MIDDLEWARE = 
{}

I tried to run the server, still it says "TypeError: __init__() missing 1 
required positional argument: 'on_delete' and it is pointing 
to /usr2/santhosh/myproject/myapp/migrations/0002_abc.py

What should I do now? Do I need to delete all the migration files and 
re-run python manage.py migrate or what?? Help me you are aware.

Regards,
Santhosh

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b907f25b-ffd3-462b-b3e9-5d87a20dd942%40googlegroups.com.


Re: Upgrading django from 1.8 to 2.2.0

2020-01-31 Thread Mike Dewhirst

On 31/01/2020 9:53 pm, Santhosh sridhar wrote:

Hi,
Im upgrading my django project from 1.8 to 2.2.0. I have done the 
below changes.


1. Added on_delete to all the Foreign Key fields
2. Changed the url reverse import as from django.urls import reverse
3. Included path/re_path instead of url in all the app's url files.
4. Changed the MIDDLEWARE_CLASSES import in settings files to 
MIDDLEWARE = {}


I tried to run the server, still it says "TypeError: __init__() 
missing 1 required positional argument: 'on_delete' and it is pointing 
to /usr2/santhosh/myproject/myapp/migrations/0002_abc.py


There is nothing stopping you from adding the same arg to teh migration 
file as you added to the model field concerned.


I frequently go back and edit migration files when all that's changed 
for example is some help_text. I prefer to keep the number of migration 
files as low as reasonable.






What should I do now? Do I need to delete all the migration files and 
re-run python manage.py migrate or what?? Help me you are aware.


Regards,
Santhosh
--
You received this message because you are subscribed to the Google 
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-users+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b907f25b-ffd3-462b-b3e9-5d87a20dd942%40googlegroups.com 
.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ecb841e6-e50a-1ce4-0c75-cb040a71ca06%40dewhirst.com.au.


Re: Can't find image files

2020-01-31 Thread Dick Arnold
Didn't stay working for long.  Needed one more change.

the src also needs the application folder before the image file name.

  (contacts is 
the name of my applications folder.)

On Monday, January 27, 2020 at 6:52:06 PM UTC-6, Dick Arnold wrote:
>
> My nice, new Django application is going along fairly well,  although I 
> have run into a couple of roadblocks and need some help. The first problem 
> is my HTML  statement:
>
> 
>
> Here's the error message I get on my terminal (command prompt) window:
>
> Not Found: /GAW.jpg
> [25/Jan/2020 11:51:50] "GET /GAW.jpg HTTP/1.1" 404 3481
>
> I read every thing I could find and most of them tell me that it is in a 
> location relative to the "current folder", but I can find nothing that 
> explains what is meant  by "current".  I thought it might be where my 
> terminal prompt comes from.   It's in the highest level project folder. 
> Tried that and still no luck.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/dba6d177-fea4-490c-9b73-7da3a62cbd3d%40googlegroups.com.


Re: How to best secure environment variables (secret key, passwords etc.) stored in .yml files?

2020-01-31 Thread Bill Torcaso

A couple of years ago I posted on this topic to say that using ENV 
variables is dangerously subject to human error.  If it ever happens that 
(1) you put a server on the public internet with DEBUG on, and (2) a 
visitor can provoke a 5xx server error response, then all of your secrets 
will be dumped in the stack-trace output.

(Yes, I know people will say "don't do that" regarding point #1, and 
similarly say "never publish code with a possible 500 error event".  But if 
it ever happens, you are screwed.  And you won't necessarily know that it 
happened.)

In general, if your secrets are kept in plaintext in your github repository 
and your repository gets compromised, then you have lost everything.

I've tried to think of a way to store the secrets in a plaintext file and 
encrypt the file's contents before committing the ciphertext file to the 
repository.  The question, as always, is where to store they key for 
decrypting the secrets file.

I have an idea in which the encryption key is manufactured on the fly from 
some non-obvious fact about the repository contents.  I'd like to get 
feedback from the Django community about it.

Summary:

   - Put all secret info in a text file, but encrypt the file before it 
   gets committed into the repository.
   
   - *Use an encryption key that is derived from some fact about the files 
   in the repository.*
   
   - At runtime, use that same fact to derive the decryption key for the 
   secrets file.
   
   - Ensure that the runtime server can never reveal the fact that is the 
   basis of the encryption key.


Suppose for example that the encryption key is the SHA-1 hash value of 
urls.py.  This is calculated during the release process, and used to 
encrypt the plaintext secrets file.  Then the encrypted secrets file is 
committed to the repository, and ultimately gets deployed to production.

urls.py obviously changes over time.  But it is constant for any given 
commit of the entire codebase, which is what gets deployed. 

At start-up time, the Django server can open urls.py and hash the contents, 
and use that hash value to decrypt the contents of the secrets file.  As a 
result, the secrets are available at runtime, but they are never stored in 
a plaintext file.

Why is this secure?  It relies on two assumptions.

   1. Ensure that the contents of urls.py will never be published as part 
   of an HTTPResponse.
   
   When this is true, the runtime server cannot reveal the decryption key 
   for the encrypted secrets file.  That is to say, do not write a management 
   command with name "getthesecretdecryptionkey".
   
   2. Using security-through-obscurity, do not always use the same file 
   (urls.py) as the basis of the hash value.  Instead, use some obscure 
   selection criteria like "the seventh-largest .PY source file in the tree; 
   in case of a tie, use the alphabetically last file".
   
   Similarly, do not always use the same hash method; instead, select a 
   hash method from a list like [ "SHA-1, SHA-256, "MD5", ] by taking the size 
   of urls.py modulo the length of that list.

I look forward to hearing comments about this approach.

Bill Torcaso

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/91ae856c-8408-44c6-893d-12e1189a418d%40googlegroups.com.


Re: How to best secure environment variables (secret key, passwords etc.) stored in .yml files?

2020-01-31 Thread Mike Dewhirst

On 1/02/2020 2:24 am, Bill Torcaso wrote:


A couple of years ago I posted on this topic to say that using ENV 
variables is dangerously subject to human error.  If it ever happens 
that (1) you put a server on the public internet with DEBUG on, and 
(2) a visitor can provoke a 5xx server error response, then all of 
your secrets will be dumped in the stack-trace output.


(Yes, I know people will say "don't do that" regarding point #1, and 
similarly say "never publish code with a possible 500 error event".  
But if it ever happens, you are screwed.  And you won't necessarily 
know that it happened.)


In general, if your secrets are kept in plaintext in your github 
repository and your repository gets compromised, then you have lost 
everything.


I agree with all that. I hadn't considered the DEBUG gotcha but now you 
mention it nothing is more certain. If it can go wrong it will. Don't 
know whose law that is but I respect it. I always look at the worst case 
and assume it will happen.


Please correct me if my assumptions are wrong but if the server itself 
is compromised it doesn't matter about the secrets.


If I have access to the machine I could examine the code and find the 
api which decrypts secrets and then write a script to fetch and decrypt 
any secret. But why would I bother if I have already pwned the machine?


A real problem is spreading secrets around a multi-person dev team and 
needing to change them all whenever a team member leaves.


Keeping them in editable text files in a standardised location for each 
project lets the secrets be kept and easily updated by the minimum 
number of people. Developers obviously know the standard location but 
might require sudo to see them. That would be fine on their own machines 
where their secrets can be mostly different than server secrets.


The layout of each secret in its own file named appropriately (eg., 
django_secret_staging.txt, django_secret_dev.txt, django_secret_prd.txt 
etc) would permit the server software to retrieve the secret when 
required using a simple method which works on all machines. I call mine 
get_creds() and that lets me have different secrets between staging and 
production. Compromising one machine doesn't undermine the other.


I think you are on the right track by keeping secrets in text files. I 
just think encrypting them is a step too far.


Cheers

Mike



I've tried to think of a way to store the secrets in a plaintext file 
and encrypt the file's contents before committing the ciphertext file 
to the repository.  The question, as always, is where to store they 
key for decrypting the secrets file.


I have an idea in which the encryption key is manufactured on the fly 
from some non-obvious fact about the repository contents.  I'd like to 
get feedback from the Django community about it.


Summary:

  * Put all secret info in a text file, but encrypt the file before it
gets committed into the repository.

  * *Use an encryption key that is derived from some fact about the
files in the repository.*

  * At runtime, use that same fact to derive the decryption key for
the secrets file.

  * Ensure that the runtime server can never reveal the fact that is
the basis of the encryption key.


Suppose for example that the encryption key is the SHA-1 hash value of 
urls.py.  This is calculated during the release process, and used to 
encrypt the plaintext secrets file.  Then the encrypted secrets file 
is committed to the repository, and ultimately gets deployed to 
production.


urls.py obviously changes over time.  But it is constant for any given 
commit of the entire codebase, which is what gets deployed.


At start-up time, the Django server can open urls.py and hash the 
contents, and use that hash value to decrypt the contents of the 
secrets file.  As a result, the secrets are available at runtime, but 
they are never stored in a plaintext file.


Why is this secure?  It relies on two assumptions.

 1. Ensure that the contents of urls.py will never be published as
part of an HTTPResponse.

When this is true, the runtime server cannot reveal the decryption
key for the encrypted secrets file.  That is to say, do not write
a management command with name "getthesecretdecryptionkey".

 2. Using security-through-obscurity, do not always use the same file
(urls.py) as the basis of the hash value. Instead, use some
obscure selection criteria like "the seventh-largest .PY source
file in the tree; in case of a tie, use the alphabetically last file".

Similarly, do not always use the same hash method; instead, select
a hash method from a list like [ "SHA-1, SHA-256, "MD5", ] by
taking the size of urls.py modulo the length of that list.

I look forward to hearing comments about this approach.

Bill Torcaso
--
You received this message because you are subscribed to the Google 
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from

how h can use DICOM files through Django app?

2020-01-31 Thread Abdullah Shaker
i am tring to make a form through Django.
how can i use DICOM file ?
i have a form and i want to upload DICOM file but Django does not support 
file field in form 
so how can i use DICOM ?
is there is a way or library ?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f80368c1-face-4882-a643-17cef031c1c6%40googlegroups.com.


Re: Can't find image files

2020-01-31 Thread maninder singh Kumar
When you load files to static, it loads to a common static location.  That 
is the way you would want it to be.  Recommended read django docs.

regs

On Friday, January 31, 2020 at 8:39:23 PM UTC+5:30, Dick Arnold wrote:
>
> Didn't stay working for long.  Needed one more change.
>
> the src also needs the application folder before the image file name.
>
>   (contacts is 
> the name of my applications folder.)
>
> On Monday, January 27, 2020 at 6:52:06 PM UTC-6, Dick Arnold wrote:
>>
>> My nice, new Django application is going along fairly well,  although I 
>> have run into a couple of roadblocks and need some help. The first problem 
>> is my HTML > statement:
>>
>> 
>>
>> Here's the error message I get on my terminal (command prompt) window:
>>
>> Not Found: /GAW.jpg
>> [25/Jan/2020 11:51:50] "GET /GAW.jpg HTTP/1.1" 404 3481
>>
>> I read every thing I could find and most of them tell me that it is in a 
>> location relative to the "current folder", but I can find nothing that 
>> explains what is meant  by "current".  I thought it might be where my 
>> terminal prompt comes from.   It's in the highest level project folder. 
>> Tried that and still no luck.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/be0bb28b-b299-4897-a717-d843347ad7cf%40googlegroups.com.


Re: how h can use DICOM files through Django app?

2020-01-31 Thread Jorge Gimeno
Django forms do support file uploads.  The FileField form field
documentation is here:
https://docs.djangoproject.com/en/3.0/ref/forms/fields/#filefield

-Jorge

On Fri, Jan 31, 2020 at 5:35 PM Abdullah Shaker <
abdullah.shaker2...@gmail.com> wrote:

> i am tring to make a form through Django.
> how can i use DICOM file ?
> i have a form and i want to upload DICOM file but Django does not support
> file field in form
> so how can i use DICOM ?
> is there is a way or library ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f80368c1-face-4882-a643-17cef031c1c6%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANfN%3DK_%3DWZSn%2B_nkAd4ewC8iiGv2YUY12Opt-O6asR4t1hO73g%40mail.gmail.com.


Re: Big Problem After Going Live: NoReverseMatch at /login/ Reverse for 'password_reset' not found. 'password_reset' is not a valid view function or pattern name

2020-01-31 Thread Dave Ko
 I also have some trouble with using signal, which works perfectly fine on 
localhost but not deployed


On Saturday, February 1, 2020 at 12:20:29 PM UTC+8, jlgimeno71 wrote:
>
>
> On Fri, Jan 31, 2020 at 5:35 PM Dave Ko > 
> wrote:
>
>> Hi everyone,
>>
>> I am pretty new to django programming, I was following a tutorial and try 
>> to set up a blog, 
>> everything seems to fine on my localhost machine, but after deployment 
>> and fixing some bugs,
>> I run into a problem which I have no idea what to do even with hours of 
>> search on stackoverflow.
>>
>> So, here is my problem, I have made a login page, register page. 
>> After deployment there is not other users besides admin,
>> but after register, when i try to login, it goes to error page you can 
>> see over here roasitas.com/login/ 
>>
>> [image: Screenshot 2020-02-01 at 9.27.48 AM.png]
>>
>> here is my urls.py 
>>
>> I really want finish this blog and keep building it please help me out, 
>> thanks in advance!
>>
>>
>> from django.conf.urls.static import static
>> from rest_framework import routers, serializers, viewsets
>> from users import views as users_view 
>> from django.contrib.auth import views as auth_views
>> from news import views as news_views
>> from news.models import Writer, News
>> from news.serializers import UserSerializer, NewsSerializer
>>
>> urlpatterns = [
>>path('',include('news.urls', namespace="news")),
>>path('admin/', admin.site.urls),
>>path('register/', users_view.register, name='register'),
>>path('profile/', users_view.profile, name='profile'),
>>path('login/', auth_views.LoginView.as_view(template_name=
>> 'users/login.html'), name='login'),
>>path('logout/', auth_views.LogoutView.as_view(template_name=
>> 'users/logout.html'), name='logout'),
>>path('password-reset/',
>> auth_views.PasswordResetView.as_view(
>>template_name='users/password_reset.html',
>>subject_template_name='users/password_reset_subject.txt',
>>success_url=reverse_lazy('users:password_reset_done')
>> ),
>> name='password_reset'),
>>
>> path('password-reset/done/',
>> auth_views.PasswordResetDoneView.as_view(
>> template_name='users/password_reset_done.html'
>> ),
>> name='password_reset_done'),
>>
>> path('password-reset-confirm///',
>>auth_views.PasswordResetConfirmView.as_view(
>>template_name='users/password_reset_confirm.html'
>>),
>>name='password_reset_confirm'),
>>
>>  path('password-reset-complete/',
>> auth_views.PasswordResetCompleteView.as_view(
>> template_name='users/password_reset_complete.html'
>> ),
>> name='password_reset_complete'),
>>
>> path('api/', include(router.urls)),
>>path('api-auth/', include('rest_framework.urls', namespace=
>> 'rest_framework')),
>>path('/tinymce/', include('tinymce.urls')),
>>
>> ] 
>>
>> if settings.DEBUG:
>>urlpatterns += static(settings.MEDIA_URL, document_root=settings.
>> MEDIA_ROOT)
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/561c6b97-6428-4af2-a1dc-09af93387b77%40googlegroups.com
>>  
>> 
>> .
>>
>
> I attempted to create an account and log in, and it worked for me! Your 
> urls don't have a path to password_reset in the url.  That's the usual 
> culprit for that exception to be raised.
>
> -Jorge
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/697c8672-d832-4899-998e-f6d4d6eb8779%40googlegroups.com.


Re: Big Problem After Going Live: NoReverseMatch at /login/ Reverse for 'password_reset' not found. 'password_reset' is not a valid view function or pattern name

2020-01-31 Thread Jorge Gimeno
On Fri, Jan 31, 2020 at 8:33 PM Dave Ko  wrote:

>  I also have some trouble with using signal, which works perfectly fine on
> localhost but not deployed
>
>
> On Saturday, February 1, 2020 at 12:20:29 PM UTC+8, jlgimeno71 wrote:
>>
>>
>> On Fri, Jan 31, 2020 at 5:35 PM Dave Ko  wrote:
>>
>>> Hi everyone,
>>>
>>> I am pretty new to django programming, I was following a tutorial and
>>> try to set up a blog,
>>> everything seems to fine on my localhost machine, but after deployment
>>> and fixing some bugs,
>>> I run into a problem which I have no idea what to do even with hours of
>>> search on stackoverflow.
>>>
>>> So, here is my problem, I have made a login page, register page.
>>> After deployment there is not other users besides admin,
>>> but after register, when i try to login, it goes to error page you can
>>> see over here roasitas.com/login/
>>>
>>> [image: Screenshot 2020-02-01 at 9.27.48 AM.png]
>>>
>>> here is my urls.py
>>>
>>> I really want finish this blog and keep building it please help me out,
>>> thanks in advance!
>>>
>>>
>>> from django.conf.urls.static import static
>>> from rest_framework import routers, serializers, viewsets
>>> from users import views as users_view
>>> from django.contrib.auth import views as auth_views
>>> from news import views as news_views
>>> from news.models import Writer, News
>>> from news.serializers import UserSerializer, NewsSerializer
>>>
>>> urlpatterns = [
>>>path('',include('news.urls', namespace="news")),
>>>path('admin/', admin.site.urls),
>>>path('register/', users_view.register, name='register'),
>>>path('profile/', users_view.profile, name='profile'),
>>>path('login/', auth_views.LoginView.as_view(template_name=
>>> 'users/login.html'), name='login'),
>>>path('logout/', auth_views.LogoutView.as_view(template_name=
>>> 'users/logout.html'), name='logout'),
>>>path('password-reset/',
>>> auth_views.PasswordResetView.as_view(
>>>template_name='users/password_reset.html',
>>>subject_template_name='users/password_reset_subject.txt',
>>>success_url=reverse_lazy('users:password_reset_done')
>>> ),
>>> name='password_reset'),
>>>
>>> path('password-reset/done/',
>>> auth_views.PasswordResetDoneView.as_view(
>>> template_name='users/password_reset_done.html'
>>> ),
>>> name='password_reset_done'),
>>>
>>> path('password-reset-confirm///',
>>>auth_views.PasswordResetConfirmView.as_view(
>>>template_name='users/password_reset_confirm.html'
>>>),
>>>name='password_reset_confirm'),
>>>
>>>  path('password-reset-complete/',
>>> auth_views.PasswordResetCompleteView.as_view(
>>> template_name='users/password_reset_complete.html'
>>> ),
>>> name='password_reset_complete'),
>>>
>>> path('api/', include(router.urls)),
>>>path('api-auth/', include('rest_framework.urls', namespace=
>>> 'rest_framework')),
>>>path('/tinymce/', include('tinymce.urls')),
>>>
>>> ]
>>>
>>> if settings.DEBUG:
>>>urlpatterns += static(settings.MEDIA_URL, document_root=settings.
>>> MEDIA_ROOT)
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/561c6b97-6428-4af2-a1dc-09af93387b77%40googlegroups.com
>>> 
>>> .
>>>
>>
>> I attempted to create an account and log in, and it worked for me! Your
>> urls don't have a path to password_reset in the url.  That's the usual
>> culprit for that exception to be raised.
>>
>> -Jorge
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/697c8672-d832-4899-998e-f6d4d6eb8779%40googlegroups.com
> 
> .
>

By chance did you set LOGIN_REDIRECT_URL in settings.py?

-Jorge

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANfN%3DK9sWK%3D5jAd8eh5n0r7eRP%2BzFMG-RKxcZPUOONyKzE4e8g%40mail.gmail.com.


Re: Big Problem After Going Live: NoReverseMatch at /login/ Reverse for 'password_reset' not found. 'password_reset' is not a valid view function or pattern name

2020-01-31 Thread Dave Ko

LOGIN_REDIRECT_URL = 'news:all_news'

On Saturday, February 1, 2020 at 12:20:29 PM UTC+8, jlgimeno71 wrote:
>
>
> On Fri, Jan 31, 2020 at 5:35 PM Dave Ko > 
> wrote:
>
>> Hi everyone,
>>
>> I am pretty new to django programming, I was following a tutorial and try 
>> to set up a blog, 
>> everything seems to fine on my localhost machine, but after deployment 
>> and fixing some bugs,
>> I run into a problem which I have no idea what to do even with hours of 
>> search on stackoverflow.
>>
>> So, here is my problem, I have made a login page, register page. 
>> After deployment there is not other users besides admin,
>> but after register, when i try to login, it goes to error page you can 
>> see over here roasitas.com/login/ 
>>
>> [image: Screenshot 2020-02-01 at 9.27.48 AM.png]
>>
>> here is my urls.py 
>>
>> I really want finish this blog and keep building it please help me out, 
>> thanks in advance!
>>
>>
>> from django.conf.urls.static import static
>> from rest_framework import routers, serializers, viewsets
>> from users import views as users_view 
>> from django.contrib.auth import views as auth_views
>> from news import views as news_views
>> from news.models import Writer, News
>> from news.serializers import UserSerializer, NewsSerializer
>>
>> urlpatterns = [
>>path('',include('news.urls', namespace="news")),
>>path('admin/', admin.site.urls),
>>path('register/', users_view.register, name='register'),
>>path('profile/', users_view.profile, name='profile'),
>>path('login/', auth_views.LoginView.as_view(template_name=
>> 'users/login.html'), name='login'),
>>path('logout/', auth_views.LogoutView.as_view(template_name=
>> 'users/logout.html'), name='logout'),
>>path('password-reset/',
>> auth_views.PasswordResetView.as_view(
>>template_name='users/password_reset.html',
>>subject_template_name='users/password_reset_subject.txt',
>>success_url=reverse_lazy('users:password_reset_done')
>> ),
>> name='password_reset'),
>>
>> path('password-reset/done/',
>> auth_views.PasswordResetDoneView.as_view(
>> template_name='users/password_reset_done.html'
>> ),
>> name='password_reset_done'),
>>
>> path('password-reset-confirm///',
>>auth_views.PasswordResetConfirmView.as_view(
>>template_name='users/password_reset_confirm.html'
>>),
>>name='password_reset_confirm'),
>>
>>  path('password-reset-complete/',
>> auth_views.PasswordResetCompleteView.as_view(
>> template_name='users/password_reset_complete.html'
>> ),
>> name='password_reset_complete'),
>>
>> path('api/', include(router.urls)),
>>path('api-auth/', include('rest_framework.urls', namespace=
>> 'rest_framework')),
>>path('/tinymce/', include('tinymce.urls')),
>>
>> ] 
>>
>> if settings.DEBUG:
>>urlpatterns += static(settings.MEDIA_URL, document_root=settings.
>> MEDIA_ROOT)
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/561c6b97-6428-4af2-a1dc-09af93387b77%40googlegroups.com
>>  
>> 
>> .
>>
>
> I attempted to create an account and log in, and it worked for me! Your 
> urls don't have a path to password_reset in the url.  That's the usual 
> culprit for that exception to be raised.
>
> -Jorge
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/87f16c5e-e9f4-48dc-9afe-ae6f25dc87a8%40googlegroups.com.


Re: Big Problem After Going Live: NoReverseMatch at /login/ Reverse for 'password_reset' not found. 'password_reset' is not a valid view function or pattern name

2020-01-31 Thread Dave Ko

LOGIN_REDIRECT_URL = 'news:all_news'


all_news is the first page of the website 

On Saturday, February 1, 2020 at 1:16:53 PM UTC+8, jlgimeno71 wrote:
>
>
>
> On Fri, Jan 31, 2020 at 8:33 PM Dave Ko > 
> wrote:
>
>>  I also have some trouble with using signal, which works perfectly fine 
>> on localhost but not deployed
>>
>>
>> On Saturday, February 1, 2020 at 12:20:29 PM UTC+8, jlgimeno71 wrote:
>>>
>>>
>>> On Fri, Jan 31, 2020 at 5:35 PM Dave Ko  wrote:
>>>
 Hi everyone,

 I am pretty new to django programming, I was following a tutorial and 
 try to set up a blog, 
 everything seems to fine on my localhost machine, but after deployment 
 and fixing some bugs,
 I run into a problem which I have no idea what to do even with hours of 
 search on stackoverflow.

 So, here is my problem, I have made a login page, register page. 
 After deployment there is not other users besides admin,
 but after register, when i try to login, it goes to error page you can 
 see over here roasitas.com/login/ 

 [image: Screenshot 2020-02-01 at 9.27.48 AM.png]

 here is my urls.py 

 I really want finish this blog and keep building it please help me out, 
 thanks in advance!


 from django.conf.urls.static import static
 from rest_framework import routers, serializers, viewsets
 from users import views as users_view 
 from django.contrib.auth import views as auth_views
 from news import views as news_views
 from news.models import Writer, News
 from news.serializers import UserSerializer, NewsSerializer

 urlpatterns = [
path('',include('news.urls', namespace="news")),
path('admin/', admin.site.urls),
path('register/', users_view.register, name='register'),
path('profile/', users_view.profile, name='profile'),
path('login/', auth_views.LoginView.as_view(template_name=
 'users/login.html'), name='login'),
path('logout/', auth_views.LogoutView.as_view(template_name=
 'users/logout.html'), name='logout'),
path('password-reset/',
 auth_views.PasswordResetView.as_view(
template_name='users/password_reset.html',
subject_template_name='users/password_reset_subject.txt',
success_url=reverse_lazy('users:password_reset_done')
 ),
 name='password_reset'),

 path('password-reset/done/',
 auth_views.PasswordResetDoneView.as_view(
 template_name='users/password_reset_done.html'
 ),
 name='password_reset_done'),

 path('password-reset-confirm///',
auth_views.PasswordResetConfirmView.as_view(
template_name='users/password_reset_confirm.html'
),
name='password_reset_confirm'),

  path('password-reset-complete/',
 auth_views.PasswordResetCompleteView.as_view(
 template_name='users/password_reset_complete.html'
 ),
 name='password_reset_complete'),

 path('api/', include(router.urls)),
path('api-auth/', include('rest_framework.urls', namespace=
 'rest_framework')),
path('/tinymce/', include('tinymce.urls')),

 ] 

 if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.
 MEDIA_ROOT)


 -- 
 You received this message because you are subscribed to the Google 
 Groups "Django users" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to django...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/django-users/561c6b97-6428-4af2-a1dc-09af93387b77%40googlegroups.com
  
 
 .

>>>
>>> I attempted to create an account and log in, and it worked for me! Your 
>>> urls don't have a path to password_reset in the url.  That's the usual 
>>> culprit for that exception to be raised.
>>>
>>> -Jorge
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/697c8672-d832-4899-998e-f6d4d6eb8779%40googlegroups.com
>>  
>> 
>> .
>>
>
> By chance did you set LOGIN_REDIRECT_URL in settings.py?
>
> -Jorge
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails f

Re: Big Problem After Going Live: NoReverseMatch at /login/ Reverse for 'password_reset' not found. 'password_reset' is not a valid view function or pattern name

2020-01-31 Thread Jorge Gimeno
What I believe is going on is that Django is looking for the password reset
view at password_reset, and that url path doesn't exist anywhere in
urls.py.  I see a path named "password-reset", which won't match.

Let's try to rename that url conf to password_reset, and leave the rest
unchanged.  Does anything change?

-Jorge

On Fri, Jan 31, 2020 at 9:21 PM Dave Ko  wrote:

>
> LOGIN_REDIRECT_URL = 'news:all_news'
>
>
> all_news is the first page of the website
>
> On Saturday, February 1, 2020 at 1:16:53 PM UTC+8, jlgimeno71 wrote:
>>
>>
>>
>> On Fri, Jan 31, 2020 at 8:33 PM Dave Ko  wrote:
>>
>>>  I also have some trouble with using signal, which works perfectly fine
>>> on localhost but not deployed
>>>
>>>
>>> On Saturday, February 1, 2020 at 12:20:29 PM UTC+8, jlgimeno71 wrote:


 On Fri, Jan 31, 2020 at 5:35 PM Dave Ko  wrote:

> Hi everyone,
>
> I am pretty new to django programming, I was following a tutorial and
> try to set up a blog,
> everything seems to fine on my localhost machine, but after deployment
> and fixing some bugs,
> I run into a problem which I have no idea what to do even with hours
> of search on stackoverflow.
>
> So, here is my problem, I have made a login page, register page.
> After deployment there is not other users besides admin,
> but after register, when i try to login, it goes to error page you can
> see over here roasitas.com/login/
>
> [image: Screenshot 2020-02-01 at 9.27.48 AM.png]
>
> here is my urls.py
>
> I really want finish this blog and keep building it please help me
> out, thanks in advance!
>
>
> from django.conf.urls.static import static
> from rest_framework import routers, serializers, viewsets
> from users import views as users_view
> from django.contrib.auth import views as auth_views
> from news import views as news_views
> from news.models import Writer, News
> from news.serializers import UserSerializer, NewsSerializer
>
> urlpatterns = [
>path('',include('news.urls', namespace="news")),
>path('admin/', admin.site.urls),
>path('register/', users_view.register, name='register'),
>path('profile/', users_view.profile, name='profile'),
>path('login/', auth_views.LoginView.as_view(template_name=
> 'users/login.html'), name='login'),
>path('logout/', auth_views.LogoutView.as_view(template_name=
> 'users/logout.html'), name='logout'),
>path('password-reset/',
> auth_views.PasswordResetView.as_view(
>template_name='users/password_reset.html',
>subject_template_name='users/password_reset_subject.txt',
>success_url=reverse_lazy('users:password_reset_done')
> ),
> name='password_reset'),
>
> path('password-reset/done/',
> auth_views.PasswordResetDoneView.as_view(
> template_name='users/password_reset_done.html'
> ),
> name='password_reset_done'),
>
> path('password-reset-confirm///',
>auth_views.PasswordResetConfirmView.as_view(
>template_name='users/password_reset_confirm.html'
>),
>name='password_reset_confirm'),
>
>  path('password-reset-complete/',
> auth_views.PasswordResetCompleteView.as_view(
> template_name='users/password_reset_complete.html'
> ),
> name='password_reset_complete'),
>
> path('api/', include(router.urls)),
>path('api-auth/', include('rest_framework.urls', namespace=
> 'rest_framework')),
>path('/tinymce/', include('tinymce.urls')),
>
> ]
>
> if settings.DEBUG:
>urlpatterns += static(settings.MEDIA_URL, document_root=settings.
> MEDIA_ROOT)
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/561c6b97-6428-4af2-a1dc-09af93387b77%40googlegroups.com
> 
> .
>

 I attempted to create an account and log in, and it worked for me! Your
 urls don't have a path to password_reset in the url.  That's the usual
 culprit for that exception to be raised.

 -Jorge

>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/

Re: Big Problem After Going Live: NoReverseMatch at /login/ Reverse for 'password_reset' not found. 'password_reset' is not a valid view function or pattern name

2020-01-31 Thread Jorge Gimeno
I apologize to the list for posting all the emails to everyone.  I'll keep
this going off list.


-Jorge


On Fri, Jan 31, 2020 at 10:09 PM Jorge Gimeno  wrote:

> What I believe is going on is that Django is looking for the password
> reset view at password_reset, and that url path doesn't exist anywhere in
> urls.py.  I see a path named "password-reset", which won't match.
>
> Let's try to rename that url conf to password_reset, and leave the rest
> unchanged.  Does anything change?
>
> -Jorge
>
> On Fri, Jan 31, 2020 at 9:21 PM Dave Ko  wrote:
>
>>
>> LOGIN_REDIRECT_URL = 'news:all_news'
>>
>>
>> all_news is the first page of the website
>>
>> On Saturday, February 1, 2020 at 1:16:53 PM UTC+8, jlgimeno71 wrote:
>>>
>>>
>>>
>>> On Fri, Jan 31, 2020 at 8:33 PM Dave Ko  wrote:
>>>
  I also have some trouble with using signal, which works perfectly fine
 on localhost but not deployed


 On Saturday, February 1, 2020 at 12:20:29 PM UTC+8, jlgimeno71 wrote:
>
>
> On Fri, Jan 31, 2020 at 5:35 PM Dave Ko  wrote:
>
>> Hi everyone,
>>
>> I am pretty new to django programming, I was following a tutorial and
>> try to set up a blog,
>> everything seems to fine on my localhost machine, but after
>> deployment and fixing some bugs,
>> I run into a problem which I have no idea what to do even with hours
>> of search on stackoverflow.
>>
>> So, here is my problem, I have made a login page, register page.
>> After deployment there is not other users besides admin,
>> but after register, when i try to login, it goes to error page you
>> can see over here roasitas.com/login/
>>
>> [image: Screenshot 2020-02-01 at 9.27.48 AM.png]
>>
>> here is my urls.py
>>
>> I really want finish this blog and keep building it please help me
>> out, thanks in advance!
>>
>>
>> from django.conf.urls.static import static
>> from rest_framework import routers, serializers, viewsets
>> from users import views as users_view
>> from django.contrib.auth import views as auth_views
>> from news import views as news_views
>> from news.models import Writer, News
>> from news.serializers import UserSerializer, NewsSerializer
>>
>> urlpatterns = [
>>path('',include('news.urls', namespace="news")),
>>path('admin/', admin.site.urls),
>>path('register/', users_view.register, name='register'),
>>path('profile/', users_view.profile, name='profile'),
>>path('login/', auth_views.LoginView.as_view(template_name=
>> 'users/login.html'), name='login'),
>>path('logout/', auth_views.LogoutView.as_view(template_name=
>> 'users/logout.html'), name='logout'),
>>path('password-reset/',
>> auth_views.PasswordResetView.as_view(
>>template_name='users/password_reset.html',
>>subject_template_name='users/password_reset_subject.txt',
>>success_url=reverse_lazy('users:password_reset_done')
>> ),
>> name='password_reset'),
>>
>> path('password-reset/done/',
>> auth_views.PasswordResetDoneView.as_view(
>> template_name='users/password_reset_done.html'
>> ),
>> name='password_reset_done'),
>>
>> path('password-reset-confirm///',
>>auth_views.PasswordResetConfirmView.as_view(
>>template_name='users/password_reset_confirm.html'
>>),
>>name='password_reset_confirm'),
>>
>>  path('password-reset-complete/',
>> auth_views.PasswordResetCompleteView.as_view(
>> template_name='users/password_reset_complete.html'
>> ),
>> name='password_reset_complete'),
>>
>> path('api/', include(router.urls)),
>>path('api-auth/', include('rest_framework.urls', namespace=
>> 'rest_framework')),
>>path('/tinymce/', include('tinymce.urls')),
>>
>> ]
>>
>> if settings.DEBUG:
>>urlpatterns += static(settings.MEDIA_URL, document_root=settings.
>> MEDIA_ROOT)
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to django...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/561c6b97-6428-4af2-a1dc-09af93387b77%40googlegroups.com
>> 
>> .
>>
>
> I attempted to create an account and log in, and it worked for me!
> Your urls don't have a path to password_reset in the url.  That's the 
> usual
> culprit for that exception to be raised.
>
> -Jorge
>
 

Re: Big Problem After Going Live: NoReverseMatch at /login/ Reverse for 'password_reset' not found. 'password_reset' is not a valid view function or pattern name

2020-01-31 Thread Dave Ko


Hi Jorge, 
I have changed to it "password_reset" from "password-reset"  
But what i type www.roastias/password_reset/
it shows no url, but i have checked my folders so the 
templates/users/password_reset.html and reset of the password related urls 
in the folder
but not on the error page


On Saturday, February 1, 2020 at 2:10:01 PM UTC+8, jlgimeno71 wrote:
>
> What I believe is going on is that Django is looking for the password 
> reset view at password_reset, and that url path doesn't exist anywhere in 
> urls.py.  I see a path named "password-reset", which won't match.
>
> Let's try to rename that url conf to password_reset, and leave the rest 
> unchanged.  Does anything change?
>
> -Jorge
>
> On Fri, Jan 31, 2020 at 9:21 PM Dave Ko > 
> wrote:
>
>>
>> LOGIN_REDIRECT_URL = 'news:all_news'
>>
>>
>> all_news is the first page of the website 
>>
>> On Saturday, February 1, 2020 at 1:16:53 PM UTC+8, jlgimeno71 wrote:
>>>
>>>
>>>
>>> On Fri, Jan 31, 2020 at 8:33 PM Dave Ko  wrote:
>>>
  I also have some trouble with using signal, which works perfectly fine 
 on localhost but not deployed


 On Saturday, February 1, 2020 at 12:20:29 PM UTC+8, jlgimeno71 wrote:
>
>
> On Fri, Jan 31, 2020 at 5:35 PM Dave Ko  wrote:
>
>> Hi everyone,
>>
>> I am pretty new to django programming, I was following a tutorial and 
>> try to set up a blog, 
>> everything seems to fine on my localhost machine, but after 
>> deployment and fixing some bugs,
>> I run into a problem which I have no idea what to do even with hours 
>> of search on stackoverflow.
>>
>> So, here is my problem, I have made a login page, register page. 
>> After deployment there is not other users besides admin,
>> but after register, when i try to login, it goes to error page you 
>> can see over here roasitas.com/login/ 
>>
>> [image: Screenshot 2020-02-01 at 9.27.48 AM.png]
>>
>> here is my urls.py 
>>
>> I really want finish this blog and keep building it please help me 
>> out, thanks in advance!
>>
>>
>> from django.conf.urls.static import static
>> from rest_framework import routers, serializers, viewsets
>> from users import views as users_view 
>> from django.contrib.auth import views as auth_views
>> from news import views as news_views
>> from news.models import Writer, News
>> from news.serializers import UserSerializer, NewsSerializer
>>
>> urlpatterns = [
>>path('',include('news.urls', namespace="news")),
>>path('admin/', admin.site.urls),
>>path('register/', users_view.register, name='register'),
>>path('profile/', users_view.profile, name='profile'),
>>path('login/', auth_views.LoginView.as_view(template_name=
>> 'users/login.html'), name='login'),
>>path('logout/', auth_views.LogoutView.as_view(template_name=
>> 'users/logout.html'), name='logout'),
>>path('password-reset/',
>> auth_views.PasswordResetView.as_view(
>>template_name='users/password_reset.html',
>>subject_template_name='users/password_reset_subject.txt',
>>success_url=reverse_lazy('users:password_reset_done')
>> ),
>> name='password_reset'),
>>
>> path('password-reset/done/',
>> auth_views.PasswordResetDoneView.as_view(
>> template_name='users/password_reset_done.html'
>> ),
>> name='password_reset_done'),
>>
>> path('password-reset-confirm///',
>>auth_views.PasswordResetConfirmView.as_view(
>>template_name='users/password_reset_confirm.html'
>>),
>>name='password_reset_confirm'),
>>
>>  path('password-reset-complete/',
>> auth_views.PasswordResetCompleteView.as_view(
>> template_name='users/password_reset_complete.html'
>> ),
>> name='password_reset_complete'),
>>
>> path('api/', include(router.urls)),
>>path('api-auth/', include('rest_framework.urls', namespace=
>> 'rest_framework')),
>>path('/tinymce/', include('tinymce.urls')),
>>
>> ] 
>>
>> if settings.DEBUG:
>>urlpatterns += static(settings.MEDIA_URL, document_root=settings.
>> MEDIA_ROOT)
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google 
>> Groups "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, 
>> send an email to django...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/561c6b97-6428-4af2-a1dc-09af93387b77%40googlegroups.com
>>  
>> 
>> .
>>
>

Re: Big Problem After Going Live: NoReverseMatch at /login/ Reverse for 'password_reset' not found. 'password_reset' is not a valid view function or pattern name

2020-01-31 Thread Dave Ko
git: https://github.com/koloyyee/roasitas.git
link to the repository: https://github.com/koloyyee/roasitas

please have a look at the files, it is quite frustrating because everything 
works okay at development level,
and at product level it just break

Thanks again Jorge!

On Saturday, February 1, 2020 at 2:10:58 PM UTC+8, jlgimeno71 wrote:
>
> I apologize to the list for posting all the emails to everyone.  I'll keep 
> this going off list.
>
>
> -Jorge
>
>
> On Fri, Jan 31, 2020 at 10:09 PM Jorge Gimeno  > wrote:
>
>> What I believe is going on is that Django is looking for the password 
>> reset view at password_reset, and that url path doesn't exist anywhere in 
>> urls.py.  I see a path named "password-reset", which won't match.
>>
>> Let's try to rename that url conf to password_reset, and leave the rest 
>> unchanged.  Does anything change?
>>
>> -Jorge
>>
>> On Fri, Jan 31, 2020 at 9:21 PM Dave Ko > 
>> wrote:
>>
>>>
>>> LOGIN_REDIRECT_URL = 'news:all_news'
>>>
>>>
>>> all_news is the first page of the website 
>>>
>>> On Saturday, February 1, 2020 at 1:16:53 PM UTC+8, jlgimeno71 wrote:



 On Fri, Jan 31, 2020 at 8:33 PM Dave Ko  wrote:

>  I also have some trouble with using signal, which works perfectly 
> fine on localhost but not deployed
>
>
> On Saturday, February 1, 2020 at 12:20:29 PM UTC+8, jlgimeno71 wrote:
>>
>>
>> On Fri, Jan 31, 2020 at 5:35 PM Dave Ko  wrote:
>>
>>> Hi everyone,
>>>
>>> I am pretty new to django programming, I was following a tutorial 
>>> and try to set up a blog, 
>>> everything seems to fine on my localhost machine, but after 
>>> deployment and fixing some bugs,
>>> I run into a problem which I have no idea what to do even with hours 
>>> of search on stackoverflow.
>>>
>>> So, here is my problem, I have made a login page, register page. 
>>> After deployment there is not other users besides admin,
>>> but after register, when i try to login, it goes to error page you 
>>> can see over here roasitas.com/login/ 
>>>
>>> [image: Screenshot 2020-02-01 at 9.27.48 AM.png]
>>>
>>> here is my urls.py 
>>>
>>> I really want finish this blog and keep building it please help me 
>>> out, thanks in advance!
>>>
>>>
>>> from django.conf.urls.static import static
>>> from rest_framework import routers, serializers, viewsets
>>> from users import views as users_view 
>>> from django.contrib.auth import views as auth_views
>>> from news import views as news_views
>>> from news.models import Writer, News
>>> from news.serializers import UserSerializer, NewsSerializer
>>>
>>> urlpatterns = [
>>>path('',include('news.urls', namespace="news")),
>>>path('admin/', admin.site.urls),
>>>path('register/', users_view.register, name='register'),
>>>path('profile/', users_view.profile, name='profile'),
>>>path('login/', auth_views.LoginView.as_view(template_name=
>>> 'users/login.html'), name='login'),
>>>path('logout/', auth_views.LogoutView.as_view(template_name=
>>> 'users/logout.html'), name='logout'),
>>>path('password-reset/',
>>> auth_views.PasswordResetView.as_view(
>>>template_name='users/password_reset.html',
>>>subject_template_name='users/password_reset_subject.txt',
>>>success_url=reverse_lazy('users:password_reset_done')
>>> ),
>>> name='password_reset'),
>>>
>>> path('password-reset/done/',
>>> auth_views.PasswordResetDoneView.as_view(
>>> template_name='users/password_reset_done.html'
>>> ),
>>> name='password_reset_done'),
>>>
>>> path('password-reset-confirm///',
>>>auth_views.PasswordResetConfirmView.as_view(
>>>template_name='users/password_reset_confirm.html'
>>>),
>>>name='password_reset_confirm'),
>>>
>>>  path('password-reset-complete/',
>>> auth_views.PasswordResetCompleteView.as_view(
>>> template_name='users/password_reset_complete.html'
>>> ),
>>> name='password_reset_complete'),
>>>
>>> path('api/', include(router.urls)),
>>>path('api-auth/', include('rest_framework.urls', namespace=
>>> 'rest_framework')),
>>>path('/tinymce/', include('tinymce.urls')),
>>>
>>> ] 
>>>
>>> if settings.DEBUG:
>>>urlpatterns += static(settings.MEDIA_URL, document_root=settings.
>>> MEDIA_ROOT)
>>>
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, 
>>> send an email to django...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://