Fix: function naming convention
This commit is contained in:
parent
03ccac13b6
commit
57cf266b56
2 changed files with 3 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
from django.urls import path
|
from django.urls import path
|
||||||
from .views import edit_profile
|
from .views import ProfileEditView
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
# Other URL patterns
|
# Other URL patterns
|
||||||
path('profile/', edit_profile, name='profile'),
|
path('profile/edit', ProfileEditView, name='profile'),
|
||||||
]
|
]
|
||||||
|
|
|
@ -12,7 +12,7 @@ from apps.sites.models import Submissions
|
||||||
from .forms import UserProfileForm, UserForm
|
from .forms import UserProfileForm, UserForm
|
||||||
|
|
||||||
@login_required(login_url="/login/")
|
@login_required(login_url="/login/")
|
||||||
def edit_profile(request):
|
def ProfileEditView(request):
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
user_form = UserForm(request.POST, instance=request.user)
|
user_form = UserForm(request.POST, instance=request.user)
|
||||||
profile_form = UserProfileForm(request.POST, instance=request.user.userprofile)
|
profile_form = UserProfileForm(request.POST, instance=request.user.userprofile)
|
||||||
|
|
Loading…
Reference in a new issue