internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: uccser/cs-unplugged

Issue:
Remove admin application



Discussion:

Resolving patch:
diff --git a/csunplugged/config/settings/base.py b/csunplugged/config/settings/base.py
--- a/csunplugged/config/settings/base.py
+++ b/csunplugged/config/settings/base.py
@@ -36,9 +36,6 @@
 
     # Useful template tags
     "django.contrib.humanize",
-
-    # Admin
-    "django.contrib.admin",
 ]
 
 THIRD_PARTY_APPS = [
diff --git a/csunplugged/config/urls.py b/csunplugged/config/urls.py
--- a/csunplugged/config/urls.py
+++ b/csunplugged/config/urls.py
@@ -7,14 +7,12 @@
 from django.conf import settings
 from django.conf.urls import include, url
 from django.conf.urls.i18n import i18n_patterns
-from django.contrib import admin
 from general import views
 
 urlpatterns = i18n_patterns(
     url(r"", include("general.urls", namespace="general")),
     url(r"^topics/", include("topics.urls", namespace="topics")),
     url(r"^resources/", include("resources.urls", namespace="resources")),
-    url(r"^admin/", include(admin.site.urls)),
     url(r"^search/", include("search.urls", namespace="search")),
 )
 


Test patch:
Repository: uccser/cs-unplugged

Issue:
Urgent Māori content for DT4PD
- Fix spelling mistake on pixel painter instructions.
- Sorting Network Cards for Kauri seeds.


Discussion:

Resolving patch:
diff --git a/csunplugged/resources/generators/PixelPainterResourceGenerator.py b/csunplugged/resources/generators/PixelPainterResourceGenerator.py
--- a/csunplugged/resources/generators/PixelPainterResourceGenerator.py
+++ b/csunplugged/resources/generators/PixelPainterResourceGenerator.py
@@ -425,7 +425,8 @@ def grid_reference_page(self, page_grid_coords, image_name):
                 if method == "greyscale":
                     text(_("The pixel values are using 2 bit colour values."))
                 if method == "colour":
-                    text(_("The pixel values are using 5 bit RGB colour values (2 red, 2 blue, 1 green)."))
+                    text(_("The pixel values are using 5 bit RGB colour values (2 red, 2 green, 1 blue)."))
+                text(" ")
                 text(_("Extra pixel legends are at the end of this document for students."))
         html = doc.getvalue()
         html += self.create_pixel_legend(self.methods[method]["labels"].items())
@@ -441,7 +442,7 @@ def create_pixel_legend(self, items):
             HTML string for pixel legend.
         """
         doc, tag, text, line = Doc().ttl()
-        line("style", "#pixel-legend td {border:1px solid black;padding:0.5rem 0.5rem;white-space: nowrap;}")
+        line("style", "#pixel-legend td {border:1px solid black;padding:0.5rem 0.5rem;white-space:nowrap;}")
         with tag("table", id="pixel-legend", style="display:inline;"):
             with tag("tbody"):
                 with tag("tr"):
diff --git a/csunplugged/resources/generators/SortingNetworkCardsResourceGenerator.py b/csunplugged/resources/generators/SortingNetworkCardsResourceGenerator.py
--- a/csunplugged/resources/generators/SortingNetworkCardsResourceGenerator.py
+++ b/csunplugged/resources/generators/SortingNetworkCardsResourceGenerator.py
@@ -65,6 +65,17 @@
             "little-red-riding-hood-6.png",
         ]
     },
+    "kauri_tree": {
+        "label": _("Kauri tree"),
+        "images": [
+            "kauri-tree/kauri-1.png",
+            "kauri-tree/kauri-2.png",
+            "kauri-tree/kauri-3.png",
+            "kauri-tree/kauri-4.png",
+            "kauri-tree/kauri-5.png",
+            "kauri-tree/kauri-6.png",
+        ],
+    },
     "maori_colours": {
         "label": "Māori colours",
         "values": [


Test patch:
Repository: uccser/cs-unplugged

Issue:
Pixel painter run length encoding assumes lines start with a black pixel
The runlength currently assumes that lines start with a black pixel, but it should start with white.


Discussion:

Resolving patch:
diff --git a/csunplugged/resources/generators/PixelPainterResourceGenerator.py b/csunplugged/resources/generators/PixelPainterResourceGenerator.py
--- a/csunplugged/resources/generators/PixelPainterResourceGenerator.py
+++ b/csunplugged/resources/generators/PixelPainterResourceGenerator.py
@@ -244,7 +244,7 @@ def get_run_length_encoding(self, image, page_start_column, page_columns,
         page_encoding = []
         for row in range(0, page_rows):
             row_encoding = []
-            encoding_colour = "0"
+            encoding_colour = "1"
             encoding_count = 0
 
             for column in range(0, page_columns):


Test patch:
Repository: uccser/cs-unplugged

Issue:
Plugging it in area is not accessible on dev server
This link should work: https://cs-unplugged-dev.appspot.com/plugging-it-in/


Discussion:

Resolving patch:
diff --git a/csunplugged/config/urls.py b/csunplugged/config/urls.py
--- a/csunplugged/config/urls.py
+++ b/csunplugged/config/urls.py
@@ -8,6 +8,8 @@
 from django.urls import include, path
 from django.conf.urls.i18n import i18n_patterns
 from django.contrib import admin
+import environ
+env = environ.Env()
 
 urlpatterns = i18n_patterns(
     path('', include('general.urls', namespace='general')),
@@ -22,7 +24,7 @@
     path('admin/', admin.site.urls),
 ]
 
-if not settings.DJANGO_PRODUCTION:
+if not env("DEPLOYMENT", default=None) == "prod":
     urlpatterns += [
         path('plugging-it-in/', include('plugging_it_in.urls', namespace='plugging_it_in')),
     ]


Test patch:
Repository: uccser/cs-unplugged

Issue:
Glossary page should list entries in alphabetical order for viewed language
For example, Māori lists these glossary entries in the following order:

- Hātepe
- Mati Tāhūrua
- Rapu ā-tāhūrua
- Waematihiko
- Mati takitaki (Check digit)
- Kōpeketanga
- ...

These should be in alphabetical for each language.


Discussion:

Resolving patch:
diff --git a/csunplugged/topics/views.py b/csunplugged/topics/views.py
--- a/csunplugged/topics/views.py
+++ b/csunplugged/topics/views.py
@@ -391,10 +391,11 @@ def get_queryset(self):
 
     def get_context_data(self):
         """Get context data for template rendering."""
+        term_locale = "term_" + get_language().replace("-", "_")
         return {
             "glossary_terms": GlossaryTerm.objects.filter(
                 Q(languages__contains=[get_language()])
-            ).order_by("term_en"),
+            ).order_by(term_locale),
             "untranslated_glossary_terms": GlossaryTerm.objects.filter(
                 ~Q(languages__contains=[get_language()])
             ).order_by("term_en")


Test patch:
Repository: uccser/cs-unplugged

Issue:
No URL inside button when content not available
https://csunplugged.org/es/topics/binary-numbers/programming/binary-numbers-no-calculations/scratch-solution/

![image](https://user-images.githubusercontent.com/16066822/89608034-12482c00-d8c8-11ea-8797-5e4b4b017eb1.png)



Discussion:

Resolving patch:
diff --git a/csunplugged/topics/models.py b/csunplugged/topics/models.py
--- a/csunplugged/topics/models.py
+++ b/csunplugged/topics/models.py
@@ -284,6 +284,8 @@ def __str__(self):
 class ProgrammingChallengeImplementation(TranslatableModel):
     """Model for programming challenge language implementation in database."""
 
+    RETURN_TO_PARENT = _("Return to programming challenge")
+
     #  Auto-incrementing 'id' field is automatically set by Django
     topic = models.ForeignKey(
         Topic,


Test patch:
Repository: uccser/cs-unplugged

Issue:
Use Django's JavaScript Catalog
We should use Django's [JavaScript translation catalog](https://docs.djangoproject.com/en/1.11/topics/i18n/translation/#internationalization-in-javascript-code) to allow us to translate text in JavaScript files.

Refer to https://github.com/uccser/cs-field-guide/pull/713 and https://github.com/uccser/cs-field-guide/pull/731


Discussion:

Resolving patch:
diff --git a/csunplugged/config/settings/base.py b/csunplugged/config/settings/base.py
--- a/csunplugged/config/settings/base.py
+++ b/csunplugged/config/settings/base.py
@@ -51,6 +51,7 @@
     "widget_tweaks",
     "modeltranslation",
     "bidiutils",
+    "statici18n",
 ]
 
 # Apps specific for this project go here.
@@ -346,3 +347,4 @@
 GENERAL_PAGES_CONTENT_BASE_PATH = os.path.join(str(ROOT_DIR.path("general")), "content")
 ACTIVITIES_CONTENT_BASE_PATH = os.path.join(str(ROOT_DIR.path("at_home")), "content")
 BREADCRUMBS_TEMPLATE = "django_bootstrap_breadcrumbs/bootstrap4.html"
+STATICI18N_ROOT = BUILD_ROOT


Test patch:
Repository: uccser/cs-unplugged

Issue:
HTML can be inserted into a user's Plugging it in challenge templates
### The steps are:
- [Open any programming challenge on PII](https://www.csunplugged.org/en/plugging-it-in/binary-numbers/how-binary-digits-work/binary-numbers-no-calculations/)
- Submit this code in the answer box:
    - `</script><script type="text/javascript">console.log("hi")</script>`
        - It must be all on one line
        - Adapt to your desired level of maliciousness
- Refresh the page

When the user re-requests the page, the submitted 'code' is loaded [in the HTML template](https://github.com/uccser/cs-unplugged/blob/develop/csunplugged/templates/plugging_it_in/programming-challenge.html#L191). The first `</script>` closes the script that assigns the variables, and what follows is loaded as a new HTML script tag. The resulting HTML is sent to the user and executes 'as normal'.

I haven't been able to submit code that executes while also not breaking every PII challenge page. When the page does break, deleting your cookies for CSU allows you to get it working again

### Three potential fixes
- [Escape the submitted code.](https://docs.djangoproject.com/en/3.1/ref/utils/#module-django.utils.html)
    - It was already escaped, the problem is that [it gets un-escaped](https://docs.djangoproject.com/en/2.2/ref/templates/language/#automatic-html-escaping) in order to load as a variable.
        - So we would need to un-escape it in JS rather than HTML, and doing so will be tricky
(`&#39;}}&lt;` etc is loaded into the answer box)
- Don't load the user submitted code into the HTML template, and instead request it in JS
    - Will be slower, another request is needed
- Load the submitted code in the HTML, not as a variable, but straight into the <textarea> answer box.
    - This is how it's done in CodeWOF
    - Since it's in a <textarea> everything is rendered as plaintext


Discussion:

Resolving patch:
diff --git a/csunplugged/config/__init__.py b/csunplugged/config/__init__.py
--- a/csunplugged/config/__init__.py
+++ b/csunplugged/config/__init__.py
@@ -1,3 +1,3 @@
 """Module for Django system configuration."""
 
-__version__ = "6.0.0"
+__version__ = "6.0.1"
diff --git a/csunplugged/plugging_it_in/views.py b/csunplugged/plugging_it_in/views.py
--- a/csunplugged/plugging_it_in/views.py
+++ b/csunplugged/plugging_it_in/views.py
@@ -150,6 +150,10 @@ def get_context_data(self, **kwargs):
         context["test_cases"] = related_test_cases
         context["jobe_proxy_url"] = reverse('plugging_it_in:jobe_proxy')
         context["saved_attempts"] = self.request.session.get('saved_attempts', {})
+        try:
+            context["previous_submission"] = context["saved_attempts"][self.object.slug]['code']
+        except KeyError:
+            context["previous_submission"] = ''
 
         return context
 


Test patch:
Repository: City-of-Helsinki/linkedevents

Issue:
Add short description in kulke importer



Discussion:
From "ingressi" field in Kulke data.


Resolving patch:
diff --git a/events/importer/kulke.py b/events/importer/kulke.py
--- a/events/importer/kulke.py
+++ b/events/importer/kulke.py
@@ -298,6 +298,7 @@ def clean(t):
         description = ''
         if caption:
             description += caption
+            event['short_description'][lang] = caption
         if caption and bodytext:
             description += "\n\n"
         if bodytext:


Test patch:
Repository: City-of-Helsinki/linkedevents

Issue:
Fix unicode in url references for e.g. Keywords



Discussion:
Keywordit joissa on ääkkösiä, eivät toimi. Tämän ongelman raportoin ensi kerran jo viime vuoden puolella. Ongelma on, että ääkköset enkoodataan UTF:ksi (esim. ä => %C3%A4), mutta sen jälkeen tämä enkoodataan vielä toisen kerran, jonka jälkeen URL ei enää toimikaan, kun enkoodauksen oma prosenttimerkki enkoodataan (ä => %C3%A4 => %25C3%25A4).

Lista kategorian matko:kesä tapahtumista: http://api.hel.fi/linkedevents/v0.1/event/?max_duration=1d&start=today&page_size=20&text=&recurring=sub&keyword=matko%3Akes%C3%A4

Listan ensimmäisen tapahtuma on matko:2521534536. Sen keywords-tietueesta löytyy:

"@id": "http://api.hel.fi/linkedevents/v0.1/keyword/matko%3Akes%25C3%25A4/"

Tämä sivu antaa vastaukseksi "detail": "Ei löydy."

Jos kategoriaa hakee itse käsin korjatulla URLilla, sivu toimii: http://api.hel.fi/linkedevents/v1/keyword/matko:kes%C3%A4/. Jopa tällä kategorian omalla sivulla sen linkki itseensä on väärin:

"@id": "http://api.hel.fi/linkedevents/v0.1/keyword/matko%3Akes%25C3%25A4/"


Resolving patch:
diff --git a/events/api.py b/events/api.py
--- a/events/api.py
+++ b/events/api.py
@@ -76,24 +76,6 @@ def get_serializer_for_model(model, version='v1'):
         serializer = Viewset.serializer_class
     return serializer
 
-def urlquote_id(link):
-    """
-    URL quote link's id part, e.g.
-    http://127.0.0.1:8000/v0.1/place/tprek:20879/
-    -->
-    http://127.0.0.1:8000/v0.1/place/tprek%3A20879/
-    This is DRF backwards compatibility function, 2.x quoted id automatically.
-
-    :param link: URL str
-    :return: quoted URL str
-    """
-    if isinstance(link, str):
-        parts = link.split('/')
-        if len(parts) > 1 and ':' in parts[-2]:
-            parts[-2] = urllib.parse.quote(parts[-2])
-            link = '/'.join(parts)
-    return link
-
 
 def generate_id(namespace):
     t = time.time() * 1000
@@ -154,7 +136,6 @@ def to_representation(self, obj):
             return self.related_serializer(obj, hide_ld_context=self.hide_ld_context,
                                            context=self.context).data
         link = super(JSONLDRelatedField, self).to_representation(obj)
-        link = urlquote_id(link)
         if link == None:
             return None
         return {
@@ -406,7 +387,6 @@ def to_representation(self, obj):
                                         request=self.context['request'])
             except NoReverseMatch:
                 ret['@id'] = str(ret['id'])
-            ret['@id'] = urlquote_id(ret['@id'])
 
         # Context is hidden if:
         # 1) hide_ld_context is set to True


Test patch:
Repository: City-of-Helsinki/linkedevents

Issue:
Add photographer name field in Image model
Required by the CC BY 4.0 license.



Discussion:

Resolving patch:
diff --git a/events/migrations/0028_add_photographer_name.py b/events/migrations/0028_add_photographer_name.py
new file mode 100644
--- /dev/null
+++ b/events/migrations/0028_add_photographer_name.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.9 on 2016-09-02 10:17
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('events', '0027_auto_20160819_1231'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='image',
+            name='photographer_name',
+            field=models.CharField(null=True, blank=True, max_length=255, verbose_name='Photographer name'),
+        ),
+    ]
diff --git a/events/models.py b/events/models.py
--- a/events/models.py
+++ b/events/models.py
@@ -110,6 +110,7 @@ class Image(models.Model):
     url = models.URLField(verbose_name=_('Image'), max_length=400, null=True, blank=True)
     cropping = ImageRatioField('image', '800x800', verbose_name=_('Cropping'))
     license = models.ForeignKey(License, verbose_name=_('License'), related_name='images', default='cc_by')
+    photographer_name = models.CharField(verbose_name=_('Photographer name'), max_length=255, null=True, blank=True)
 
     def save(self, *args, **kwargs):
         if not self.publisher:


Test patch:
diff --git a/events/tests/test_event_images_v1.py b/events/tests/test_event_images_v1.py
--- a/events/tests/test_event_images_v1.py
+++ b/events/tests/test_event_images_v1.py
@@ -60,6 +60,7 @@ def assert_image_fields_exist(data, version='v1'):
         'url',
         'last_modified_time',
         'license',
+        'photographer_name',
     )
     if version == 'v0.1':
         fields += (
Repository: City-of-Helsinki/linkedevents

Issue:
Use Helsinki servicemap in adding Place in LE admin



Discussion:

Resolving patch:
diff --git a/events/admin.py b/events/admin.py
--- a/events/admin.py
+++ b/events/admin.py
@@ -1,9 +1,9 @@
 from django.conf import settings
 from django.contrib import admin
 from django.contrib.admin.widgets import FilteredSelectMultiple
-from django.contrib.gis import admin as geoadmin
 from django.contrib.gis.db import models
 from django.utils.translation import ugettext as _
+from leaflet.admin import LeafletGeoAdmin
 from modeltranslation.admin import TranslationAdmin
 from reversion.admin import VersionAdmin
 from events.api import generate_id
@@ -30,8 +30,16 @@ class KeywordAdmin(BaseAdmin, TranslationAdmin, VersionAdmin):
     pass
 
 
-class PlaceAdmin(geoadmin.GeoModelAdmin, BaseAdmin, TranslationAdmin,
-                 VersionAdmin):
+class HelsinkiGeoAdmin(LeafletGeoAdmin):
+    settings_overrides = {
+        'DEFAULT_CENTER': (60.171944, 24.941389),
+        'DEFAULT_ZOOM': 11,
+        'MIN_ZOOM': 3,
+        'MAX_ZOOM': 19,
+    }
+
+
+class PlaceAdmin(HelsinkiGeoAdmin, BaseAdmin, TranslationAdmin, VersionAdmin):
     fieldsets = (
         (None, {
             'fields': ('publisher', 'name', 'description', 'info_url', 'position', 'parent')
diff --git a/linkedevents/settings.py b/linkedevents/settings.py
--- a/linkedevents/settings.py
+++ b/linkedevents/settings.py
@@ -55,6 +55,7 @@
 
     'helevents',
     'munigeo',
+    'leaflet',
 )
 
 MIDDLEWARE_CLASSES = (


Test patch:
Repository: City-of-Helsinki/linkedevents

Issue:
YSO p12262 is deprecated
Espoo importer fails when running 
`python manage.py event_import --events espoo`

YSO term p12262 "lapset (kooste)" is deprecated on 26.05.2016 
http://finto.fi/yso/fi/page/?uri=p12262

It is used here:
https://github.com/City-of-Helsinki/linkedevents/blob/master/events/importer/espoo.py#L101

It should replaced with another term, e.g. "lapset (ikäryhmät)"
http://finto.fi/yso/fi/page/p4354

After initializing database and running `python manage.py migrate` and data import commands:

```
python manage.py event_import --keywords yso
python manage.py event_import --places tprek
python manage.py event_import --events espoo
```

After last command I get:

```
  File ".../linkedevents/events/management/commands/event_import.py", line 61, in handle
    method()
  File ".../linkedevents/events/importer/espoo.py", line 618, in import_events
    self._recur_fetch_paginated_url(url, lang, events)
  File ".../linkedevents/events/importer/espoo.py", line 592, in _recur_fetch_paginated_url
    event = self._import_event(lang, doc, events)
  File ".../linkedevents/events/importer/espoo.py", line 534, in _import_event
    event_keywords.union(self._get_classification_keywords(node_name, lang))
  File ".../linkedevents/events/importer/espoo.py", line 365, in _get_classification_keywords
    event_keywords = self._map_classification_keywords_from_dict(classification_node_name)
  File ".../linkedevents/events/importer/espoo.py", line 318, in _map_classification_keywords_from_dict
    event_keywords.add(yso_to_db(t_v))
  File ".../linkedevents/events/importer/espoo.py", line 312, in <lambda>
    yso_to_db = lambda v: self.keyword_by_id['yso:%s' % v]
KeyError: 'yso:p12262'
```



Discussion:
Great, make a PR to get it fixed :)


Resolving patch:
diff --git a/events/importer/espoo.py b/events/importer/espoo.py
--- a/events/importer/espoo.py
+++ b/events/importer/espoo.py
@@ -98,8 +98,8 @@
     u'pelitapahtumat': u'p6062',  # -> pelit
     u'satutunnit': u'p14710',
     u'koululaiset': u'p16485',
-    u'lasten ja nuorten tapahtumat': (u'p12262', u'p11617'),  # -> lapset, nuoret
-    u'lapset ja perheet': (u'p12262', u'p4363'),  # -> lapset, perheet
+    u'lasten ja nuorten tapahtumat': (u'p4354', u'p11617'),  # -> lapset, nuoret
+    u'lapset ja perheet': (u'p4354', u'p4363'),  # -> lapset, perheet
     u'lukupiirit': u'p11406',  # -> lukeminen
 }
 


Test patch:
Repository: City-of-Helsinki/linkedevents

Issue:
Update DRF to 3.5
For schema generation support etc.


Discussion:

Resolving patch:
diff --git a/events/api.py b/events/api.py
--- a/events/api.py
+++ b/events/api.py
@@ -61,7 +61,7 @@
 
 
 def get_view_name(cls, suffix=None):
-    if cls.__name__ == 'APIRoot':
+    if cls.__name__ == 'APIRootView':
         return 'Linked Events'
     return original_get_view_name(cls, suffix)
 
@@ -552,6 +552,7 @@ class KeywordSerializer(LinkedEventsSerializer):
 
     class Meta:
         model = Keyword
+        fields = '__all__'
 
 
 class KeywordRetrieveViewSet(mixins.RetrieveModelMixin, viewsets.GenericViewSet):
@@ -648,6 +649,7 @@ class PlaceSerializer(LinkedEventsSerializer, GeoModelSerializer):
 
     class Meta:
         model = Place
+        fields = '__all__'
 
 
 class PlaceFilter(filters.FilterSet):
@@ -720,6 +722,7 @@ class LanguageSerializer(LinkedEventsSerializer):
 
     class Meta:
         model = Language
+        fields = '__all__'
 
     def get_translation_available(self, obj):
         return obj.id in [language[0] for language in settings.LANGUAGES]
@@ -773,6 +776,7 @@ class ImageSerializer(LinkedEventsSerializer):
 
     class Meta:
         model = Image
+        fields = '__all__'
 
     def to_representation(self, obj):
         # the url field is customized based on image and url


Test patch:
Repository: ephios-dev/ephios

Issue:
Liste der Benutzer ansehen
Als Manager möchte ich die Liste der Nutzer sehen, dafür soll es einen entsprechenden Menüpunkt geben.


Discussion:

Resolving patch:
diff --git a/event_management/views.py b/event_management/views.py
--- a/event_management/views.py
+++ b/event_management/views.py
@@ -170,7 +170,7 @@ def post(self, *args, **kwargs):
                 event.active = True
                 event.save()
                 messages.success(
-                    self.request, _("The event {title} has been saved.".format(title=event.title))
+                    self.request, _("The event {title} has been saved.").format(title=event.title)
                 )
                 return redirect(event.get_absolute_url())
         else:
@@ -244,7 +244,7 @@ def post(self, *args, **kwargs):
                 )
             else:
                 messages.success(
-                    self.request, _("The shift {shift} has been saved.".format(shift=shift))
+                    self.request, _("The shift {shift} has been saved.").format(shift=shift)
                 )
                 return redirect(self.object.event.get_absolute_url())
         else:
diff --git a/user_management/urls.py b/user_management/urls.py
--- a/user_management/urls.py
+++ b/user_management/urls.py
@@ -9,4 +9,5 @@
     path("groups/<int:pk>/edit", views.GroupUpdateView.as_view(), name="group_edit"),
     path("groups/<int:pk>/delete", views.GroupDeleteView.as_view(), name="group_delete"),
     path("groups/create", views.GroupCreateView.as_view(), name="group_add"),
+    path("users/", views.UserProfileListView.as_view(), name="user_list",),
 ]
diff --git a/user_management/views.py b/user_management/views.py
--- a/user_management/views.py
+++ b/user_management/views.py
@@ -16,6 +16,14 @@ def get_object(self, queryset=None):
         return self.request.user
 
 
+class UserProfileListView(PermissionRequiredMixin, ListView):
+    model = UserProfile
+    permission_required = "user.view_user"
+
+    def get_queryset(self):
+        return UserProfile.objects.all()
+
+
 class GroupListView(PermissionRequiredMixin, ListView):
     model = Group
     permission_required = "auth.view_group"


Test patch: