Git Product home page Git Product logo

demo's Introduction

Install ODBC Driver

  1. Install dependencies for PyODBC and tds
$ apt-get install -y tdsodbc unixodbc-dev 
$ apt install unixodbc-bin -y 
$ apt-get clean -y
  1. Edit /etc/odbcinst.ini
echo "[FreeTDS]
[FreeTDS]
Description = FreeTDS unixODBC Driver
Driver = /usr/lib/arm-linux-gnueabihf/odbc/libtdsodbc.so
Setup = /usr/lib/arm-linux-gnueabihf/odbc/libtdsS.so
  1. Install requirements (contains pyodbc)
pip install --no-cache-dir -r requirements.txt

Create systemctl service

  1. Create a new service file.
$ vim /lib/systemd/system/website-demo.service 

[Unit]
Description=Raspberry WebSite Demo
After= network-online.target
 
[Service]
ExecStart=/usr/bin/python3 /home/pi/Desktop/demo/manage.py runserver 0.0.0.0:8000
WorkingDirectory=/home/pi/Desktop/demo
User = nobody
  1. Linked this file to the systemctl path
ln -fs /lib/systemd/system/website-demo.service /etc/systemd/system/website-demo.service
  1. Register service
$ sudo systemctl daemon-reload
$ sudo systemctl restart website-demo.service
$ sudo systemctl enable website-demo.service

Restful API

  1. Documentation

  2. Restful Method:

    • POST - Create
    • GET - Read
    • PATCH - Update
    • DELETE - Delete

form post vs ajax post

  1. Form post sample

  2. Ajax post sample

demo's People

Contributors

xxxxsars avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.