internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: airctic/icevision

Issue:
Add more logging to the pytorch lighning models.
The feature consists of two parts:
  1. Add the validation loss to the progress bar by default
  2. Create boolean parameter for extended progress bar logging (showing the different components of the loss)


Discussion:

Resolving patch:
diff --git a/icevision/engines/lightning/lightning_model_adapter.py b/icevision/engines/lightning/lightning_model_adapter.py
--- a/icevision/engines/lightning/lightning_model_adapter.py
+++ b/icevision/engines/lightning/lightning_model_adapter.py
@@ -6,9 +6,21 @@
 
 
 class LightningModelAdapter(pl.LightningModule, ABC):
-    def __init__(self, metrics: List[Metric] = None):
+    def __init__(
+        self,
+        metrics: List[Metric] = None,
+        metrics_keys_to_log_to_prog_bar: List[tuple] = None,
+    ):
+        """
+        To show a metric in the progressbar a list of tupels can be provided for metrics_keys_to_log_to_prog_bar, the first
+        entry has to be the name of the metric to log and the second entry the display name in the progressbar. By default the
+        mAP is logged to the progressbar.
+        """
         super().__init__()
         self.metrics = metrics or []
+        self.metrics_keys_to_log_to_prog_bar = metrics_keys_to_log_to_prog_bar or [
+            ("AP (IoU=0.50:0.95) area=all", "COCOMetric")
+        ]
 
     def accumulate_metrics(self, preds):
         for metric in self.metrics:
@@ -18,4 +30,9 @@ def finalize_metrics(self) -> None:
         for metric in self.metrics:
             metric_logs = metric.finalize()
             for k, v in metric_logs.items():
-                self.log(f"{metric.name}/{k}", v)
+                for entry in self.metrics_keys_to_log_to_prog_bar:
+                    if entry[0] == k:
+                        self.log(entry[1], v, prog_bar=True)
+                        self.log(f"{metric.name}/{k}", v)
+                    else:
+                        self.log(f"{metric.name}/{k}", v)


Test patch:
diff --git a/tests/engines/lightning/test_lightning_model_adapter.py b/tests/engines/lightning/test_lightning_model_adapter.py
new file mode 100644
--- /dev/null
+++ b/tests/engines/lightning/test_lightning_model_adapter.py
@@ -0,0 +1,30 @@
+from icevision.engines.lightning import LightningModelAdapter
+
+
+class MockMetric:
+    def __init__(self):
+        self.name = "MockMetric"
+
+    def accumulate(self):
+        pass
+
+    def finalize(sefl):
+        return {"metric_a": 1, "metric_b": 2}
+
+
+class DummLightningModelAdapter(LightningModelAdapter):
+    pass
+
+
+# test if finalize metrics reports metrics correctly
+def test_finalze_metrics_reports_metrics_correctly(mocker):
+    mocker.patch(
+        "icevision.engines.lightning.lightning_model_adapter.LightningModelAdapter.log"
+    )
+
+    adapter = DummLightningModelAdapter([MockMetric()], [("metric_a", "a")])
+    adapter.finalize_metrics()
+
+    adapter.log.assert_any_call("a", 1, prog_bar=True)
+    adapter.log.assert_any_call("MockMetric/metric_a", 1)
+    adapter.log.assert_any_call("MockMetric/metric_b", 2)
Repository: airctic/icevision

Issue:
SSD model doesn't work
## 🐛 Bug

SSD model doesn't work anymore. It seems related to MMDetection updates made here:
https://github.com/open-mmlab/mmdetection/pull/5789/files

Refer to discussion on our Discord forum:
https://discord.com/channels/735877944085446747/780951885485965352/920249646964670464


Discussion:

Resolving patch:
diff --git a/icevision/models/mmdet/models/ssd/backbones/resnet_fpn.py b/icevision/models/mmdet/models/ssd/backbones/resnet_fpn.py
--- a/icevision/models/mmdet/models/ssd/backbones/resnet_fpn.py
+++ b/icevision/models/mmdet/models/ssd/backbones/resnet_fpn.py
@@ -1,6 +1,7 @@
 __all__ = [
     "ssd300",
     "ssd512",
+    "ssdlite_mobilenetv2",
 ]
 
 from icevision.imports import *
