slug

    2熱度

    1回答

    我是相當新的Django,我希望我能夠正確地制定我的問題,請裸露在我身邊。 我有什麼權利現在: 一個簡單的個人網站,一個博客節。當我從導航欄轉到不同的列表項目時,如果li處於活動狀態,它將添加一個「激活」類。問題發生在我的博客部分。 我想實現: 當我添加了「激活」類的博客節和博客這樣的鏈接將被激活。我用我的帖子網址slu g。 我有什麼權利現在它不工作: template.html <li cla

    0熱度

    2回答

    我有添加帖子表單來添加新帖子。我已將post職位視爲post_url或slug。我想要獨特的post_url。 以下是我迄今所做的 - $post_name = $this->input->post('post_title'); function clean($post_name) { $name = trim($post_name); $post_name = str_re

    1熱度

    1回答

    我有一個django-autoslug領域的典範: class Article(models.Model): headline = models.TextField() content = models.TextField() slug = AutoSlugField(populate_from='headline', max_length=128, allow_u

    0熱度

    3回答

    我剛將一個Laravel網站推送到共享主機上。複製公共文件夾到/ www,更改index.php以反映路徑更改並配置我的.htaccess等。 起初我只是收到一個錯誤,告訴我Page :: findBySlug()返回空值。再次用dd()再次檢查,was仍然是null。 FrontendController @指數正在尋找這樣 public function index($slug) {

    0熱度

    1回答

    在本地主機萬事都很好,但我已經部署了個項目後,我得到這個錯誤 [Semantical Error] The annotation "@Gedmo\Mapping\Annotation\slug" in property AppBundle\Entity\Product::$slug does not exist, or could not be auto-loaded. 這是類產品 use

    1熱度

    1回答

    您好我使用friendly_id寶石, class Student < ActiveRecord::Base extend FriendlyId friendly_id :name, use: :slugged 這裏根據需要Student.create產生蛞蝓爲名稱。 但在我而言,我使用「新」的方法創造學生的陣列,通過保存到數據庫的活動記錄導入 student_names.

    0熱度

    1回答

    我遇到了麻煩,當我使用slu for我的網址。它表示沒有帖子匹配查詢。 在編輯和刪除頁面發生的麻煩,事實證明,細節頁面內仍然正常工作。 但奇怪的是404錯誤是由post.views.post_detail而不是post_update引發的。 我的網址後內部應用程序 urlpatterns = [ url(r'r^$', post_list, name='list'), url(r'^crea

    1熱度

    2回答

    我有一個django在功能方面接近電子商務網站的項目。 有四頁鏈接彼此。第一頁顯示分類,第二小類,第3 產品列表和第4 產品詳細和我使用蛞蝓導航。 ERROR Reverse for 'product-list' with arguments '('', 'women-clothes')' and keyword arguments '{}' not found. 1 pattern(s) tri

    -1熱度

    2回答

    我正在使用slugify,並且我不知道如何讓我的帖子標題重新開始,我是否需要在我的帖子中創建一個新列?我一整天都被困在這裏。 有什麼建議嗎? Views.py @app.route('/posts/<title>') @login_required def show(title): link = db.session.query(Post).filter_by(title = ti

    0熱度

    1回答

    我想呼應多個catgory,蛞蝓,而不是在一個WordPress環路的分類名在archive.php 我的代碼看起來是這樣的,我嘗試了很多到目前爲止,但似乎沒有任何工作。所有我實現了接收一個類別的第一毛坯,但不是所有的人: <li class="<?php the_category(' '); ?> "> <div class="content"> <h4><?php t