from django.conf import settings from django.urls import include, re_path from django.views.static import serve from django.urls import path from django.contrib.auth import views as auth_views from catalog import views, fans, reactions, reviews, paypal, streams, newsletter, shop_stripe from catalog.admin import studio urlpatterns = [ path('', views.home, name='home'), path('admin/', studio.urls), path('shop/', include('shop.urls')), path('chapters/', views.chapters, name='chapters'), path('chapters//', views.chapter, name='chapter'), path('chapters//discussion/', views.chapter_discussion, name='chapter-discussion'), path('chapters//reviews/', reviews.listing, name='slx-reviews'), path('chapters//reviews/write/', reviews.write, name='slx-review-write'), path('chapters//reviews//', reviews.detail, name='slx-review'), path('reviews/', reviews.series_listing, name='slx-series-reviews'), path('reviews/write/', reviews.series_write, name='slx-series-review-write'), path('reviews//', reviews.series_detail, name='slx-series-review'), path('reviews/chapter//pages/', reviews.page_choices, name='slx-review-pages'), path('readers//', reviews.profile, name='slx-profile'), path('fan/react///', reactions.react, name='slx-react'), path('blog/', views.entries, {'kind': 'news'}, name='blog'), path('blog//', views.entry, {'kind': 'news'}, name='blog-post'), path('upcoming/', views.upcoming, name='upcoming'), path('live/', views.stream, name='stream'), path('live/comment/', streams.post_comment, name='stream-comment'), path('community/', views.community, name='slx-community'), path('search/', views.search, name='search'), path('fan/login/', auth_views.LoginView.as_view(template_name='registration/fan-login.html'), name='fan-login'), path('fan/logout/', auth_views.LogoutView.as_view(next_page='home'), name='fan-logout'), path('fan/signup/', fans.signup, name='fan-signup'), path('fan/library/', fans.library, name='library'), path('fan/follow/', fans.follow_title, name='fan-follow'), path('fan/notifications/', fans.notices, name='fan-notices'), path('fan/action///', fans.act, name='fan-action'), path('books/', paypal.books, name='books'), path('books/checkout///', shop_stripe.checkout, name='shop-stripe-checkout'), path('books/payment//', shop_stripe.receipt, name='shop-stripe-receipt'), path('webhooks/stripe/shop/', shop_stripe.webhook, name='shop-stripe-webhook'), path('chapters//checkout/', paypal.start, name='paypal-start'), path('checkout/paypal//', paypal.returned, name='paypal-return'), path('checkout/paypal//finish/', paypal.finish, name='paypal-finish'), path('coming-soon/', views.coming_soon, name='coming-soon'), path('media/images/', views.image, name='image'), re_path(r'^media/shop/(?P.*)$', serve, {'document_root': settings.MEDIA_ROOT / 'shop'}), path('healthz/', views.health, name='health'), path('newsletter/', newsletter.signup, name='newsletter-signup'), path('newsletter/confirm//', newsletter.confirm, name='newsletter-confirm'), path('newsletter/unsubscribe//', newsletter.unsubscribe, name='newsletter-unsubscribe'), path('newsletter/one-click//', newsletter.one_click, name='newsletter-one-click'), path('/', views.entries, name='entries'), path('//', views.entry, name='entry'), ]