Lookaway App Profile URLs

Written by Kyle Bruder, published on April 5, 2021, 1:40 a.m., last updated on April 5, 2021, 1:53 a.m.


logo


This document will explain how to configure URLs for Lookaway App Profiles.


  1. Import the Views

    foo/urls.py
    from django.urls import path
    import foo.views as views

    Source: kbruder Tech


  2. Add the Paths

    foo/urls.py
    app_name = 'foo'
    
    urlpatterns = [
        # Foo landing page
        path(
            '',
            views.FooPageView.as_view(),
            name="foo_page",
        ),
        # Foo app profile
        ## Update
        path(
            'profile/update/<int:pk>/', 
            views.FooAppProfileUpdateView.as_view(),
            name='foo_app_profile_update',
        ),
        # Foo landing page section views
        ## Create
        path(
            'add/section/', 
            views.FooPageSectionCreateView.as_view(),
            name='foo_page_section_create',
        ),
        ## Detail
        path(
            'sections/<int:pk>/',
            views.FooPageSectionDetailView.as_view(),
            name='foo_page_section_detail',
        ),
        ## Update
        path(
            'update/section/<int:pk>/', 
            views.FooPageSectionUpdateView.as_view(),
            name='foo_page_section_update',
        ),
        ## Delete
        path(
            'delete/section/<int:pk>/',
            views.FooPageSectionDeleteView.as_view(),
            name='foo_page_section_delete',
        ),

    Source: kbruder Tech



Referenced by

App Profile Design Patterns - Lookaway CMS

Lookaway CMS comes with class mixins that can be used when writing new apps. These powerful customization features can extend your models and views.

bitcoin:3MnhNRKgrpTFQWstYicjF6GebY7u7dap4u
Bitcoin Accepted Here

3MnhNRKgrpTFQWstYicjF6GebY7u7dap4u

Please donate some Bitcoin to our site. We can use it to keep improving the site and open up to more members. Any amount will help. Thank you.


litecoin:MT61gm6pdp9rJoLyMWW5A1hnUpxAERnxqg
Litecoin Accepted Here

MT61gm6pdp9rJoLyMWW5A1hnUpxAERnxqg

Please donate some Lite to our site. We can use it to keep improving the site and open it up to more members. Any amount will help. Thank you.


Lookaway: Development Django Python Lookaway: CMS

Contributed by Kyle Bruder on April 5, 2021, 1:40 a.m.
Last updated on April 5, 2021, 1:53 a.m.