2021-04-28 02:47:33 +00:00
|
|
|
from django.conf.urls.static import static
|
2021-10-21 14:00:25 +00:00
|
|
|
from django.urls import path, include
|
2020-09-06 02:00:45 +00:00
|
|
|
|
2020-09-06 03:12:54 +00:00
|
|
|
from main import views
|
2020-09-12 17:04:34 +00:00
|
|
|
from main.feed import MainFeed
|
2021-04-28 02:47:33 +00:00
|
|
|
from whispermaphone import settings
|
2020-09-06 03:12:54 +00:00
|
|
|
|
2021-12-15 14:29:30 +00:00
|
|
|
from haystack.views import SearchView
|
|
|
|
from haystack.forms import SearchForm
|
|
|
|
|
2020-09-06 02:00:45 +00:00
|
|
|
urlpatterns = [
|
2020-09-06 03:38:15 +00:00
|
|
|
path("", views.index, name="index"),
|
2022-01-06 19:20:47 +00:00
|
|
|
path("about", views.about, name="about"),
|
|
|
|
path("post", views.post, name="post"),
|
|
|
|
path("feed", MainFeed()),
|
|
|
|
path("search", SearchView(form_class=SearchForm), name="thoughts_search")
|
2021-04-28 02:47:33 +00:00
|
|
|
] + (static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG else [])
|