{% extends 'doc/en/base.html' %}
{% load static %}
{% block content %}
{% verbatim %}
<h1 class="text-white"><blitztext>Blitz Work's</blitztext> urls</h1>
<pre><code>
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))),
]
</code></pre>
<p class="text-white"><blitztext>Blitz Work</blitztext> uses five URLs. (&lt;crudname&gt;/view), 
(&lt;crudname&gt;/detail), (&lt;crudname&gt;/create), (&lt;crudname&gt;/update), (&lt;crudname&gt;/delete).</p>
<p class="text-white">When executing:</p>
<pre><code>
path('book/', include(get_urls(BookCRUD,"book"))),
</code></pre>
<p class="text-white">The following URLs are created:</p>
<pre><code>
'book/view/' [name= "book/view"]
'book/create/' [name= "book/create"]
'book/detail/' [name= "book/detail"]
'book/update/' [name= "book/update"]
'book/delete/' [name= "book/delete"]
</code></pre>
<p class="text-white">The second parameter specified in the get_urls function (..., ...) corresponds to the name
that will have the URL.This parameter can be omitted, when omitted <blitztext>Blitz Work</blitztext> will use
The verbose_name of the specified model.</p>
<p class="text-white">Al ejecutar:</p>
<pre><code>
path('book/', include(get_urls(BookCRUD))),
</code></pre>
<p class="text-white">For this model:</p>
<pre><code>
class Book(models.Model):
    ...
    class Meta:
        verbose_name = "example"
</code></pre>
<p class="text-white">The following URLs are created:</p>
<pre><code>
'book/view/' [name= "example/view"]
'book/create/' [name= "example/create"]
'book/detail/' [name= "example/detail"]
'book/update/' [name= "example/update"]
'book/delete/' [name= "example/delete"]
</code></pre>
<p class="text-white">You can access these URLs from a template as follows:</p>
<pre><code>
&lt;a href="{% url 'example/view' %}"&gt;Books&lt;/a&gt;
</code></pre>
{% endverbatim %}
{% endblock content %}