Skip to content

Commit

Permalink
Merge pull request #3 from cristinalare/feat/init
Browse files Browse the repository at this point in the history
update urls
  • Loading branch information
cristinalare authored Oct 2, 2024
2 parents e53784b + 92efdb0 commit 98d25c7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# allo-experts-backend

```
python -m venv venv
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip3 install -r requirements.txt
python manage.py makemigrations
python manage.py migrate
python3 manage.py makemigrations
python3 manage.py migrate
```

Run the server:
Expand Down
3 changes: 2 additions & 1 deletion alloexpertsbackend/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

urlpatterns = [
path('admin/', admin.site.urls),
path('api/',include('mechanisms.urls')),
path('api/mechanisms/', include('mechanisms.urls')),
path('api/experts/', include('experts.urls')),
path('mdeditor/', include('mdeditor.urls'))
]
7 changes: 7 additions & 0 deletions experts/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from django.urls import path
from .views import ExpertListAPIView,ExpertDetailAPIView

urlpatterns = [
path('', ExpertListAPIView.as_view(), name="experts"),
path('<str:slug>/', ExpertDetailAPIView.as_view(), name="expert")
]
4 changes: 2 additions & 2 deletions mechanisms/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
from .views import MechanismListAPIView,MechanismDetailAPIView

urlpatterns = [
path('mechanisms', MechanismListAPIView.as_view(), name="mechanisms"),
path('mechanisms/<str:slug>', MechanismDetailAPIView.as_view(), name="mechanism")
path('', MechanismListAPIView.as_view(), name="mechanisms"),
path('<str:slug>/', MechanismDetailAPIView.as_view(), name="mechanism")
]

0 comments on commit 98d25c7

Please sign in to comment.