swe574-spring23 / SWE574

BOUN Spring 574 Project
MIT License
0 stars 0 forks source link

BUG - Production Deployment Related Issues #169

Closed sehmuzc closed 10 months ago

sehmuzc commented 10 months ago

The issues below should be corrected:

  1. The annotation server should be running in cloud environment.
  2. The semantic tags should be updated to show more than one tag in a post.
  3. The images for the badges should be added from the admin page.
  4. The search functionality should be looking for labels and annotations.
eralp85 commented 10 months ago

Label separation and label search is working.

sehmuzc commented 10 months ago

I added the images for the badges from the admin page. Ceyda did this one: The annotation server should be running in cloud environment.

eralp85 commented 10 months ago

The second issue is fixed with 8d15d86 and 0626685

eralp85 commented 10 months ago

Annotation search is still going on. All others are solved.

sehmuzc commented 10 months ago

The search functionality should be looking for annotations. @ceydaduzgec

ceydaduzgec commented 10 months ago

Annotation search is done https://github.com/swe574-spring23/SWE574/pull/181 and https://github.com/swe574-spring23/SWE574/pull/180

sehmuzc commented 10 months ago
<p class="labels">
    Labels:
    {% for label in post.get_labels_list %}
        <a href="{% url 'search_posts_by_label' label %}" class="badge bg-secondary"
           data-bs-toggle="tooltip" data-bs-placement="top"
           data-bs-custom-class="custom-tooltip">
            {{ label }}
        </a>
    {% endfor %}
</p>
from django.shortcuts import render
from django.db.models import Q

def search_posts_by_label(request, label):
    posts_s = Post.objects.filter(labels__icontains=label).distinct()
    # You can pass the 'posts_s' queryset to the template or perform further actions
    return render(request, 'search_results.html', {'posts_s': posts_s})
from django.urls import path
from .views import search_posts_by_label

urlpatterns = [
    # Other URL patterns
    path('search/label/<str:label>/', search_posts_by_label, name='search_posts_by_label'),
]