@@ -17,10 +18,15 @@ def __init__(self, **kwargs):
 
 ssd300 = MMDetSSDBackboneConfig(
     config_path=base_config_path / "ssd300_coco.py",
-    weights_url=f"{base_weights_url}/ssd300_coco/ssd300_coco_20200307-a92d2092.pth",
+    weights_url=f"{base_weights_url}/ssd300_coco/ssd300_coco_20210803_015428-d231a06e.pth",
 )
 
 ssd512 = MMDetSSDBackboneConfig(
     config_path=base_config_path / "ssd512_coco.py",
-    weights_url=f"{base_weights_url}/ssd512_coco/ssd512_coco_20200308-038c5591.pth",
+    weights_url=f"{base_weights_url}/ssd512_coco/ssd512_coco_20210803_022849-0a47a1ca.pth",
+)
+
+ssdlite_mobilenetv2 = MMDetSSDBackboneConfig(
+    config_path=base_config_path / "ssdlite_mobilenetv2_scratch_600e_coco.py",
+    weights_url=f"{base_weights_url}/ssd512_coco/ssdlite_mobilenetv2_scratch_600e_coco_20210629_110627-974d9307.pth",
 )
diff --git a/icevision/models/mmdet/utils.py b/icevision/models/mmdet/utils.py
--- a/icevision/models/mmdet/utils.py
+++ b/icevision/models/mmdet/utils.py
@@ -35,18 +35,21 @@ def param_groups(model):
     body = model.backbone
 
     layers = []
+
+    # add the backbone
     if isinstance(body, SSDVGG):
         layers += [body.features]
-        layers += [body.extra, body.l2_norm]
     elif isinstance(body, CSPDarknet):
         layers += [body.stem.conv.conv, body.stem.conv.bn]
         layers += [body.stage1, body.stage2, body.stage3, body.stage4]
-        layers += [model.neck]
     else:
         layers += [nn.Sequential(body.conv1, body.bn1)]
         layers += [getattr(body, l) for l in body.res_layers]
-        layers += [model.neck]
 
+    # add the neck
+    layers += [model.neck]
+
+    # add the head
     if isinstance(model, SingleStageDetector):
         layers += [model.bbox_head]
     elif isinstance(model, TwoStageDetector):


Test patch:
Repository: airctic/icevision

Issue:
Fix installation in documentation
• Improve Installation Guide

We need to improve the installation guide for IceVision.
Too many people are getting stuck installing the library.
We need clear instructions for:
* Colab
* MacOS
* Windows (WSL2)
* Ubuntu


Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,5 @@
 from setuptools import setup
 
+
 if __name__ == "__main__":
     setup()


Test patch:
Repository: airctic/icevision

Issue:
Add YOLOX backbones
Add small, large, and xlarge backbones to the YOLOX model


Discussion:

Resolving patch:
diff --git a/icevision/models/mmdet/models/yolox/backbones/resnet_fpn.py b/icevision/models/mmdet/models/yolox/backbones/resnet_fpn.py
--- a/icevision/models/mmdet/models/yolox/backbones/resnet_fpn.py
+++ b/icevision/models/mmdet/models/yolox/backbones/resnet_fpn.py
@@ -1,5 +1,8 @@
 __all__ = [
     "yolox_tiny_8x8",
+    "yolox_s_8x8",
+    "yolox_l_8x8",
+    "yolox_x_8x8",
 ]
 
 from icevision.imports import *
@@ -18,3 +21,18 @@ def __init__(self, **kwargs):
     config_path=base_config_path / "yolox_tiny_8x8_300e_coco.py",
     weights_url=f"{base_weights_url}yolox_tiny_8x8_300e_coco/yolox_tiny_8x8_300e_coco_20210806_234250-4ff3b67e.pth",
 )
+
+yolox_s_8x8 = MMDetYOLOXBackboneConfig(
+    config_path=base_config_path / "yolox_s_8x8_300e_coco.py",
+    weights_url=f"{base_weights_url}yolox_s_8x8_300e_coco/yolox_s_8x8_300e_coco_20211121_095711-4592a793.pth",
+)
+
+yolox_l_8x8 = MMDetYOLOXBackboneConfig(
+    config_path=base_config_path / "yolox_l_8x8_300e_coco.py",
+    weights_url=f"{base_weights_url}yolox_l_8x8_300e_coco/yolox_l_8x8_300e_coco_20211126_140236-d3bd2b23.pth",
+)
+
+yolox_x_8x8 = MMDetYOLOXBackboneConfig(
+    config_path=base_config_path / "yolox_x_8x8_300e_coco.py",
+    weights_url=f"{base_weights_url}yolox_x_8x8_300e_coco/yolox_x_8x8_300e_coco_20211126_140254-1ef88d67.pth",
+)


Test patch:
Repository: airctic/icevision

Issue:
getting_started_object_detection.ipynb fails after CentripetalNet support merge
## 🐛 Bug
**Describe the bug**
`getting_started_object_detection.ipynb` fails to run with the following error.

`AttributeError: 'VFNet' object has no attribute 'mask_head'
`
**To Reproduce**
Steps to reproduce the behavior: Run the getting started notebook.

**Expected behavior**
Model should instantiate.

**Screenshots**
![image](https://user-images.githubusercontent.com/6821286/152749230-5ebaaaee-d21e-462d-858d-26b890c95067.png)


Discussion:

Resolving patch:
diff --git a/icevision/models/mmdet/utils.py b/icevision/models/mmdet/utils.py
--- a/icevision/models/mmdet/utils.py
+++ b/icevision/models/mmdet/utils.py
@@ -6,6 +6,7 @@
     "create_model_config",
 ]
 
+from numpy import False_
 from icevision.imports import *
 from icevision.utils import *
 from icevision.backbones import BackboneConfig
@@ -81,9 +82,9 @@ def param_groups(model):
         layers += [model.bbox_head]
 
         # YOLACT has mask_head and segm_head
-        if getattr(model, "mask_head"):
+        if hasattr(model, "mask_head"):
             layers += [model.mask_head]
-        if getattr(model, "segm_head"):
+        if hasattr(model, "segm_head"):
             layers += [model.segm_head]
 
     elif isinstance(model, TwoStageDetector):


Test patch:
Repository: airctic/icevision

Issue:
Typo lightning -> lighting in Albumentations helper
There are several instances in the codebase with the typo `lightning` when the intended term is `lighting`

https://github.com/airctic/icevision/blob/af0693e355423e9879c97ab903f324db080411f4/icevision/tfms/albumentations/albumentations_helpers.py#L35

https://github.com/airctic/icevision/blob/af0693e355423e9879c97ab903f324db080411f4/icevision/tfms/albumentations/albumentations_helpers.py#L57

https://github.com/airctic/icevision/blob/af0693e355423e9879c97ab903f324db080411f4/icevision/tfms/albumentations/albumentations_helpers.py#L74


Typo lightning -> lighting in Albumentations helper
There are several instances in the codebase with the typo `lightning` when the intended term is `lighting`

https://github.com/airctic/icevision/blob/af0693e355423e9879c97ab903f324db080411f4/icevision/tfms/albumentations/albumentations_helpers.py#L35

https://github.com/airctic/icevision/blob/af0693e355423e9879c97ab903f324db080411f4/icevision/tfms/albumentations/albumentations_helpers.py#L57

https://github.com/airctic/icevision/blob/af0693e355423e9879c97ab903f324db080411f4/icevision/tfms/albumentations/albumentations_helpers.py#L74




Discussion:

Resolving patch:
diff --git a/icevision/tfms/albumentations/albumentations_helpers.py b/icevision/tfms/albumentations/albumentations_helpers.py
--- a/icevision/tfms/albumentations/albumentations_helpers.py
+++ b/icevision/tfms/albumentations/albumentations_helpers.py
@@ -32,7 +32,7 @@ def aug_tfms(
         g_shift_limit=10,
         b_shift_limit=10,
     ),
