Requirement:
-
python:
web:-
django : https://www.djangoproject.com/
pip install Django==4.0.5
-
mysql client : https://pypi.org/project/mysqlclient/
pip install mysqlclient
-
django widget_tweaks :https://pypi.org/project/django-widget-tweaks/
pip install django-widget-tweaks
solr:
- pysolr : https://pypi.org/project/pysolr/
pip install pysolr
PDF:
-
FPDF : https://pypi.org/project/fpdf2/
pip install fpdf2
-
PyPDF2 :https://pypi.org/project/PyPDF2/
pip install PyPDF2
-
-
mysql
-
apache solr
How to clone:
-
Prepare the above requrements
-
Clone this repository
-
activate mysql and create new database
mysql -u root CREATE DATABASE databasename
-
put database in cvFilter/settings.py
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'cvFilter', 'USER':'root', # 'PASSWORD':'mysql', 'HOST':'localhost', 'PORT':'3306' } }
-
create secret key from https://djecrety.ir/ and put in in cvFilter/settings.py
# SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'django-insecure-fgqs6&nz7wfk1vk=*qd$n@-zk#wgtyw(ur^4-1v=wmi2i@w#_d'
-
Make your migrations
python manage.py makemigrations python manage.py migrate
-
Create a new superuser
python manage.py createsuperuser
-
let the show begin
python manage.py runserver
How to generate fake data (for testing):
- Delete all applicants data.
go to project root directory and run the following commandpython manage.py migrate applicant zero python manage.py migrate applicant
- Delete all pdf file in ./media/documents/
- go to applicant/fixture/ run the following command
python data_generator.py numberOfInstances
- go to project root directory and run the following command
python manage.py loaddata applicant/fixture/applicants.json
- Examine