- Install git on the system.
- Open shell/command prompt and run following command to clone the project:
git clone https://github.com/Rashiddev/teacher_directory.git
- Make sure python3 and pip3 is installed on the system.
- Once inside the project's root directory, install requirements from requirements.txt using below command:
pip3 install -r requirements.txt
- Run this command inside the project directory to start the server:
python3 manage.py runserver 8000
- Open this URL to view 'directory':
http://127.0.0.1:8000/
Above URL will redirect to http://127.0.0.1:8000/directory/teachers/.
The teachers page shows list of teachers. Currently, it's showing only first_name, last_name and email on the listing page. - There are 2 filters at the top:
- In the Last name starts with filter, you can only provide first letter of the last name of the teacher.
- In the Subject name filter, you can pass 1 subject at time to search for it's teacher.
- There is a link on the first name of the teacher, once you'll click on it, it will take you to the detail page.
- In order to import teachers from CSV into the system:
- Go to this url: http://127.0.0.1:8000/admin/login/
- Provide following username and password:
- username: admin
- password: admin@123$
- Once logged in, click on Teachers menu under Directory, that will show all the teachers.
- Inside teachers listing page, click on IMPORT button on top right section.
- Choose CSV file. Make sure CSV file has following headers:
first_name,last_name,profile_picture,email,phone,room_no,subjects
Note: Sample file is already given in the root directory. - Select csv format.
- Click on Submit button. If there are no errors, that will provide you with the preview of the csv data.
- If no image is provided, default image profile image will be placeholder.png.
- Click on Confirm Import. Once clicked it will import teachers into the system.
- To export order:
- Go back to teachers listing page and click on Export button on top right.
- Select the format and click SUBMIT button, that will export the teachers.
- Note
- In order to add more profile images, upload images to
project/static/images
folder and run following command:python3 manage.py collectstatic
- In order to add more profile images, upload images to