RentHub-Connect is an application designed to streamline apartment management by integrating booking and payments.
Run this in your terminal
git clone https://github.com/Pong50887/RentHub-Connect
cd RentHub-Connect
python -m venv myenv
For Mac/Linux
source myenv/bin/activate
For Windows
.\myenv\Scripts\activate
pip install -r requirements.txt
In the sample.env
file, we have provided everything necessary to run the file,
So you can duplicate and rename it to .env
For Mac/Linux
cp sample.env .env
For windows
copy sample.env .env
You'll have to create your own neon.tech Postgre database and Amazon S3 to connect with the application
Follow these tutorial, you only have to get values for your .env
neon.tech Postgre database
Amazon S3 tutorial
python manage.py migrate
python manage.py test
Media files First, download awscli
Windows
choco install awscli
Mac/Linux
brew install awscli
log in to your amazon cli
aws configure
input your aws configuration data
If the aws configuration data is correct, then you'd be able to load media/ into S3 with
aws s3 sync media/ s3://<your-bucket-name> --region <your-region-name>
Relational files
For Windows
for %f in (data\*.json) do python manage.py loaddata "%f"
For Mac/Linux
for file in data/*.json; do
python manage.py loaddata $file
done
if you ran into loaddata errors, you simply rerun those commands again until no error reports appears
you can run the application; run this in your terminal from the project directory
python manage.py runserver
if static files did not load properly, quit previous (CTRL+C) and use this instead
python manage.py runserver --insecure
type this in your web browser's URL bar
localhost:8000
or
127.0.0.1:8000
!Caution Some web browser may block the application due to security concerns (like Safari)
Try Google Chrome or Brave.
Your data are saved to cloud database (neon.tech Postgres, Amazon S3) up-to-date in real-time
But if you want to save your questions and choices locally
To save your data
Windows
python manage.py dumpdata auth.user --indent 4 > data\users.json
Mac/Linux
users
python3 manage.py dumpdata auth.user --indent 4 > data/users.json
app models
Windows
for %model in (user, announcement, feature, maintenancerequest, notification, propertyowner, rental, rentalpayment, renter, room, roomimage, roomtype, transaction) do (
python manage.py dumpdata <yourappname>.%model --indent 4 > data\%model%.json
)
Mac/Linux
for model in user announcement feature maintenancerequest notification propertyowner rental rentalpayment renter room roomimage roomtype transaction; do
python3 manage.py dumpdata <yourappname>.$model --indent 4 > data/${model}.json
done
To save your media files
First, download awscli
Windows
choco install awscli
Mac/Linux
brew install awscli
log in to your amazon cli
aws configure
input your aws configuration data
If the aws configuration data is correct, then you'd be able to load media into media/ with
aws s3 sync s3://<your-bucket-name> --region <your-region-name> media/
Ctrl+C
to stop the running web application.
If you've accidentally pressed Ctrl+Z
and can't run the application again,
follow these instructions
sudo lsof -i :8000
//The second column of the output is the <PID>
Then replace
sudo kill <PID>
//or
sudo kill -9 <PID>
or
Mac Searching the PID in your Activity Moniter, right click, and press Quit.
For Windows
netstat -ano | findstr :8000
//The last column is the <PID>
Then replace
taskkill /PID <PID> /F
run this in your virtual environment
deactivate
Username | password |
---|---|
rhadmin | renthub1234 |
Username | password |
---|---|
renthub1 | owner123 |
Username | password |
---|---|
demo1 | hackme11 |
demo2 | hackme22 |
demo3 | hackme33 |
demo4 | hackme44 |
demo5 | hackme55 |
All project documents are in the Project Wiki.