# -*- coding: utf-8 -*- # @File : urls.py # @Author :WeiSanJin # @Time :2021/04/07 15:16 # @Site :https://github.com/WeiSanJin from django.conf.urls import url from apps.operations.views import AddFavView, CommentView urlpatterns = [ # 用户收藏 url(r'^fav/$', AddFavView.as_view(), name="fav"), # 用户评论 url(r'^comment/$', CommentView.as_view(), name="comment"), ]
from django.conf.urls import url from apps.operations.views import AddFavView, CommentView urlpatterns = [ url(r'^fav/$', AddFavView.as_view(), name='fav'), url(r'^comment/$', CommentView.as_view(), name='comment'), ]
from django.conf.urls import url from apps.operations.views import AddFavView, CommentView urlpatterns = [ # 添加收藏,删除收藏接口 url( r'^fav/$', AddFavView.as_view(), name='fav', ), url( r'^comment/$', CommentView.as_view(), name='comment', ), ]
from django.urls import path,re_path from apps.operations.views import AddFavView,CommentView urlpatterns = [ re_path("^fav/$",AddFavView.as_view(),name="fav"), re_path("^comment/$",CommentView.as_view(),name="comment"), ]
from django.urls import path from apps.operations.views import AddFavView, CommentView app_name = 'op' urlpatterns = [ path('fav/', AddFavView.as_view(), name='fav'), path('comment/', CommentView.as_view(), name='comment'), ]