【问题标题】:how to change default user profile address in osqa如何在 osqa 中更改默认用户配置文件地址
【发布时间】:2012-08-24 20:02:18
【问题描述】:

我正在开发一个基于网络的程序,我想在其中使用 osqa 作为问答模块。我不再需要 osqa 配置文件,所以我想将用户重定向到另一个地址。 现在 osqa 中的 url 配置文件类似于 this,我想将其更改为 this。我怎样才能做到这一点?

【问题讨论】:

    标签: python osqa


    【解决方案1】:

    如果我没听错的话,您想显示基于 Web 程序的用户个人资料,而不是 OSQA 个人资料,对吗?

    我看到的最简单的方法是将用户从正确的 Django 视图重定向。 在 forum/views/users.py 转到第 340 行,这是 user_profile 视图。该方法的第一行如下:

    profileUrl = 'http://www.hamcodi.ir/members/' + str(user.id) + '/' + user.username + '/'
    return HttpResponseRedirect(profileUrl)
    

    然后对你的程序进行适当的处​​理。

    【讨论】:

      猜你喜欢
      • 2023-03-23
      • 2013-12-16
      • 1970-01-01
      • 1970-01-01
      • 2013-10-07
      • 2019-11-06
      • 1970-01-01
      • 2018-11-12
      • 2019-04-25
      相关资源
      最近更新 更多