Git Product home page Git Product logo

gianlucaiavicoli / django-venv Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 79 KB

Whether you are a seasoned Django developer or just starting out, these scripts aim to streamline common tasks and make it easier to get your Django project up and running quickly.

License: Apache License 2.0

Python 77.88% Shell 22.12%
django django-environment django-mysql django-setup cassandra django-docker docker mysql postgresql scylla

django-venv's Introduction

Django Venv

This repository contains a set of Python and Bash scripts designed to simplify the process of setting up a development environment for Django projects. Whether you are a seasoned Django developer or just starting out, these scripts aim to streamline common tasks and make it easier to get your Django project up and running quickly.

Table of Contents

  1. About The Project
  2. Getting Started
  3. Upcoming Features
  4. Code of Conduct
  5. Contributing
  6. License
  7. Acknowledgments

Features

Django-Venv provides the following features:

  1. Virtual Environment Setup: Automatically creates a virtual environment and installs project dependencies.

  2. Django Project Initialization: Automates the creation of a Django project, along with additional directories and files such as static files, apps directory, and a base.html template.

  3. Django Settings Configuration: Edits the settings.py file to include various settings, including database configuration (MySQL, PostgreSQL) with docker, htmx setup, SMTP configuration, and other common settings.

  4. Database Setup: Users have the option to either utilize their own server or have the script generate a Docker container for the specified database. When opting for MySQL or other compatible databases, the script will endeavor to create a Docker container with your chosen database, establish a user profile with the requisite permissions, set up a database, and store the credentials securely in an .env file.

Built With

LINUX Shell Script Django Docker MySQL Postgres

(back to top)

Getting Started

Prerequisites

Before you begin, please ensure that you have the following dependencies installed on your system:

  • Linux Operating System: Django-Venv is designed to work on Linux-based systems.

  • Docker: Django-Venv relies on Docker for certain functionality. Make sure you have Docker installed on your machine. You can find installation instructions for Docker on the Docker website.

Once you have these dependencies in place, you can proceed with the installation and usage of Django-Venv.

(back to top)

Installation

To get started, follow these steps:

  1. Create a python venv:

     python -m venv <venv_name>
  2. Activate the venv:

     source <venv_name>/bin/activate
  3. Install the package:

    pip install django-venv

Usage

Run the script to set up your Django project:

django-venv <project_name>

Command-Line Options

django-venv <project_name> [OPTIONS]

Options:
    -h, --help                       Display this help message
    -d, --database <database_type>   Specify the database type (required)
                                     Choose between 'mysql' or 'postgre'
    --smtp                           Configure SMTP settings in settings.py
    --htmx                           Configure HTMX settings in settings.py

(back to top)

Usage Example

django-venv <project_name> -d mysql --htmx --smtp

This will generate settings.py, an '.env' file with all the credentials, a locally running MySQL Docker container if the database is not specified, as well as all the static directories and application directories for the Django project.

(back to top)

Upcoming Features

  1. Cassandra Support with Docker: Integrate support for Cassandra databases with Docker.
  2. Scylla Support with Docker: Extend our Docker support to include Scylla, a highly available NoSQL database compatible with Apache Cassandra.

(back to top)

Code of Conduct

Please review our Code of Conduct before contributing to Django-Venv.

(back to top)

Contributing

We welcome contributions from the community! Please see our Contributing Guidelines for more information.

(back to top)

License

Distributed under the Apache-2.0 license. See LICENSE for more information.

(back to top)

Acknowledgments

(back to top)

django-venv's People

Contributors

gianlucaiavicoli 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.