Skip to content

ThePythonLover/booking

 
 

Repository files navigation

Booking

The application basically, is an online booking system that users can be booking any kind of room, hotel, etc.

Instruction to run the application in your local dev server:

Prerequisites
  • Python 3.8.5
  • Psql 13.0

The following steps will walk you thru installation on a Mac. I think linux should be similar. It's also possible to develop on a Windows machine, but I have not documented the steps. If you've developed django apps on Windows, you should have little problem getting up and running.

git clone https://github.com/mbrsagor/booking.git
cd booking
virtualenv venv --python=python3.8
source venv/bin/activate
pip install -r requirements.txt
Then create .env file and paste code from sample.env file and add validate information.

|--> sample.env
|--> .env
Run development server:
python manage.py makemigrations rent
python manage.py migrate rent
python manage.py migrate
python manage.py runserver
Rest API endpoint:
http://127.0.0.1:8000/api/
LOGGING: project settings.py file paste the code
LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,                                                                    
    'handlers': {                                                                                         
        'file': {
            'level': 'INFO',
            'class': 'logging.FileHandler',
            'filename': '/code/myapp/logs/info.log',             
        },
        'console': { 
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',                                                             
        },                                                                                                
    },
    'loggers': {
        'django': {
            'handlers': ['file'],                                                                         
            'level': 'INFO',
            'propagate': True,                                                                            
        },
        'app-logger': { 
            'handlers': ['file', 'console'],                                                              
            'level': 'CRITICAL',                                                                          
            'propagate': True,                                                                            
        },                                                               
    }, 
}

import logging

def appError():
    appLogger = logging.getLogger('app-logger')                                                           
    appLogger.critical("A critical error occurred")

Happy coding 😉

About

The application basically an online booking system that users can be booking any kind of room, hotel, etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • CSS 57.8%
  • HTML 20.6%
  • JavaScript 11.5%
  • Python 9.9%
  • Other 0.2%