-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add userprofile model to extend user model. Refactored serializers an…
…d views. Changed password reset endpoint from "api/v1/password_reset" to "api/v1/password-reset". Removed UserList endpoint (admin panel should be used instead).
- Loading branch information
1 parent
fe26e5d
commit d543984
Showing
7 changed files
with
105 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
from django.contrib import admin | ||
from .models import Coop, CoopType, CoopAddressTags, ContactMethod, Address, Person | ||
from .models import Coop, CoopType, CoopAddressTags, ContactMethod, Address, Person, UserProfile | ||
|
||
admin.site.register(Coop) | ||
admin.site.register(CoopType) | ||
admin.site.register(CoopAddressTags) | ||
admin.site.register(ContactMethod) | ||
admin.site.register(Address) | ||
admin.site.register(Person) | ||
admin.site.register(Person) | ||
admin.site.register(UserProfile) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Generated by Django 3.2.24 on 2024-05-01 20:32 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import phonenumber_field.modelfields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('directory', '0035_alter_cooptype_name'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='UserProfile', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('phone', phonenumber_field.modelfields.PhoneNumberField(max_length=128, null=True, region=None)), | ||
('github_username', models.CharField(blank=True, max_length=165, null=True)), | ||
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters