Skip to main content

Blitz Work

Blitz Work is a Django-based framework for rapid application development

How to use

  1. Add blitz_work to installed apps in settings.py.

    INSTALLED_APPS = [
     ...,
     ...,
     'blitz_work',
    ]
    
  2. Create the models.

    from django.db import models
    
    
     class Author(models.Model):
         name = models.CharField(verbose_name="Name", max_length=255)
         birth_date = models.DateField(verbose_name="Birth date")
    
    
         class Meta:
             verbose_name = "Author"
             verbose_name_plural = "Authors"
    
         def __str__(self):
             return self.name
    
    
    
     class Book(models.Model):
         title = models.CharField(verbose_name="Title", max_length=255)
         publication_date = models.DateField(verbose_name="Publication date")
         authors = models.ManyToManyField(Author,verbose_name="Authors")
    
    
         class Meta:
             verbose_name = "Book"
             verbose_name_plural = "Books"
    
         def __str__(self):
             return self.title
    
  3. Create the template.

        {% extends 'blitz_base_offline.html' %}
        {% block main %}
            <nav class="navbar navbar-expand-lg navbar-light bg-light">
                <a class="navbar-brand" href="#">Test</a>
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <div class="collapse navbar-collapse" id="navbarNavDropdown">
                    <ul class="navbar-nav">
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'book/view' %}">Libros</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'author/view' %}">Autores</a>
                    </li>
                    </ul>
                </div>
            </nav>
            {% block content %}{% endblock %}
        {% endblock %}
    
  4. Create the views.

        from Book.models import Author, Book
        from blitz_work.blitzcrud import BlitzCRUD
    
    
        class BookCRUD(BlitzCRUD):
            show_title = True
            show_caption = False
            caption_is_title = True
            extend_template = "base.html"
            data = Book
    
        class AuthorCRUD(BlitzCRUD):
            show_title = True
            show_caption = False
            caption_is_title = True
            extend_template = "base.html"
            data = Author
    
  5. Include the URLs.

     from app.views import AuthorCRUD, BookCRUD
     from django.urls import path,include
     from blitz_work.blitzcrud import get_urls
    
     urlpatterns = [
         path('book/', include(get_urls(BookCRUD,"book"))),
         path('author/', include(get_urls(AuthorCRUD,"author"))),
     ]
    
  6. More help

    1. Include Blitz Work help urls in urls.py

      from blitz_work.urls import urlpatterns
      
      urlpatterns = [
           path('',include(urlpatterns)),
      ]
      
    2. Run the server.

      python manage.py runserver localhost:8000
      
    3. Go to the url blitz-doc-en/ or blitz-doc-es/

Metadata

Release files for blitz-work 0.6.70

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for blitz-work 0.6.70
File Size Uploaded
blitz_work-0.6.70.tar.gz 2.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for blitz-work 0.6.70
File Interpreter ABI Platform
blitz_work-0.6.70-py3-none-any.whl Python 3 none any Details

Total release size: 4.5 MB

Release files / blitz_work-0.6.70.tar.gz

Download URL blitz_work-0.6.70.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
cde97e70aedabedca515116e414746864ce3a205bed64af4626e7476c7af1821
BLAKE2b-256 checksum
How to use checksums
47b47a9119dfc55e7c0ecbaa6f178955118aa254287c6cd6eb0ac4dba9aae3e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.8.1 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.6

Release files / blitz_work-0.6.70-py3-none-any.whl

Download URL blitz_work-0.6.70-py3-none-any.whl
Size 2.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
eef46963ad7392773d1c9487049d1d498b8cd0ffc1c7e048dfb3b1165eb9f587
BLAKE2b-256 checksum
How to use checksums
9be05ea689657f8ca337242b5ff0a9d7d5a9ca0dc8691f70d97e577a393c130c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.8.1 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.6.70 This release

2 release files

0.6.46

2 release files

0.6.45

2 release files

0.6.38

2 release files

0.6.31

2 release files

0.6.18

2 release files

0.6.17

2 release files

0.6.10

2 release files

0.6.0

2 release files

0.5.23

2 release files

0.5.22

2 release files

0.5.20

2 release files

0.5.0

2 release files

0.4.26

2 release files

0.4.20

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.4

2 release files

0.3.5

2 release files

0.3.0

2 release files

0.2.35

2 release files

0.2.7

2 release files

0.2.0

2 release files

0.1.23

2 release files

0.1.19

2 release files

0.1.12

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page