예제 #1
0
from django.contrib import admin

from django.conf import settings
from django.conf.urls.static import static
from hashtags.views import HashTagView
from accounts.views import UserRegisterView
from tweets.api.views import SearchTweetAPIView
from hashtags.api.views import TagTweetAPIView
from tweets.views import TweetListView
from .views import home, SearchView

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', TweetListView.as_view(), name='home'),
    url(r'^search/$', SearchView.as_view(), name='search'),
    url(r'^api/search/$', SearchTweetAPIView.as_view(), name='search-api'),
    url(r'^api/tags/(?P<hashtag>.*)/$',
        TagTweetAPIView.as_view(),
        name='tag-tweet-api'),
    url(r'^tweet/', include('tweets.urls', namespace='tweet')),
    url(r'^tags/(?P<hashtag>.*)/$', HashTagView.as_view(), name='hashtag'),
    url(r'^api/tweet/', include('tweets.api.urls', namespace='tweet-api')),
    url(r'^', include('django.contrib.auth.urls')),
    url(r'^register/$', UserRegisterView.as_view(), name='register'),
    url(r'^accounts/', include('accounts.passwords.urls')),
    url(r'^api/', include('accounts.api.urls', namespace='profiles-api')),
    url(r'^', include('accounts.urls', namespace='profiles')),
]

if settings.DEBUG:
    urlpatterns += (static(settings.STATIC_URL,
예제 #2
0
from django.conf import settings
from django.conf.urls.static import static

from accounts.views import UserRegisterView
from hashtags.api.views import TagTweetAPIView
from hashtags.views import HashTagView
from tweets.api.views import SearchTweetAPIView
from tweets.views import TweetListView
from .views import home, SearchView

urlpatterns = [
    path('', TweetListView.as_view(), name="home"),
    path('search/', SearchView.as_view(), name="search"),
    path('admin/', admin.site.urls),
    path('api/tweet/', include('tweets.api.urls')),
    path('api/tags/<slug:hashtag>/',
         TagTweetAPIView.as_view(),
         name="tag-tweet-api"),
    path('api/search/', SearchTweetAPIView.as_view(), name="search-api"),
    path('api/', include('accounts.api.urls')),
    path('tags/<slug:hashtag>/', HashTagView.as_view(), name="hashtag"),
    path('tweet/', include('tweets.urls')),
    path('register/', UserRegisterView.as_view(), name="register"),
    path('', include('django.contrib.auth.urls')),
    path('', include('accounts.urls')),
]

if settings.DEBUG:
    urlpatterns += (static(settings.STATIC_URL,
                           document_root=settings.STATIC_ROOT))
예제 #3
0
파일: urls.py 프로젝트: MdStart/Tweetme
from django.contrib import admin

from django.conf import settings
from django.conf.urls.static import static

from accounts.views import UserRegisterView

from hashtags.api.views import TagTweetAPIView
from hashtags.views import HashTagView
from tweets.api.views import SearchTweetAPIView
from tweets.views import TweetListView
from .views import home, SearchView

urlpatterns = [
    url(r'^admin/', admin.site.urls), #admin/
    url(r'^$', TweetListView.as_view(), name='home'), #/
    url(r'^search/$', SearchView.as_view(), name='search'), #/
    url(r'^tags/(?P<hashtag>.*)/$', HashTagView.as_view(), name='hashtag'),
    url(r'^tweet/', include('tweets.urls', namespace='tweet')),
    url(r'^api/tags/(?P<hashtag>.*)/$', TagTweetAPIView.as_view(), name='tag-tweet-api'), 
    url(r'^api/search/$', SearchTweetAPIView.as_view(), name='search-api'), 
    url(r'^api/tweet/', include('tweets.api.urls', namespace='tweet-api')),
    url(r'^api/', include('accounts.api.urls', namespace='profiles-api')),
    url(r'^register/$', UserRegisterView.as_view(), name='register'), #/
    url(r'^', include('django.contrib.auth.urls')),
    url(r'^', include('accounts.urls', namespace='profiles')),
]


if settings.DEBUG:
    urlpatterns += (static(settings.STATIC_URL, document_root=settings.STATIC_ROOT))
예제 #4
0
파일: urls.py 프로젝트: GolouHamady/tweet
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static

from hashtags.views import HashTagView
from hashtags.api.views import TagTweetAPIView
from tweets.api.views import SearchTweetAPIView
from tweets.views import TweetListView
from .views import home, SearchView
from accounts.views import UserRegisterView

urlpatterns = [
    path('admin/', admin.site.urls),
    path(r'', TweetListView.as_view(), name='list'),
    path(r'search/', SearchView.as_view(), name='search'),
    path(r'profiles/', include('accounts.urls', namespace='profiles')),
    path(r'tags/<str:hashtag>/', HashTagView.as_view(), name='hashtag'),
    path(r'tweets/', include('tweets.urls', namespace='tweets')),
    path(r'api/tweet/', include('tweets.api.urls', namespace='tweets-api')),
    path(r'api/', include('accounts.api.urls', namespace='profiles-api')),
    path(r'api/search/', SearchTweetAPIView.as_view(), name='search-api'),
    path(r'api/tags/<str:hashtag>/',
         TagTweetAPIView.as_view(),
         name='tag-tweet-api'),
    path(r'', include('django.contrib.auth.urls')),
    path(r'register/', UserRegisterView.as_view(), name='register'),
]

if settings.DEBUG:
    urlpatterns += (static(settings.STATIC_URL,
                           document_root=settings.STATIC_ROOT))