Coder Social home page Coder Social logo

rohanja / drag-drop-django Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ankitgaud/drag-drop-django

0.0 0.0 0.0 35 KB

Create web pages using drag and drop method(django)

License: MIT License

Python 45.73% CSS 4.52% JavaScript 24.58% HTML 25.17%

drag-drop-django's Introduction

Dash Board For Creating Web Pages(Drag and drop) Using Django and Javascript


Dependencies
  • Python 3.7.1
  • Django 2.2.1
  • Jquery and Ajax
  • Html and css

Tasks Completed:

  • Start create webpage and pick the html element from collection of element and drop in devepoling box.
  • We can add more tags into the box.
  • After complete design of webpage, You can preview that webapage.
  • On clicking Save button that webpage would be store in database after taking input as name of web page.
  • On click button(see created webapage) list would be open in blank tag.
  • From that list of webpages, we can see that webpage and save.

Installation:

  • To install using pip use below command :-
    ```pip install requirement.txt```
  • Use pip or conda to install all above python-libraries
  • Link css library and Link Jquery library
  • Access on localhost:8000/

Describe Module and Functions:

myapp/views.py

  • Home()
  • send_html_element_from_python_function()
  • request_element()
    • url: localhost:8000/request/element/
    • On click button(add more element) for add specific tag then jquery and ajax function request data from above url and then above function give response. In this function, a variable is declared as string value. I used that variable directly.
  • save_file()
    • url: localhost:8000/savefile//
    • On click Save button then page code is read with javascript and send to above function through above url and then code would be save in database.
  • Show_pages()
    • url: localhost:8000/show_pages/
    • On click button(show created pages), this function would retrive all data and show data file names with render 'show_pages.html' template.
  • Open_pages()
    • url: localhost:8000/Open_page/
    • If we want open any webpage, then click button present in list then above function retrieve data from database and send data through above url.

myapp/models.py

  • Document()
    • This django model is used to store Html tag file.
  • create_page()
    • This django model is used to save created page.

static/home.js

  • This static file is used by 'home.html'. Ajax and Jquery code is present in the same file and other javascript event is also present in this file.

I used dynamic templates with extending html base file.


Instructions

  • Run with 'python manage.py runserver'
  • Make sure network connection(Jquery and css bootstrap library's online link are used. )

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.