Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/carrington-dev/4_sure_django
https://github.com/carrington-dev/4_sure_django
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/carrington-dev/4_sure_django
- Owner: Carrington-dev
- Created: 2023-11-23T04:07:42.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-01-16T18:38:01.000Z (10 months ago)
- Last Synced: 2024-04-24T06:07:18.669Z (7 months ago)
- Language: Python
- Size: 63.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Clown Management System
## Project Structure
```python
account/ # application
client/ # application
clown/ # application
troupe/ # application
expertproj/ # project directory
manage.py #```
## Running the project on your local machine
To run the project
### Step 1 Clone the respository
clone this repository```bash
git clone git_url
cd git_project/app
```### Step 2: Install dependencies
```python
python -m venv projectenv
source projectenv/bin/activate # linux
projectenv/Scripts/activate # window remembder use \ instead of / on windows
pip install -r requirements.txt
```### Step 3
```python
python manage.py runserver 0.0.0.0:8000
```## Running the project using docker compose
Dockerfile will match the container's port with your port
__build a container and run the application__
```bash
docker-compose up -d --build
```
run commands inside a container
```bash
docker-compose exec web python manage.py createsuperuser
```
or in docker only
```
docker exec web python manage.py createsuperuser
```## Endpoints
view our endpoints
```
/ # to view all users in the system
/register # to register and view clowns
/clients # to make or create appointments for clients
/login # to login as per FLask given example not a django standard
/clowns # to view clowns
/appointments # to view appointments only
/create_appointments # to create and view appointments
```### Swagger
swagger is not activated but can easily be activated on just a click to show all endpoints
```bash
pip install django-rest-swagger
```__settings.py__
```pythonINSTALLED_APPS = [
...
'rest_framework_swagger',
...
]
```
__configure__
```python
from django.conf.urls import url
from rest_framework_swagger.views import get_swagger_viewschema_view = get_swagger_view(title='Pastebin API')
urlpatterns = [
url(r'^$', schema_view)
]
```