brickdjango


Namebrickdjango JSON
Version 0.3.1 PyPI version JSON
download
home_pageNone
SummaryA custom Django project structure optimized for scalability, modularity, and maintainabilityβ€”ideal for both small and large-scale web applications.
upload_time2025-08-22 12:19:59
maintainerNone
docs_urlNone
authorAmol Balpande
requires_python>=3.8
licenseNone
keywords django project-structure starter boilerplate brick django
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
πŸ”€ "BrickDjango" – Meaning in Depth
BrickDjango is a metaphorical name that combines:

"Brick" – the basic building block of construction.

"Django" – the popular Python web framework you're customizing.

🧱 What β€œBrick” Suggests:
Modularity: Bricks are independent units that come together to form larger structures. Similarly, your Django structure has modular apps, separated settings, and organized layout.

Foundation & Scalability: Bricks form the foundation of a strong, scalable structure. Your custom project structure aims to do the same for Django projects.

Simplicity with Power: Bricks are simple, but powerful when arranged well β€” just like your approach to Django project architecture.



## πŸ“˜ BrickDjango User Guide



Table of Contents


1. Installation

2. Features

3. Getting Started

4. Creating a New Project

5. Creating New Apps

6. Project Structure Overview

7. Configuring Settings

8. Best Practices

9. Troubleshooting



## πŸ”° **Introduction**

**BrickDjango** is a custom Django project scaffolding tool that helps developers start Django projects and apps with a modular, scalable, and maintainable folder structure.

This guide walks you through installing, using, and extending BrickDjango.

---

## πŸ“¦ Installation

### Requirements:
- Python 3.10+
- `pip` (Python package manager)

### Steps:

1. Clone or install BrickDjango:

**bash**
`pip install brickdjango`

---

## βš™οΈ Features

- Modular project layout (`apps/`, `config/`, `base/`)
- CLI for structured app/project creation
- Automatic app namespacing (`apps.myapp`)
- Environment-based settings (dev/prod)
- Follows Django best practices with added organization

---

## πŸš€ Getting Started

Use the `brickdjango` CLI to bootstrap your projects and apps easily.

---

## πŸ—οΈ Creating a New Project

**bash**
`brickdjango startproject <project_name>`


βœ… This command sets up a new Django project with the custom BrickDjango folder layout.

**Example:**

**bash**
`brickdjango startproject mysite`
`cd mysite`


---

## 🧱 Creating a New App

**bash**
`brickdjango startapp <app-name>`

    
βœ… This creates a Django app inside the `apps/` directory with proper namespace.

**Example:**

bash
`brickdjango startapp blog`

πŸ” This will create: `apps/blog/` and modify `apps.py` like this:

**python**
from django.apps import AppConfig

class BlogConfig(AppConfig):
    default_auto_field = 'django.db.models.BigAutoField'
    name = 'apps.blog'


Add the app to `INSTALLED_APPS` in `config/settings/base.py`:

**python**
INSTALLED_APPS = [
    # ...
    'apps.blog',
]


---

## πŸ—‚οΈ Project Structure Overview

<pre><code>
    
Master/
β”œβ”€β”€ base/
β”‚   └── utils/
β”‚       └── utils.py
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ blog/
β”‚   β”‚   β”œβ”€β”€ admin.py
β”‚   β”‚   β”œβ”€β”€ apps.py
β”‚   β”‚   β”œβ”€β”€ models.py
β”‚   β”‚   β”œβ”€β”€ views.py
β”‚   β”‚   β”œβ”€β”€ tests.py
β”‚   β”‚   └── migrations/
β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ settings/
β”‚   β”‚   β”œβ”€β”€ base.py
β”‚   β”‚   β”œβ”€β”€ development.py
β”‚   β”‚   β”œβ”€β”€ production.py
β”‚   β”‚   └── .env
β”‚   β”œβ”€β”€ urls.py
β”‚   β”œβ”€β”€ asgi.py
β”‚   └── wsgi.py
β”œβ”€β”€ manage.py
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ README.md
└── venv/

</code></pre>

---

## βš™οΈ Settings Management

BrickDjango separates settings by environment:

- `base.py`: Common settings
- `development.py`: For local dev
- `production.py`: For deployment

You can load them using an environment variable in `manage.py` or `wsgi.py`:

**python**
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.development')


---

## πŸ› οΈ Best Practices

- Always create apps via `brickdjango startapp `
- Keep all business logic apps in `apps/`
- Share reusable code via `base/utils/`
- Commit a `.env.example` for environment variables
- Use separate settings for dev and prod

