Skip to content

Latest commit

 

History

History
125 lines (85 loc) · 2.92 KB

README.md

File metadata and controls

125 lines (85 loc) · 2.92 KB
HijriAPI

Hijri API🌙

🌟 About the Project

Hijri API for getting dates in hijri (gregorian), also hijri (gregorian) months and week days😊

P.S. I used hijri-converter package to get dates, big thanks author of this package

🔑 Secret key

To run this project, you need to add your generated secret key in settings.py file on INSTALLED_APPS. You can get it by this commands:

go terminal $ django-admin shell and type

from django.core.management.utils import get_random_secret_key  
get_random_secret_key()

or simply get it by Djecrety

⚙️ Installation

Clone the project

  git clone https://github.com/FarizAbduhakimov/HijriAPI.git

Create virtual env & activate it

  virtualenv env # create
  .\env\Scripts\activate # activate (Windows)
  
  $ source venv/bin/activate # activate (Linux)

Install requirements.txt

pip install -r requirements.txt 

For linux & mac use pip3 & python3

🏃 Run Locally

Go to the project directory & run

  cd .\hijri_api\
  
  python manage.py runserver

👀 Usage

Go postman and continue following commands

to hijri

For getting hijri date type on url http://127.0.0.1:8000/api/tohijri and make a request, like that

to gregorian

So you can get gregorian date

For getting hijri (gregorian) months & week days

hijri months

Hijri months📅

gregorian months

Gregorian months📅

hijri weekday

Hijri week days

gregorian weekday

Gregorian week days

🖼Swagger UI

Swagger url: http://127.0.0.1:8000/swagger/

swagger

🧪 Running Tests

To run tests, run the following command

  python manage.py test
test running

Thanks 🙂

If you liked the project, don't forget to press a star button :)