Skip to content

Commit

Permalink
refonte
Browse files Browse the repository at this point in the history
  • Loading branch information
leopoldch committed Feb 5, 2024
1 parent 119886d commit 0399616
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/backend.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "apps": [{ "name": "backendapi", "script": "manage.py", "args": ["runserver", "127.0.0.1:8000"], "exec_mode": "fork", "instances": "1", "wait_ready": true, "autorestart": true, "max_restarts": 5, "interpreter" : "python3" }] }
6 changes: 4 additions & 2 deletions backend/backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []

ALLOWED_HOSTS = ["dbsapi.lchappuis.fr", "dbs.etu-utc.fr", "127.0.0.1"]
CORS_ALLOWED_ORIGINS = ['http://dbsapi.lchappuis.fr', 'http://localhost:3000', 'http://dbs.etu-utc.fr',
'https://dbsapi.lchappuis.fr', 'https://dbs.etu-utc.fr',
]

# Application definition

Expand Down
2 changes: 1 addition & 1 deletion backend/backend/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from app.views import *

urlpatterns = [
# path('youwillneverfindme/', admin.site.urls),
path('admin/', admin.site.urls),
path('', ItemView.as_view(), name="Main"),
path('items/<int:pk>/', ItemView.as_view(), name='item-update'),
path('login/', LoginView.as_view(), name='login'),
Expand Down
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
django
django-cors-headers
djangorestframework
2 changes: 1 addition & 1 deletion src/components/LoginForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function LoginForm() {
return (
<Form>
<FormInput
error={error ? { content: error, pointing: 'below' } : null}
error={error ? { content: "Please enter your username", pointing: 'below' } : null}
fluid
placeholder='Username'
id='username'
Expand Down

0 comments on commit 0399616

Please sign in to comment.