---

## 🧰 Troubleshooting

### πŸ”Έ Error: "Destination directory does not exist"

Make sure `apps/` exists:

**bash**
mkdir -p apps
brickdjango startapp blog


### πŸ”Έ Error: "App already exists"

Choose another app name or remove the existing folder.


---

BrickDjango gives you a strong foundation to build scalable, maintainable Django applications with ease. Whether you're prototyping or building for production, its modular architecture keeps your code clean and your workflow efficient.

We hope BrickDjango helps you build amazing things β€” one brick at a time. 🧱✨

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "brickdjango",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "django, project-structure, starter, boilerplate, brick django",
    "author": "Amol Balpande",
    "author_email": "Amol Balpande <amolbalpande2020@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b5/04/2b75b99bce58448da0aa135253fc5f273e5f88535fb9382dc8c889ef2776/brickdjango-0.3.1.tar.gz",
    "platform": null,
    "description": "\n\ud83d\udd24 \"BrickDjango\" \u2013 Meaning in Depth\nBrickDjango is a metaphorical name that combines:\n\n\"Brick\" \u2013 the basic building block of construction.\n\n\"Django\" \u2013 the popular Python web framework you're customizing.\n\n\ud83e\uddf1 What \u201cBrick\u201d Suggests:\nModularity: Bricks are independent units that come together to form larger structures. Similarly, your Django structure has modular apps, separated settings, and organized layout.\n\nFoundation & Scalability: Bricks form the foundation of a strong, scalable structure. Your custom project structure aims to do the same for Django projects.\n\nSimplicity with Power: Bricks are simple, but powerful when arranged well \u2014 just like your approach to Django project architecture.\n\n\n\n## \ud83d\udcd8 BrickDjango User Guide\n\n\n\nTable of Contents\n\n\n1. Installation\n\n2. Features\n\n3. Getting Started\n\n4. Creating a New Project\n\n5. Creating New Apps\n\n6. Project Structure Overview\n\n7. Configuring Settings\n\n8. Best Practices\n\n9. Troubleshooting\n\n\n\n## \ud83d\udd30 **Introduction**\n\n**BrickDjango** is a custom Django project scaffolding tool that helps developers start Django projects and apps with a modular, scalable, and maintainable folder structure.\n\nThis guide walks you through installing, using, and extending BrickDjango.\n\n---\n\n## \ud83d\udce6 Installation\n\n### Requirements:\n- Python 3.10+\n- `pip` (Python package manager)\n\n### Steps:\n\n1. Clone or install BrickDjango:\n\n**bash**\n`pip install brickdjango`\n\n---\n\n## \u2699\ufe0f Features\n\n- Modular project layout (`apps/`, `config/`, `base/`)\n- CLI for structured app/project creation\n- Automatic app namespacing (`apps.myapp`)\n- Environment-based settings (dev/prod)\n- Follows Django best practices with added organization\n\n---\n\n## \ud83d\ude80 Getting Started\n\nUse the `brickdjango` CLI to bootstrap your projects and apps easily.\n\n---\n\n## \ud83c\udfd7\ufe0f Creating a New Project\n\n**bash**\n`brickdjango startproject <project_name>`\n\n\n\u2705 This command sets up a new Django project with the custom BrickDjango folder layout.\n\n**Example:**\n\n**bash**\n`brickdjango startproject mysite`\n`cd mysite`\n\n\n---\n\n## \ud83e\uddf1 Creating a New App\n\n**bash**\n`brickdjango startapp <app-name>`\n\n    \n\u2705 This creates a Django app inside the `apps/` directory with proper namespace.\n\n**Example:**\n\nbash\n`brickdjango startapp blog`\n\n\ud83d\udd01 This will create: `apps/blog/` and modify `apps.py` like this:\n\n**python**\nfrom django.apps import AppConfig\n\nclass BlogConfig(AppConfig):\n    default_auto_field = 'django.db.models.BigAutoField'\n    name = 'apps.blog'\n\n\nAdd the app to `INSTALLED_APPS` in `config/settings/base.py`:\n\n**python**\nINSTALLED_APPS = [\n    # ...\n    'apps.blog',\n]\n\n\n---\n\n## \ud83d\uddc2\ufe0f Project Structure Overview\n\n<pre><code>\n    \nMaster/\n\u251c\u2500\u2500 base/\n\u2502   \u2514\u2500\u2500 utils/\n\u2502       \u2514\u2500\u2500 utils.py\n\u251c\u2500\u2500 apps/\n\u2502   \u251c\u2500\u2500 __init__.py\n\u2502   \u251c\u2500\u2500 blog/\n\u2502   \u2502   \u251c\u2500\u2500 admin.py\n\u2502   \u2502   \u251c\u2500\u2500 apps.py\n\u2502   \u2502   \u251c\u2500\u2500 models.py\n\u2502   \u2502   \u251c\u2500\u2500 views.py\n\u2502   \u2502   \u251c\u2500\u2500 tests.py\n\u2502   \u2502   \u2514\u2500\u2500 migrations/\n\u251c\u2500\u2500 config/\n\u2502   \u251c\u2500\u2500 settings/\n\u2502   \u2502   \u251c\u2500\u2500 base.py\n\u2502   \u2502   \u251c\u2500\u2500 development.py\n\u2502   \u2502   \u251c\u2500\u2500 production.py\n\u2502   \u2502   \u2514\u2500\u2500 .env\n\u2502   \u251c\u2500\u2500 urls.py\n\u2502   \u251c\u2500\u2500 asgi.py\n\u2502   \u2514\u2500\u2500 wsgi.py\n\u251c\u2500\u2500 manage.py\n\u251c\u2500\u2500 requirements.txt\n\u251c\u2500\u2500 README.md\n\u2514\u2500\u2500 venv/\n\n</code></pre>\n\n---\n\n## \u2699\ufe0f Settings Management\n\nBrickDjango separates settings by environment:\n\n- `base.py`: Common settings\n- `development.py`: For local dev\n- `production.py`: For deployment\n\nYou can load them using an environment variable in `manage.py` or `wsgi.py`:\n\n**python**\nos.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.development')\n\n\n---\n\n## \ud83d\udee0\ufe0f Best Practices\n\n- Always create apps via `brickdjango startapp `\n- Keep all business logic apps in `apps/`\n- Share reusable code via `base/utils/`\n- Commit a `.env.example` for environment variables\n- Use separate settings for dev and prod\n\n---\n\n## \ud83e\uddf0 Troubleshooting\n\n### \ud83d\udd38 Error: \"Destination directory does not exist\"\n\nMake sure `apps/` exists:\n\n**bash**\nmkdir -p apps\nbrickdjango startapp blog\n\n\n### \ud83d\udd38 Error: \"App already exists\"\n\nChoose another app name or remove the existing folder.\n\n\n---\n\nBrickDjango gives you a strong foundation to build scalable, maintainable Django applications with ease. Whether you're prototyping or building for production, its modular architecture keeps your code clean and your workflow efficient.\n\nWe hope BrickDjango helps you build amazing things \u2014 one brick at a time. \ud83e\uddf1\u2728\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A custom Django project structure optimized for scalability, modularity, and maintainability\u2014ideal for both small and large-scale web applications.",
    "version": "0.3.1",
    "project_urls": null,
    "split_keywords": [
        "django",
        " project-structure",
        " starter",
        " boilerplate",
        " brick django"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "be03cfbbf74125f6394c4684c91bedc67de2a2405ad323a36e0862cecd09a80a",
                "md5": "1761c8483f789eef3008d3a29500df8c",
                "sha256": "ffcfe1a52261f85afe3334a41d60c5aa77954a6ca334b8a325549afefcaeff95"
            },
            "downloads": -1,
            "filename": "brickdjango-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1761c8483f789eef3008d3a29500df8c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 10447,
            "upload_time": "2025-08-22T12:19:58",
            "upload_time_iso_8601": "2025-08-22T12:19:58.556020Z",
            "url": "https://files.pythonhosted.org/packages/be/03/cfbbf74125f6394c4684c91bedc67de2a2405ad323a36e0862cecd09a80a/brickdjango-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b5042b75b99bce58448da0aa135253fc5f273e5f88535fb9382dc8c889ef2776",
                "md5": "92b1352b20af6a36c57c2108b4967af1",
                "sha256": "7d0b090fabd71fba3ad4391b4f14e3a8bdc8f259812912015558ffe20154f5f1"
            },
            "downloads": -1,
            "filename": "brickdjango-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "92b1352b20af6a36c57c2108b4967af1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 8355,
            "upload_time": "2025-08-22T12:19:59",
            "upload_time_iso_8601": "2025-08-22T12:19:59.277451Z",
            "url": "https://files.pythonhosted.org/packages/b5/04/2b75b99bce58448da0aa135253fc5f273e5f88535fb9382dc8c889ef2776/brickdjango-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-22 12:19:59",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "brickdjango"
}
        
Elapsed time: 1.19591s