Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoReverseMatch at /en/programs/course/allocated/ #8

Open
lai-bluejay opened this issue Jan 14, 2025 · 0 comments
Open

NoReverseMatch at /en/programs/course/allocated/ #8

lai-bluejay opened this issue Jan 14, 2025 · 0 comments

Comments

@lai-bluejay
Copy link

Describe the bug
When I create program and want to allocate it or add course for the program, the SkyLearn catched errors.
To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Course allocate'
  2. See error
<p style="padding: 0px; margin: 0px;"><code style="padding: 0px; margin: 0px; font-size: 12px; white-space: pre-wrap;">/SkyLearn/templates/course/course_allocation_view.html</code>, error at line<span> </span><strong style="padding: 0px; margin: 0px;">45</strong></p><h3 style="padding: 0px; margin: 1em 0px 0.5em;">Reverse for 'course_detail' with keyword arguments '{'slug': ''}' not found. 1 pattern(s) tried: ['en/programs/course/(?P&lt;slug&gt;[^/]+)/detail/\\Z']</h3>
35 | <th>{% trans 'Action' %}</th>
-- | --
{% endif %}
</tr>
</thead>
{% for course in filter.qs %}
<tbody>
<tr>
<td> {{ forloop.counter }}.</td>
<td><a href="{{ course.lecturer.get_absolute_url }}">{{ course.lecturer.get_full_name }}</a></td>
<td><div class="flex">{% for i in course.courses.all %}
<div class="flex"><a class="edit-btn" href="{{ i.get_absolute_url }}">{{ i }}</a></div>
{% endfor %}</div>
</td>
{% if request.user.is_superuser %}
<td><div class="update-delete">
<a href="{% url 'edit_allocated_course' pk=course.pk %}" class="update" title="{% trans 'Edit or Update' %}">
<i class="fas fa-edit"></i>
</a>
<a href="{% url 'course_deallocate' pk=course.pk %}" class="delete" title="{% trans 'Deallocate' %}">
<i class="fas fa-trash-alt"></i>


harset='utf-8'><p style="padding: 0px; margin: 0px;"><code style="padding: 0px; margin: 0px; font-size: 12px; white-space: pre-wrap;">/SkyLearn/templates/course/course_allocation_view.html</code>, error at line<span> </span><strong style="padding: 0px; margin: 0px;">45</strong></p><h3 style="padding: 0px; margin: 1em 0px 0.5em;">Reverse for 'course_detail' with keyword arguments '{'slug': ''}' not found. 1 pattern(s) tried: ['en/programs/course/(?P&lt;slug&gt;[^/]+)/detail/\\Z']</h3><table class="source cut-top
       cut-bottom" style="padding: 0px; margin: 0px; border: 1px solid rgb(204, 204, 204); border-collapse: collapse; width: 1464px; background: white;"><tbody style="padding: 0px; margin: 0px;"><tr style="padding: 0px; margin: 0px;"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102);">35</th><td style="padding: 2px 3px; margin: 0px; vertical-align: top; font-family: monospace; white-space: pre; border-bottom: 1px solid rgb(238, 238, 238);">                &lt;th&gt;{% trans 'Action' %}&lt;/th&gt;
