Django Web Framework

224 readers
1 users here now

This is a community dedicated to the Django Web Framework for Python.

Useful links:

Rules:

Community icon from vscode-django, licensed under the MIT license

founded 6 years ago
1
 
 

crosspost from: https://feddit.org/post/26317173

Hi,

I build my own UserModel with email instead of username and now the PasswordResetConfirmView does not render the form for setting a new password. Form is None and Title "Password reset unsuccessful". All other forms are working correct.

I am using the standard "django.contrib.auth".

My user-class:

class MyUser(AbstractUser):
    username=None
    email=models.EmailField(_('email address'),unique=True)
    USERNAME_FIELD='email'
    REQUIRED_FIELDS=[]

My urls.py

from django.urls import path, include
from django.contrib.auth import views as auth_views

urlpatterns = [
    path('password_reset/', auth_views.PasswordResetView.as_view(template_name='password_reset.html', html_email_template_name='password_reset_email.html'), name='password_reset'),
    path('password_reset/done/', auth_views.PasswordResetDoneView.as_view(template_name='password_reset_done.html'), name='password_reset_done'),
    path('password_reset/confirm/<uidb64>/<token>/', auth_views.PasswordResetConfirmView.as_view(template_name='password_reset_confirm.html'),name='password_reset_confirm'),
    path('password_reset/complete/', auth_views.PasswordResetCompleteView.as_view(template_name='password_reset_complete.html'),name='password_reset_complete'),
]

The reset link in console looks a bit wired:

Please go to the following page and choose a new password:

http://127.0.0.1:8000/accounts/password_reset/confirm/Mg/d4khhw-79d3d64161aaf=
78fe9f0542f1883e48c/

Also, there is no redirect to: http://127.0.0.1:8000/accounts/password_reset/confirm/Mg/set-password/

I tried clicking the link, copying it. Nothing works. What am I missing here. Some tips would be appreciated.

2
3
3
Django 6.0 released (www.djangoproject.com)
submitted 3 months ago by cypherpunks@lemmy.ml to c/django@lemmy.ml
4
5
 
 

I’m in the very fortunate position of being made a senior at my new job and have the task of helping recruit a new Django dev to help us out.

I have never had to do this before so I was wondering:

  1. Does anyone have any tips for making a candidate feel comfortable?
  2. What sort of questions you feel would be appropriate for a junior django dev to be able to answer?
6
1
submitted 4 years ago* (last edited 4 years ago) by django_python@lemmy.ml to c/django@lemmy.ml
 
 

Django python jobs for great django developers

7
1
submitted 4 years ago* (last edited 4 years ago) by amalshaji@lemmy.ml to c/django@lemmy.ml
 
 

A few months ago, I built a tool to generate fake data based on a JSON payload(fakeapi). FakeAPI worked fine, but a major downside was that a JSON payload must be sent as a post request to receive data. This is not good for someone emulating any other HTTP methods.

So I decided to build Phoney. Phoney is a mock API generator that lets you create apps to manage endpoints. Other features of phoney include,

  • Create apps to manage your endpoints
  • Create endpoints that return data in a custom format
  • Default API key authentication support
  • All methods, GET, POST, PUT, and DELETE, supported.
  • Dynamic endpoints supported
  • Swagger UI for each endpoint. It makes testing easy.
  • Built-in JSON editor for creating endpoint schema
  • Supported response codes, 200, 201, and 202
  • Syntax highlighting for JSON schema
  • Light/Dark theme switch

This is my first ever Django app