From fb5ff0dad73484ddc108522bfc9c64aea19f1d66 Mon Sep 17 00:00:00 2001 From: starnakin Date: Tue, 24 Oct 2023 18:42:43 +0200 Subject: [PATCH] init profiles --- django/trancendence/accounts/models.py | 6 +++++- django/trancendence/{profils => profiles}/__init__.py | 0 django/trancendence/{profils => profiles}/admin.py | 0 django/trancendence/{profils => profiles}/apps.py | 4 ++-- .../{profils => profiles}/migrations/__init__.py | 0 django/trancendence/{profils => profiles}/models.py | 0 django/trancendence/{profils => profiles}/tests.py | 0 django/trancendence/profiles/urls.py | 7 +++++++ django/trancendence/{profils => profiles}/views.py | 0 django/trancendence/trancendence/settings.py | 1 + django/trancendence/trancendence/urls.py | 1 + 11 files changed, 16 insertions(+), 3 deletions(-) rename django/trancendence/{profils => profiles}/__init__.py (100%) rename django/trancendence/{profils => profiles}/admin.py (100%) rename django/trancendence/{profils => profiles}/apps.py (62%) rename django/trancendence/{profils => profiles}/migrations/__init__.py (100%) rename django/trancendence/{profils => profiles}/models.py (100%) rename django/trancendence/{profils => profiles}/tests.py (100%) create mode 100644 django/trancendence/profiles/urls.py rename django/trancendence/{profils => profiles}/views.py (100%) diff --git a/django/trancendence/accounts/models.py b/django/trancendence/accounts/models.py index d49766e..f9ef777 100644 --- a/django/trancendence/accounts/models.py +++ b/django/trancendence/accounts/models.py @@ -1,3 +1,7 @@ from django.db import models -# Create your models here. \ No newline at end of file +# Create your models here. +class Profile(models.Model): + uuid = models.CharField() + username = models.CharField() + avatar_url = models.CharField() \ No newline at end of file diff --git a/django/trancendence/profils/__init__.py b/django/trancendence/profiles/__init__.py similarity index 100% rename from django/trancendence/profils/__init__.py rename to django/trancendence/profiles/__init__.py diff --git a/django/trancendence/profils/admin.py b/django/trancendence/profiles/admin.py similarity index 100% rename from django/trancendence/profils/admin.py rename to django/trancendence/profiles/admin.py diff --git a/django/trancendence/profils/apps.py b/django/trancendence/profiles/apps.py similarity index 62% rename from django/trancendence/profils/apps.py rename to django/trancendence/profiles/apps.py index 9d73757..d722976 100644 --- a/django/trancendence/profils/apps.py +++ b/django/trancendence/profiles/apps.py @@ -1,6 +1,6 @@ from django.apps import AppConfig -class ProfilsConfig(AppConfig): +class ProfilesConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' - name = 'profils' + name = 'profiles' diff --git a/django/trancendence/profils/migrations/__init__.py b/django/trancendence/profiles/migrations/__init__.py similarity index 100% rename from django/trancendence/profils/migrations/__init__.py rename to django/trancendence/profiles/migrations/__init__.py diff --git a/django/trancendence/profils/models.py b/django/trancendence/profiles/models.py similarity index 100% rename from django/trancendence/profils/models.py rename to django/trancendence/profiles/models.py diff --git a/django/trancendence/profils/tests.py b/django/trancendence/profiles/tests.py similarity index 100% rename from django/trancendence/profils/tests.py rename to django/trancendence/profiles/tests.py diff --git a/django/trancendence/profiles/urls.py b/django/trancendence/profiles/urls.py new file mode 100644 index 0000000..6334a8f --- /dev/null +++ b/django/trancendence/profiles/urls.py @@ -0,0 +1,7 @@ +from django.urls import path + +from . import views + +urlpatterns = [ + path("", views.ProfilePage.as_view(), name="profile_page"), +] \ No newline at end of file diff --git a/django/trancendence/profils/views.py b/django/trancendence/profiles/views.py similarity index 100% rename from django/trancendence/profils/views.py rename to django/trancendence/profiles/views.py diff --git a/django/trancendence/trancendence/settings.py b/django/trancendence/trancendence/settings.py index f789e24..b6cb791 100644 --- a/django/trancendence/trancendence/settings.py +++ b/django/trancendence/trancendence/settings.py @@ -34,6 +34,7 @@ ALLOWED_HOSTS = ["*"] INSTALLED_APPS = [ 'accounts.apps.AccountsConfig', + 'profiles.apps.ProfilesConfig', 'django.contrib.admin', 'django.contrib.auth', diff --git a/django/trancendence/trancendence/urls.py b/django/trancendence/trancendence/urls.py index 1dfcb28..26c6912 100644 --- a/django/trancendence/trancendence/urls.py +++ b/django/trancendence/trancendence/urls.py @@ -20,4 +20,5 @@ from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('api/accounts/', include('accounts.urls')), + path('api/profiles/', include('accounts.urls')), ]