Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在URL上没有用户的情况下,如何使用django userena_Django_Url_Django Users - Fatal编程技术网

在URL上没有用户的情况下,如何使用django userena

在URL上没有用户的情况下,如何使用django userena,django,url,django-users,Django,Url,Django Users,标准django userena URL的预期用户名位于URL上: /accounts/USER/ # for profile view /accounts/USER/edit/ # to edit the profile 我的用户配置文件将全部关闭,因此我希望我的url不包括用户: /accounts/ # would show the profile view (or signin if they aren't logged in) /accounts/edit/ # to edit t

标准django userena URL的预期用户名位于URL上:

/accounts/USER/  # for profile view
/accounts/USER/edit/ # to edit the profile
我的用户配置文件将全部关闭,因此我希望我的url不包括用户:

/accounts/ # would show the profile view (or signin if they aren't logged in)
/accounts/edit/ # to edit the profile

有没有一个简单的方法可以做到这一点?

浏览他们的文档,看起来不是这样的。您需要为此编写自己的URL/视图。

浏览他们的文档,看起来不是这样。你需要为此编写自己的URL/视图。

显然正如girasquid指出的那样,没有任何内置内容-主要是因为他们在不同的地方硬编码了一些路径,但也有一些其他假设。显然,正如girasquid指出的那样,这里面没有内置的东西——主要是因为他们在不同的地方硬编码了一些路径,但也有一些其他的假设。我用叉子叉了我自己的副本,并把它砍掉了。