-    lightning: Optional[A.RandomBrightnessContrast] = A.RandomBrightnessContrast(),
+    lighting: Optional[A.RandomBrightnessContrast] = A.RandomBrightnessContrast(),
     blur: Optional[A.Blur] = A.Blur(blur_limit=(1, 3)),
     crop_fn: Optional[A.DualTransform] = partial(A.RandomSizedBBoxSafeCrop, p=0.5),
     pad: Optional[A.DualTransform] = partial(
@@ -54,7 +54,7 @@ def aug_tfms(
                 is not applied.
         rgb_shift: Randomly shift values for each channel of RGB image. If `None` this
                 transform is not applied.
-        lightning: Randomly changes Brightness and Contrast. If `None` this transform
+        lighting: Randomly changes Brightness and Contrast. If `None` this transform
                 is not applied.
         blur: Randomly blur the image. If `None` this transform is not applied.
         crop_fn: Randomly crop the image. If `None` this transform is not applied.
@@ -71,7 +71,7 @@ def aug_tfms(
 
     tfms = []
     tfms += [resize(presize, A.SmallestMaxSize) if presize is not None else None]
-    tfms += [horizontal_flip, shift_scale_rotate, rgb_shift, lightning, blur]
+    tfms += [horizontal_flip, shift_scale_rotate, rgb_shift, lighting, blur]
     # Resize as the last transforms to reduce the number of artificial artifacts created
     if crop_fn is not None:
         crop = crop_fn(height=height, width=width)


Test patch:
Repository: aws/aws-sam-cli

Issue:
Incorrect inline help in "sam local generate-event" command
<!-- Make sure we don't have an existing Issue that reports the bug you are seeing (both open and closed). -->

### Describe your idea/feature/enhancement

Using the CLI I had some problems with the inline help of the command "sam local generate-event". I was trying to pipe the event generated by that command with "sam local invoke" and it failed. The part of the inline help that it is incorrect is this:

`{...} After you generate a sample event, you can use it to test your Lambda function locally
  $ sam local generate-event s3 [put/delete] --bucket <bucket> --key <key> | sam local invoke <function logical id> {...}`

In the web documentation here (https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-local-generate-event.html) the help is correct:

`After you generate a sample event, you can use it to test your Lambda function locally
sam local generate-event s3 [put/delete] --bucket <bucket> --key <key> | sam local invoke -e - <function logical id>`
### Proposal

Replace the incorrect help by the correct one.



Discussion:
Thanks for submitting this! Looks to be a quick fix, would be glad to take in a PR for this :)

Resolving patch:
diff --git a/samcli/commands/local/generate_event/cli.py b/samcli/commands/local/generate_event/cli.py
--- a/samcli/commands/local/generate_event/cli.py
+++ b/samcli/commands/local/generate_event/cli.py
@@ -22,7 +22,7 @@
 $ sam local generate-event s3 [put/delete] --bucket <bucket> --key <key>\n
 \b
 After you generate a sample event, you can use it to test your Lambda function locally
-$ sam local generate-event s3 [put/delete] --bucket <bucket> --key <key> | sam local invoke <function logical id>
+$ sam local generate-event s3 [put/delete] --bucket <bucket> --key <key> | sam local invoke -e - <function logical id>
 """
 
 


Test patch:
Repository: autorope/donkeycar

Issue:
Support WIFI network that does not have internet access
REF: https://github.com/wroscoe/donkey/blob/dev/donkeycar/util/web.py

The system determines its IP address using a ping to 8.8.8.8
This approach fails when the WIFI network does not have internet access.





Discussion:

Hello William I've been trying to find a place to get started and try to help I've never done a pull request and I'm a bit trigger shy I would like to help on this request but I don't want to make an ass of myself and do things wrong.

If you can give me some pointers on how to do this the first time so I'm not asking too many questions or submitting noob questions I would be happy to try and assist on this one I've set up Linux Wireless in AP mode before.


Sent from my iPhone

> On Jun 25, 2018, at 12:39 PM, mancoast <notifications@github.com> wrote:
> 
> REF: https://github.com/wroscoe/donkey/blob/dev/donkeycar/util/web.py
> 
> The system determines its IP address using a ping to 8.8.8.8
> This approach fails when the WIFI network does not have internet access.
> 
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub, or mute the thread.


Resolving patch:
diff --git a/donkeycar/util/web.py b/donkeycar/util/web.py
--- a/donkeycar/util/web.py
+++ b/donkeycar/util/web.py
@@ -1,7 +1,10 @@
 import socket
 
 def get_ip_address():
-    ip = ([l for l in ([ip for ip in socket.gethostbyname_ex(socket.gethostname())[2] if not ip.startswith("127.")][:1],
-                           [[(s.connect(('8.8.8.8', 53)), s.getsockname()[0], s.close()) for s in
-                             [socket.socket(socket.AF_INET, socket.SOCK_DGRAM)]][0][1]]) if l][0][0])
-    return ip
+    try:
+        ip = ([l for l in ([ip for ip in socket.gethostbyname_ex(socket.gethostname())[2] if not ip.startswith("127.")][:1],
+                               [[(s.connect(('8.8.8.8', 53)), s.getsockname()[0], s.close()) for s in
+                                 [socket.socket(socket.AF_INET, socket.SOCK_DGRAM)]][0][1]]) if l][0][0])
+        return ip
+    except OSError: #occurs when cannot connect to '8.8.8.8' 
+        return "127.0.0.1" #loopback
\ No newline at end of file


Test patch:
Repository: liqd/a4-product

Issue:
Adapt to meinBerlin Changes
- [x] use A4_CATEGORIZABLE (  liqd/a4-meinberlin#893 )
- [x] adapt to project_list_tile templates in user space (liqd/a4-meinberlin#798 liqd/a4-meinberlin#792 liqd/a4-meinberlin#783 ... )
- [x] adapt to project_list_tile templates in dashboard ( liqd/a4-meinberlin#851  ... )
- [x] check if css refactorings should be used in product, too ( liqd/a4-meinberlin#903 liqd/a4-meinberlin#900 liqd/a4-meinberlin#875  liqd/a4-meinberlin#860 liqd/a4-meinberlin#881 liqd/a4-meinberlin#807 liqd/a4-meinberlin#788 ...)
- [x] unifiy admin.pys with meinBerlin
- [x] include 'adhocracy4.rules.apps.RulesConfig', ( liqd/a4-meinberlin#914 )


Discussion:

Resolving patch:
diff --git a/liqd_product/apps/organisations/admin.py b/liqd_product/apps/organisations/admin.py
--- a/liqd_product/apps/organisations/admin.py
+++ b/liqd_product/apps/organisations/admin.py
@@ -4,6 +4,7 @@
 
 
 class OrganisationAdmin(admin.ModelAdmin):
+    search_fields = ('name',)
     raw_id_fields = ('initiators', )
 
 
diff --git a/liqd_product/config/settings/base.py b/liqd_product/config/settings/base.py
--- a/liqd_product/config/settings/base.py
+++ b/liqd_product/config/settings/base.py
@@ -49,6 +49,7 @@
     'adhocracy4.projects.apps.ProjectsConfig',
     'adhocracy4.ratings.apps.RatingsConfig',
     'adhocracy4.reports.apps.ReportsConfig',
+    'adhocracy4.rules.apps.RulesConfig',
 
     # General components that define models or helpers
     'liqd_product.apps.contrib.apps.Config',


Test patch:
Repository: liqd/a4-product

Issue:
Internal server error when editing poll question
Internal server error when editing poll question in creating poll in dashboard


Discussion:

Resolving patch:
diff --git a/liqd_product/config/settings/base.py b/liqd_product/config/settings/base.py
--- a/liqd_product/config/settings/base.py
+++ b/liqd_product/config/settings/base.py
@@ -49,6 +49,7 @@
     'adhocracy4.projects.apps.ProjectsConfig',
     'adhocracy4.ratings.apps.RatingsConfig',
     'adhocracy4.reports.apps.ReportsConfig',
+    'adhocracy4.rules.apps.RulesConfig',
 
     # General components that define models or helpers
     'liqd_product.apps.contrib.apps.Config',


Test patch:
Repository: liqd/a4-product

Issue:
Translations incomplete
- partner page


Discussion:
<img width="410" alt="bildschirmfoto 2017-11-28 um 12 05 56" src="https://user-images.githubusercontent.com/11075214/33316541-90e55c40-d434-11e7-86b1-76fcd6e663d1.png">

In the dashboard:
<img width="328" alt="bildschirmfoto 2017-11-28 um 12 20 22" src="https://user-images.githubusercontent.com/11075214/33317130-955cce8c-d436-11e7-9ef3-d3e52700e8b9.png">

<img width="966" alt="bildschirmfoto 2017-11-28 um 12 25 00" src="https://user-images.githubusercontent.com/11075214/33317368-36e79372-d437-11e7-864b-c613152be4c9.png">

<img width="949" alt="bildschirmfoto 2017-11-28 um 12 28 19" src="https://user-images.githubusercontent.com/11075214/33317505-a7d761b6-d437-11e7-847e-8376beb62eaa.png">

https://github.com/liqd/a4-product/issues/130
https://github.com/liqd/a4-product/issues/127

Resolving patch:
diff --git a/liqd_product/apps/contrib/management/commands/makemessages.py b/liqd_product/apps/contrib/management/commands/makemessages.py
--- a/liqd_product/apps/contrib/management/commands/makemessages.py
+++ b/liqd_product/apps/contrib/management/commands/makemessages.py
@@ -25,8 +25,15 @@ def find_files(self, root):
             settings.BASE_DIR, 'node_modules', 'adhocracy4', 'adhocracy4'
         ))
         a4_paths = super().find_files(get_module_dir('adhocracy4'))
+        mbjs_paths = super().find_files(path.join(
+            settings.BASE_DIR, 'node_modules', 'a4-meinberlin', 'meinberlin'
+        ))
+        mb_paths = super().find_files(get_module_dir('meinberlin'))
+
         liqd_product_paths = super().find_files(
             path.relpath(get_module_dir('liqd_product'))
         )
 
-        return a4js_paths + a4_paths + liqd_product_paths
+        return a4js_paths + a4_paths + \
+            mbjs_paths + mb_paths + \
+            liqd_product_paths


Test patch:
Repository: liqd/a4-product

Issue:
tile images on partner page are not cut to same size
![screenshot from 2017-11-28 12-12-35](https://user-images.githubusercontent.com/8178179/33316792-7b8fc848-d435-11e7-8723-8849b5804bce.png)



Discussion:

Resolving patch:
diff --git a/liqd_product/config/urls.py b/liqd_product/config/urls.py
--- a/liqd_product/config/urls.py
+++ b/liqd_product/config/urls.py
@@ -16,6 +16,7 @@
 from adhocracy4.reports.api import ReportViewSet
 from liqd_product.apps.partners.urlresolvers import partner_patterns
 from liqd_product.apps.users.decorators import user_is_project_admin
+from meinberlin.apps.contrib import views as contrib_views
 from meinberlin.apps.documents.api import DocumentViewSet
 from meinberlin.apps.polls.api import PollViewSet
 from meinberlin.apps.polls.api import VoteViewSet
@@ -67,6 +68,7 @@
     url(r'^browse/', never_cache(user_is_project_admin(ck_views.browse)),
         name='ckeditor_browse'),
 
+    url(r'^components/$', contrib_views.ComponentLibraryView.as_view()),
     url(r'^jsi18n/$', javascript_catalog,
         js_info_dict, name='javascript-catalog'),
 


Test patch:
Repository: liqd/a4-product

Issue:
homepage field in user profile is not an URL
![bildschirmfoto 2017-11-28 um 12 27 56](https://user-images.githubusercontent.com/2905743/33317497-a3e67d94-d437-11e7-9df5-3472fa8b2ee2.png)

I can just add a string, but in profile a (invalid) link is made out of it



Discussion:
Currently this is a `CharField`. So we have two options: Either change it to a `URLField` or not display a link.

Resolving patch:
diff --git a/liqd_product/apps/users/migrations/0004_use_url_field_for_homepage.py b/liqd_product/apps/users/migrations/0004_use_url_field_for_homepage.py
new file mode 100644
--- /dev/null
+++ b/liqd_product/apps/users/migrations/0004_use_url_field_for_homepage.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.7 on 2017-12-06 12:47
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('liqd_product_users', '0003_bio_text_field'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='user',
+            name='homepage',
+            field=models.URLField(blank=True, max_length=50, verbose_name='Homepage'),
+        ),
+    ]
diff --git a/liqd_product/apps/users/models.py b/liqd_product/apps/users/models.py
--- a/liqd_product/apps/users/models.py
+++ b/liqd_product/apps/users/models.py
@@ -79,7 +79,7 @@ class User(auth_models.AbstractBaseUser, auth_models.PermissionsMixin):
         verbose_name=_('Facebook name'),
     )
 
-    homepage = models.CharField(
+    homepage = models.URLField(
         blank=True,
         max_length=50,
         verbose_name=_('Homepage'),


Test patch:
Repository: liqd/a4-product

Issue:
HTTP Header
I'll propose to set the following HTTP header

* `HttpOnly` 
* `X-XSS-Protection`
* `X-Content-Type-Options: nosniff`
* ~HSTS~ set via nginx

See [OWASP headers project](https://www.owasp.org/index.php/OWASP_Secure_Headers_Project) for details


Discussion:

Resolving patch:
diff --git a/liqd_product/config/settings/base.py b/liqd_product/config/settings/base.py
--- a/liqd_product/config/settings/base.py
+++ b/liqd_product/config/settings/base.py
@@ -386,3 +386,7 @@
 # The default language is used for emails and strings
 # that are stored translated to the database.
 DEFAULT_LANGUAGE = 'de'
+
+SECURE_BROWSER_XSS_FILTER = True
+SESSION_COOKIE_HTTPONLY = True
+SECURE_CONTENT_TYPE_NOSNIFF = True


Test patch: