Exemplo n.º 1
0
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,
                           document_root=settings.STATIC_ROOT))
Exemplo n.º 2
0
from django.conf.urls.static import static
from django.conf.urls import url,include
from tweets.views import TweetListView
from hashtags.api.views import TagTweetAPIView
from tweets.api.views import SearchTweetAPIView
from hashtags.views import HashTagView
from . views import home,SearchView
from accounts.views import UserRegisterView

urlpatterns = [
    path('admin/', admin.site.urls),
    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'^api/tags/(?P<hashtag>.*)/$',TagTweetAPIView.as_view(),name='tag-tweet-api'),
    url(r'^api/search/$',SearchTweetAPIView.as_view(),name='search-api'),
     url(r'^',include(('hashtags.urls','hashtags'),namespace='hashtag')),
    url(r'^tweet/',include(('tweets.urls','tweet'),namespace='tweet')),

    url(r'^api/tweet/',include(('tweets.api.urls','tweet'),namespace='tweet-api')),
     url(r'^api/',include(('accounts.api.urls','accounts'),namespace='profiles-api')),
     url(r'^',include('django.contrib.auth.urls')),
      url(r'^register/$',UserRegisterView.as_view(),name='register'),
    
    
    url(r'^',include(('accounts.urls','accounts'),namespace='profiles')),
]
if settings.DEBUG:
	urlpatterns+=static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Exemplo n.º 3
0
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))
Exemplo n.º 4
0
"""
from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from .views import home, SearchView
from tweets.views import tweet_list_view
from hashtags.views import hashtagview #, HashTagView
from tweets.api.views import SearchTweetAPIView
from hashtags.api.views import TagTweetAPIView
from accounts.views import UserRegisterView

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

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