Skip to content

sona-user-369/django-startup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Startup 🚀

Django Startup is a lightweight library designed to help developers quickly scaffold and set up a Django environment with pre-integrated functions and operations. Whether you're starting a new project or need to streamline your development process, Django Startup automates the creation of essential files and configurations to get you up and running faster!

Features ✨

  • File & Package Generation: Automatically generates key files and packages, including the default authentication app.
  • Pre-configured settings.py: Includes all the necessary configurations to make your Django setup work right out of the box.
  • App Boilerplate: Generates serializers, utility functions, and views for any new app you create.
  • Documentation Generation: Automatically generates initial documentation for your Django app to help onboard new team members or improve project clarity.
  • Test Pipelines: Sets up a testing pipeline for views, ensuring your code is always production-ready.
  • Data Samples: Generates sample data for models, so you can start testing and developing immediately.
  • Model-based Serializer Generation: Automatically creates serializers based on your Django models to reduce boilerplate code.

Installation 🛠️

To get started with Django Startup, simply install it via pip:

pip install django-startup

Quick Start 🚀

Once installed, you can quickly start a new Django project with pre-configured features by following these steps:

  1. Create a new Django project:

    djs project your_project_name
  2. Install Django Startup in your project’s virtual environment:

    pip install django-startup
  3. Generate your app boilerplate by running:

    python manage.py generate_app your_app_name

    This will create necessary files like serializers, utils, views, and even sample data for your app!

  4. Run migrations and start your server:

    python manage.py migrate
    python manage.py runserver

    You are now ready to start building your Django app with less manual setup!

Configuration 🔧

The settings.py file comes pre-configured with essential Django settings, including default configurations for:

  • Database settings (supports default SQLite setup, but easily customizable)
  • Authentication & Permissions (with default Auth app included)
  • Static & Media Files configuration
  • Logging, Caching, and Security settings

Documentation 📚

Django Startup automatically generates a starting point for your project’s documentation, including:

  • A README template
  • App-specific documentation
  • Example API documentation

This helps you maintain project clarity and improve onboarding for new contributors.

Tests 🧪

Django Startup sets up a test pipeline for your views, so you can focus on writing business logic rather than worrying about testing setup.

  • Automatically creates test cases for each view.
  • Provides sample test data based on the generated models.

You can run tests with:

python manage.py test

Usage Example 💡

Here’s a simple example of how you can use Django Startup to quickly generate an app and start developing.

  1. Create a new app:

    python manage.py generate_app blog
  2. This will generate:

    • serializers.py: Serializers for your models.
    • views.py: Pre-defined views for common operations.
    • utils.py: Utility functions for common operations.
    • Sample data for your models.
  3. Create models and migrations as usual:

    from django.db import models
    
    class Post(models.Model):
        title = models.CharField(max_length=100)
        body = models.TextField()
        created_at = models.DateTimeField(auto_now_add=True)
  4. Run migrations:

    python manage.py makemigrations
    python manage.py migrate
  5. Your serializers and views are already generated, ready for customization!

Contributing 🤝

We welcome contributions to improve Django Startup! Here’s how you can help:

  1. Fork the repository.
  2. Clone your fork locally.
  3. Create a new branch for your changes.
  4. Make the changes you want and test them locally.
  5. Create a pull request with a detailed description of your changes.

License 📜

This project is licensed under the MIT License - see the LICENSE file for details.


Django Startup aims to make your development process quicker and more efficient. By automating tedious setup tasks, you can focus on building features and solving problems instead of worrying about configurations.

Happy coding! 😄

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages