Skip to content

mChoczay/Luna_Hydrophonic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 

Repository files navigation

Luna_Hydrophonic

Repository cointains CRUD app in Django developed for Luna Scientific recruitment task.

Installation

pip install virtualenv
virtualenv venv
venv\Scripts\activate
pip install -r requirements.txt

Usage

cd CRUD
python manage.py runserver

Datebase setup

In settings.py fill required fields

        'NAME': 'your-database-name',
        'USER': 'your-user-name',
        'PASSWORD': 'your-password',
        'HOST': 'localhost',
        'PORT': '5432',

Also add a new table to your db using this script

create table sensors (
	user_id INTEGER,
	system_id INTEGER,
	ph VARCHAR(99),
	water_temperature VARCHAR(99),
	TDS VARCHAR(99),
	created_at TIMESTAMP default CURRENT_TIMESTAMP
);

Endpoints

    Endpoints with * are login required
    /
    Renders the home page.
    /register
    Registers a new user.
    /login
    Logs in a user.
    /dashboard *
    Renders the dashboard page.
    /create *
    Creates a new hydroponic system.
    /update/pk *
    Updates an existing hydroponic system.
    /system/pk *
    Renders the details of a hydroponic system.
    /delete/pk *
    Deletes an existing hydroponic system.
    /logout
    Logs out the current user.
    /stream
    Simulates a sensor reading and updates the database with the sensor data.

About

Repository cointains CRUD app in Django developed for Luna Scientific recruitment task.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors