-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from CodeForPhilly/basic_auth
Basic auth
- Loading branch information
Showing
28 changed files
with
65 additions
and
32 deletions.
There are no files selected for viewing
File renamed without changes.
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,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
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,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class ApiConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'api' |
File renamed without changes.
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,3 @@ | ||
from django.db import models | ||
|
||
# Create your models here. |
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,3 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. |
2 changes: 1 addition & 1 deletion
2
...er/balancer_backend/views/chatgpt/urls.py → server/api/views/chatgpt/urls.py
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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
server/balancer_backend/views/jira/urls.py → server/api/views/jira/urls.py
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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.../balancer_backend/views/listDrugs/urls.py → server/api/views/listDrugs/urls.py
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
File renamed without changes.
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion
2
server/balancer_backend/views/risk/urls.py → server/api/views/risk/urls.py
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
File renamed without changes.
18 changes: 0 additions & 18 deletions
18
server/balancer_backend/models/users/RegistrationProfile.py
This file was deleted.
Oops, something went wrong.
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,13 +1,15 @@ | ||
from django.contrib import admin | ||
from user_management import urls as user_management_urls | ||
from django.urls import path, include | ||
import importlib | ||
|
||
subfolders = ['auth', 'chatgpt', 'jira', 'listDrugs', 'listMeds', 'risk'] | ||
urls = ['chatgpt', 'jira', 'listDrugs', 'listMeds', 'risk'] | ||
|
||
urlpatterns = [ | ||
path("admin/", admin.site.urls), | ||
path("api/", include(user_management_urls)), | ||
] | ||
|
||
for subfolder in subfolders: | ||
url_module = importlib.import_module(f'balancer_backend.views.{subfolder}.urls') | ||
urlpatterns += getattr(url_module, 'urlpatterns', []) | ||
for url in urls: | ||
url_module = importlib.import_module(f'api.views.{url}.urls') | ||
urlpatterns += getattr(url_module, 'urlpatterns', []) |
Empty file.
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,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
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,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class UserManagementConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'user_management' |
Empty file.
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,16 @@ | ||
from django.db import models | ||
from registration.models import RegistrationProfile as BaseRegistrationProfile | ||
|
||
class RegistrationProfile(BaseRegistrationProfile): | ||
email = models.EmailField(unique=True) | ||
password = models.CharField(max_length=40) | ||
# Other fields relevant for user registration and email verification | ||
|
||
def save(self, *args, **kwargs): | ||
if not self.activation_key: | ||
self.activation_key = self.generate_activation_key() | ||
super(RegistrationProfile, self).save(*args, **kwargs) | ||
|
||
def generate_activation_key(self): | ||
import uuid | ||
return str(uuid.uuid4()) |
File renamed without changes.
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,3 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. |
2 changes: 1 addition & 1 deletion
2
server/balancer_backend/views/auth/urls.py → server/user_management/urls.py
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