<legend id='eOUvo'><style id='eOUvo'><dir id='eOUvo'><q id='eOUvo'></q></dir></style></legend>
<tfoot id='eOUvo'></tfoot>

<small id='eOUvo'></small><noframes id='eOUvo'>

  • <i id='eOUvo'><tr id='eOUvo'><dt id='eOUvo'><q id='eOUvo'><span id='eOUvo'><b id='eOUvo'><form id='eOUvo'><ins id='eOUvo'></ins><ul id='eOUvo'></ul><sub id='eOUvo'></sub></form><legend id='eOUvo'></legend><bdo id='eOUvo'><pre id='eOUvo'><center id='eOUvo'></center></pre></bdo></b><th id='eOUvo'></th></span></q></dt></tr></i><div id='eOUvo'><tfoot id='eOUvo'></tfoot><dl id='eOUvo'><fieldset id='eOUvo'></fieldset></dl></div>

      • <bdo id='eOUvo'></bdo><ul id='eOUvo'></ul>

      1. Django Admin 的“现场查看"指向 example.com 而不是我的域

        Django Admin#39;s quot;view on sitequot; points to example.com instead of my domain(Django Admin 的“现场查看指向 example.com 而不是我的域)
          <legend id='e0OmO'><style id='e0OmO'><dir id='e0OmO'><q id='e0OmO'></q></dir></style></legend>
          • <i id='e0OmO'><tr id='e0OmO'><dt id='e0OmO'><q id='e0OmO'><span id='e0OmO'><b id='e0OmO'><form id='e0OmO'><ins id='e0OmO'></ins><ul id='e0OmO'></ul><sub id='e0OmO'></sub></form><legend id='e0OmO'></legend><bdo id='e0OmO'><pre id='e0OmO'><center id='e0OmO'></center></pre></bdo></b><th id='e0OmO'></th></span></q></dt></tr></i><div id='e0OmO'><tfoot id='e0OmO'></tfoot><dl id='e0OmO'><fieldset id='e0OmO'></fieldset></dl></div>
              <tbody id='e0OmO'></tbody>
          • <small id='e0OmO'></small><noframes id='e0OmO'>

              <bdo id='e0OmO'></bdo><ul id='e0OmO'></ul>
              1. <tfoot id='e0OmO'></tfoot>

                1. 本文介绍了Django Admin 的“现场查看"指向 example.com 而不是我的域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我为我的一个模型添加了一个 get_absolute_url 函数.

                  I added a get_absolute_url function to one of my models.

                  def get_absolute_url(self):
                      return '/foo/bar' 
                  

                  管理站点选择它并向该对象的详细信息页面添加一个现场查看"链接(当我在那里放置一个真实的 URL 而不是/foo/bar"时).

                  The admin site picks it up and adds a "view on site" link to the detail page for that object (when I put a real URL there instead of "/foo/bar").

                  问题不是去http://localhost:8000/foo/bar,而是去http://example.com/foo/bar.

                  我做错了什么?

                  推荐答案

                  你必须改变 默认站点 域值.

                  这篇关于Django Admin 的“现场查看"指向 example.com 而不是我的域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  groupby multiple coords along a single dimension in xarray(在xarray中按单个维度的多个坐标分组)
                  Group by and Sum in Pandas without losing columns(Pandas中的GROUP BY AND SUM不丢失列)
                  Group by + New Column + Grab value former row based on conditionals(GROUP BY+新列+基于条件的前一行抓取值)
                  Groupby and interpolate in Pandas(PANDA中的Groupby算法和插值算法)
                  Pandas - Group Rows based on a column and replace NaN with non-null values(PANAS-基于列对行进行分组,并将NaN替换为非空值)
                  Grouping pandas DataFrame by 10 minute intervals(按10分钟间隔对 pandas 数据帧进行分组)
                  <i id='zbHxU'><tr id='zbHxU'><dt id='zbHxU'><q id='zbHxU'><span id='zbHxU'><b id='zbHxU'><form id='zbHxU'><ins id='zbHxU'></ins><ul id='zbHxU'></ul><sub id='zbHxU'></sub></form><legend id='zbHxU'></legend><bdo id='zbHxU'><pre id='zbHxU'><center id='zbHxU'></center></pre></bdo></b><th id='zbHxU'></th></span></q></dt></tr></i><div id='zbHxU'><tfoot id='zbHxU'></tfoot><dl id='zbHxU'><fieldset id='zbHxU'></fieldset></dl></div>
                    <legend id='zbHxU'><style id='zbHxU'><dir id='zbHxU'><q id='zbHxU'></q></dir></style></legend>

                    <small id='zbHxU'></small><noframes id='zbHxU'>

                          <tbody id='zbHxU'></tbody>

                        <tfoot id='zbHxU'></tfoot>

                            <bdo id='zbHxU'></bdo><ul id='zbHxU'></ul>