Hello Vue Django

screenshot of Hello Vue Django
vue

Hello Vue Django

vuejs and Django integration with hot code reload. Dont use this, use https://github.com/NdagiStanley/vue-django or https://github.com/gtalarico/django-vue-template

Overview:

The hello-vue + Django is a boilerplate project that combines the use of Vue.js with Django. It provides a development environment setup and deployment steps for easier and faster development. The project includes a Django backend and a Vue.js frontend, with features such as hot-reload with vue-loader and eslint linter integration.

Features:

  • Django backend: The project includes a Django backend located in the "./backend" directory.
  • Vue.js frontend: The project also includes a Vue.js frontend located in the "./frontend" directory.
  • Hot-reload with vue-loader: The development setup includes hot-reload functionality, allowing for automatic updates during development without the need to manually refresh the page.
  • Eslint linter integration: The project integrates ESLint, a popular JavaScript linter, which helps maintain code quality and consistency.

Installation:

To set up the hello-vue + Django theme, follow these steps:

  1. Clone the project repository to your local machine.
  2. Navigate to the project directory.
  3. Install all required dependencies, both development and production, by running the following command:
npm install

or

yarn install
  1. Run migrations to set up the database by executing the following command:
python manage.py migrate
  1. Start the development server by running the command:
python manage.py runserver

For deployment, follow these steps:

  1. Install the production dependencies by running the following command:
npm install --production

or

yarn install --production
  1. Build the Vue.js application to the static/dist folder by executing the following command:
npm run build

or

yarn build
  1. Deploy the static/dist folder to your production server.

Note: In a real-world setting, it is recommended to remove the Django backend from the INSTALLED_APPS and create a new app for it. Additionally, creating a Python virtual environment is advisable.

Summary:

The hello-vue + Django is a boilerplate project that combines the Vue.js frontend framework with the Django backend framework. It provides a development environment setup with features such as hot-reload and eslint linter integration. The installation process is straightforward and includes steps for both local development and deployment. It is recommended to make adjustments to the Django configuration in a real-world setting.

vue
Vue

Vue.js is a lightweight and flexible JavaScript framework that allows developers to easily build dynamic and reactive user interfaces. Its intuitive syntax, modular architecture, and focus on performance make it a popular choice for modern web development.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

webpack
Webpack

Webpack is a popular open-source module bundler for JavaScript applications that bundles and optimizes the code and its dependencies for production-ready deployment. It can also be used to transform other types of assets such as CSS, images, and fonts.