Giter Club home page Giter Club logo

django_boilerplate_with_multitenant's Introduction

Django Multitenant Boilerplate

Django Multitenant Boilerplate is a comprehensive Django project template designed to kickstart your development process for building multi-tenant web applications. It includes all the features from the original Minimal Boilerplate and introduces additional functionality for handling multiple tenants in your Django application.

Features

  • Django 3.2: The latest stable version of Django.
  • Simple project structure: Provides a clean and organized project structure to help you start your development quickly.
  • Customizable settings: Easily modify project settings to suit your specific needs.
  • Database configuration: Pre-configured to use PostgreSQL by default, but you can easily switch to other databases like SQLite or MySQL.
  • Environment variables: Uses the python-decouple library to manage environment variables for your local development and production deployment.
  • Debug toolbar: Includes Django Debug Toolbar to assist with debugging during development.
  • Multitenancy support: Built-in support for handling multiple tenants within the same Django application.

Multitenancy Features

  • Tenant model and schema: The boilerplate includes a Tenant model and sets up a separate schema for each tenant in the database. This allows you to isolate data between tenants securely.
  • Tenant-specific settings: Provides the ability to have tenant-specific settings, enabling you to customize various aspects of your application for each tenant.
  • Middleware for authentication: Includes middleware to handle tenant authentication and routing requests to the appropriate tenant's schema based on the URL or a custom header.
  • Tenant management commands: Comes with management commands to create new tenants, set tenant-specific settings, and perform tenant-related tasks.

Getting Started

Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Python 3.9 or higher
  • pip (Python package installer)
  • PostgreSQL

Installation

  1. Clone the repository:
git clone https://github.com/azadhmhd/django_boilerplate_with_multitenant.git
  1. Create a virtual environment and activate it:
python3 -m venv myenv
source myenv/bin/activate
  1. Install the required Python packages:
pip install -r requirements.txt
  1. Set up the environment variables:
  • Rename the .env.sample file to .env.
  • Open the .env file and provide the necessary values for the environment variables.

Configuration

  1. Migrations
  • Apply the initial database migrations by running the following command:
python manage.py migrate

Usage

To run the Django development server, execute the following command:

python manage.py runserver

Once the server is running, you can access the application by visiting http://localhost:8000 in your web browser.

Contributing

If you'd like to contribute to this project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make the necessary changes and commit them.
  4. Push your changes to your fork.
  5. Submit a pull request with a detailed description of your changes.

License

This project is licensed under the MIT License. Feel free to use and modify it according to your needs.

Acknowledgements

We would like to acknowledge the following resources and projects that inspired and helped in the development of this boilerplate:

  • Django
  • PostgreSQL
  • Django_multitenant

Contact

If you have any questions or suggestions, feel free to contact us at [email protected]. We appreciate your feedback!

Feel free to customize and expand this README file to provide more detailed information about your Django Multitenant Boilerplate project.

django_boilerplate_with_multitenant's People

Contributors

azadhmhd avatar

Stargazers

Mislaj NU 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.