- Overview
- Project Info
- Entity Relationship Diagram
- Project Link
- Preview
- Built With
- Project Structure
- How to use
- Contact
- This is the backend side of my Personnel list app project.
- I used reactjs for frontend.
You can see the frontend side of this project from here 👈
- Department and Personnel tables are interconnected and each department has its own personnel..
- Company personnel who have logged into the system can see the departments of the company and the personnel working under those departments in detail.
- Staff members can add or update new staff to the department list.
- Only superusers will have the authority to delete staff.
- We will construct this structure using a generic view. In order to override Class methods, we will provide if-else structures that should act accordingly whether the person is a staff or superuser. We will use IsAuthenticated from Rest framework permissions.
- I used nested serializer and method fields in our serializer.
- I used the cors-headers package to connect the frontend to our API.
- You can perform staff operations using the following account information:
- userName: michaelscott
- password: Littlekidlover1
You can reach my project from here 👈
- Django
- Django Rest Framework
- Django Rest Auth
- Django Cors Headers
.──── django-personnel-app-backend (repo)
│
├── main
│ ├── __pycache__
│ ├── __init__.py
│ ├── asgi.py
│ ├── urls.py
│ ├── wsgi.py
│ └── settings.py
│─── personalApp
│ ├── __pycache__
│ ├── migrations
│ │── __init__.py
│ ├── admin.py
│ ├── apps.py
│ ├── models.py
│ ├── serializers.py
│ ├── signals.py
│ ├── tests.py
│ ├── urls.py
│ └── views.py
├──── users
│ ├── __pycache__
│ ├── migrations
│ ├── __init__.py
│ ├── admin.py
│ ├── apps.py
│ ├── models.py
│ ├── serializers.py
│ ├── signals.py
│ ├── tests.py
│ ├── urls.py
│ └── views.py
├── manage.py
├── db.sqlite3
├── debug.log
├── requirements.txt
└── .env
To clone and run this application, you'll need Git
# Clone this repository
$ git clone https://github.com/esadakman/django-personnel-app-backend
# Install dependencies
$ py -m venv env
> env/Scripts/activate (for win OS)
$ source env/bin/activate (for macOs/linux OS)
$ pip install -r requirements.txt
# Add .env file for secret key and set your secret_key
- Create a .env file for =>
-- SECRET_KEY,
- After these you can run the project as usual =>
$ py manage.py migrate
$ py manage.py createsuperuser
# Run the app
$ python manage.py runserver
- Website @esadakman
- GitHub @esadakman
- Linkedin @esadakman