I have build a Hotel site which has:
Rooms
Book A Room
Search Over Rooms
About
Contact
STEPS TO RUN THE PROJECT-
clone the project:
https://github.com/97shivank/Hotel-Site-with-Django.git
create and start a a virtual environment:
virtualenv env --no-site-packages
source env/bin/activate
Install the project dependencies:
pip install -r requirements.txt
create a file named "secrets.sh": touch secrets.sh (linux): obtain a secret from MiniWebTool key and add to secrets.sh:
export SECRET_KEY='<secret_key>'
create a postgres db and add the credentials to settings.py:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'db_name',
'USER': 'name',
'PASSWORD': '',
'HOST': 'localhost',
'PORT': '',
}
}
then run:
python manage.py migrate
create admin account:
python manage.py createsuperuser
then:
python manage.py makemigrations django-hotel
to makemigrations for the app: then again run:
python manage.py migrate
to start the development server:
python manage.py runserver
and open localhost:8000 on your browser to view the app:
HOME