</td></tr><tr style="padding: 0px; margin: 0px;"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102);">36</th><td style="padding: 2px 3px; margin: 0px; vertical-align: top; font-family: monospace; white-space: pre; border-bottom: 1px solid rgb(238, 238, 238);">                {% endif %}
</td></tr><tr style="padding: 0px; margin: 0px;"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102);">37</th><td style="padding: 2px 3px; margin: 0px; vertical-align: top; font-family: monospace; white-space: pre; border-bottom: 1px solid rgb(238, 238, 238);">            &lt;/tr&gt;
</td></tr><tr style="padding: 0px; margin: 0px;"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102);">38</th><td style="padding: 2px 3px; margin: 0px; vertical-align: top; font-family: monospace; white-space: pre; border-bottom: 1px solid rgb(238, 238, 238);">        &lt;/thead&gt;
</td></tr><tr style="padding: 0px; margin: 0px;"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102);">39</th><td style="padding: 2px 3px; margin: 0px; vertical-align: top; font-family: monospace; white-space: pre; border-bottom: 1px solid rgb(238, 238, 238);">        {% for course in filter.qs %}
</td></tr><tr style="padding: 0px; margin: 0px;"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102);">40</th><td style="padding: 2px 3px; margin: 0px; vertical-align: top; font-family: monospace; white-space: pre; border-bottom: 1px solid rgb(238, 238, 238);">        &lt;tbody&gt;
</td></tr><tr style="padding: 0px; margin: 0px;"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102);">41</th><td style="padding: 2px 3px; margin: 0px; vertical-align: top; font-family: monospace; white-space: pre; border-bottom: 1px solid rgb(238, 238, 238);">            &lt;tr&gt;
</td></tr><tr style="padding: 0px; margin: 0px;"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102);">42</th><td style="padding: 2px 3px; margin: 0px; vertical-align: top; font-family: monospace; white-space: pre; border-bottom: 1px solid rgb(238, 238, 238);">                &lt;td&gt; {{ forloop.counter }}.&lt;/td&gt;
</td></tr><tr style="padding: 0px; margin: 0px;"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102);">43</th><td style="padding: 2px 3px; margin: 0px; vertical-align: top; font-family: monospace; white-space: pre; border-bottom: 1px solid rgb(238, 238, 238);">                &lt;td&gt;&lt;a href="{{ course.lecturer.get_absolute_url }}"&gt;{{ course.lecturer.get_full_name }}&lt;/a&gt;&lt;/td&gt;
</td></tr><tr style="padding: 0px; margin: 0px;"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102);">44</th><td style="padding: 2px 3px; margin: 0px; vertical-align: top; font-family: monospace; white-space: pre; border-bottom: 1px solid rgb(238, 238, 238);">                &lt;td&gt;&lt;div class="flex"&gt;{% for i in course.courses.all %}
</td></tr><tr class="error" style="padding: 0px; margin: 0px; background: rgb(255, 255, 204);"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102);">45</th><td style="padding: 2px 3px; margin: 0px; vertical-align: top; font-family: monospace; white-space: pre; border-bottom: 1px solid rgb(238, 238, 238);">                        &lt;div class="flex"&gt;&lt;a class="edit-btn" href="<span class="specific" style="padding: 0px; margin: 0px; color: rgb(204, 51, 0); font-weight: bold;">{{ i.get_absolute_url }}</span>"&gt;{{ i }}&lt;/a&gt;&lt;/div&gt;
</td></tr><tr style="padding: 0px; margin: 0px;"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102);">46</th><td style="padding: 2px 3px; margin: 0px; vertical-align: top; font-family: monospace; white-space: pre; border-bottom: 1px solid rgb(238, 238, 238);">                    {% endfor %}&lt;/div&gt;
</td></tr><tr style="padding: 0px; margin: 0px;"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102);">47</th><td style="padding: 2px 3px; margin: 0px; vertical-align: top; font-family: monospace; white-space: pre; border-bottom: 1px solid rgb(238, 238, 238);">                &lt;/td&gt;
</td></tr><tr style="padding: 0px; margin: 0px;"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102);">48</th><td style="padding: 2px 3px; margin: 0px; vertical-align: top; font-family: monospace; white-space: pre; border-bottom: 1px solid rgb(238, 238, 238);">                {% if request.user.is_superuser %}
</td></tr><tr style="padding: 0px; margin: 0px;"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102);">49</th><td style="padding: 2px 3px; margin: 0px; vertical-align: top; font-family: monospace; white-space: pre; border-bottom: 1px solid rgb(238, 238, 238);">                &lt;td&gt;&lt;div class="update-delete"&gt;
</td></tr><tr style="padding: 0px; margin: 0px;"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102);">50</th><td style="padding: 2px 3px; margin: 0px; vertical-align: top; font-family: monospace; white-space: pre; border-bottom: 1px solid rgb(238, 238, 238);">                    &lt;a href="{% url 'edit_allocated_course' pk=course.pk %}" class="update" title="{% trans 'Edit or Update' %}"&gt;
</td></tr><tr style="padding: 0px; margin: 0px;"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102);">51</th><td style="padding: 2px 3px; margin: 0px; vertical-align: top; font-family: monospace; white-space: pre; border-bottom: 1px solid rgb(238, 238, 238);">                        &lt;i class="fas fa-edit"&gt;&lt;/i&gt;
</td></tr><tr style="padding: 0px; margin: 0px;"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102);">52</th><td style="padding: 2px 3px; margin: 0px; vertical-align: top; font-family: monospace; white-space: pre; border-bottom: 1px solid rgb(238, 238, 238);">                    &lt;/a&gt;
</td></tr><tr style="padding: 0px; margin: 0px;"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102);">53</th><td style="padding: 2px 3px; margin: 0px; vertical-align: top; font-family: monospace; white-space: pre; border-bottom: 1px solid rgb(238, 238, 238);">                    &lt;a href="{% url 'course_deallocate' pk=course.pk %}" class="delete" title="{% trans 'Deallocate' %}"&gt;
</td></tr><tr style="padding: 0px; margin: 0px;"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102);">54</th><td style="padding: 2px 3px; margin: 0px; vertical-align: top; font-family: monospace; white-space: pre; border-bottom: 1px solid rgb(238, 238, 238);">                        &lt;i class="fas fa-trash-alt"&gt;&lt;/i&gt;
</td></tr><tr style="padding: 0px; margin: 0px;"><th style="padding: 2px 0.5em 2px 3px; margin: 0px; vertical-align: top; width: 12em; text-align: right; color: rgb(102, 102, 102); font-family: sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">55</th><br class="Apple-interchange-newline">

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant