diff --git a/blog/__pycache__/views.cpython-310.pyc b/blog/__pycache__/views.cpython-310.pyc index 751cb03..5b1f679 100644 Binary files a/blog/__pycache__/views.cpython-310.pyc and b/blog/__pycache__/views.cpython-310.pyc differ diff --git a/db.sqlite3 b/db.sqlite3 index 9c34ddf..b6f89f4 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/users/__pycache__/admin.cpython-310.pyc b/users/__pycache__/admin.cpython-310.pyc index 96bc19f..8c0c78f 100644 Binary files a/users/__pycache__/admin.cpython-310.pyc and b/users/__pycache__/admin.cpython-310.pyc differ diff --git a/users/__pycache__/forms.cpython-310.pyc b/users/__pycache__/forms.cpython-310.pyc index d5e28a1..3a13254 100644 Binary files a/users/__pycache__/forms.cpython-310.pyc and b/users/__pycache__/forms.cpython-310.pyc differ diff --git a/users/__pycache__/signals.cpython-310.pyc b/users/__pycache__/signals.cpython-310.pyc index 724a7b5..331f8c3 100644 Binary files a/users/__pycache__/signals.cpython-310.pyc and b/users/__pycache__/signals.cpython-310.pyc differ diff --git a/users/__pycache__/urls.cpython-310.pyc b/users/__pycache__/urls.cpython-310.pyc index 9f60ba9..f0cf92c 100644 Binary files a/users/__pycache__/urls.cpython-310.pyc and b/users/__pycache__/urls.cpython-310.pyc differ diff --git a/users/admin.py b/users/admin.py index 33d2368..b5afd5a 100644 --- a/users/admin.py +++ b/users/admin.py @@ -3,4 +3,3 @@ from .models import Profile # Register your models here. -admin.site.register(Profile) \ No newline at end of file diff --git a/users/forms.py b/users/forms.py index e8705bd..17b30be 100644 --- a/users/forms.py +++ b/users/forms.py @@ -19,13 +19,3 @@ class UserUpdateForm(forms.ModelForm): model = User fields = ['username', 'email'] - -class ProfileUpdateForm(forms.ModelForm): - name = forms.TextInput() - about = forms.TextInput() - gender = forms.ChoiceField(choices=[('M', 'Male'), ('F', 'Female')]) - dob = forms.DateField() - - class Meta: - model = Profile - fields = ['name', 'gender', 'dob', 'about'] diff --git a/users/signals.py b/users/signals.py index 894e1db..acb1b9e 100644 --- a/users/signals.py +++ b/users/signals.py @@ -1,15 +1,3 @@ from django.db.models.signals import post_save from django.contrib.auth.models import User from django.dispatch import receiver -from .models import Profile - - -@receiver(post_save, sender=User) -def create_profile(sender, instance, created, **kwargs): - if created: - Profile.objects.create(user=instance) - - -@receiver(post_save, sender=User) -def save_profile(sender, instance, **kwargs): - instance.profile.save() \ No newline at end of file diff --git a/users/urls.py b/users/urls.py index f9402a4..d90dc45 100644 --- a/users/urls.py +++ b/users/urls.py @@ -3,11 +3,8 @@ from django.contrib.auth import views as login_view from . import views urlpatterns = [ - # path('', views.users, name='Users'), - path('people/', views.UserListView.as_view(), name='People'), path('profile/', views.profile, name='Profile'), path('profile/', views.profile, name='NamedProfile'), - path('explore/', views.explore, name='Explore'), path('login/', login_view.LoginView.as_view(template_name='users/login.html'), name='Login'), path('logout/', login_view.LogoutView.as_view(template_name='users/logout.html'), name='Logout'), path('register/', views.register, name='Register')