internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: open-mmlab/mmdetection

Issue:
I want to set the depth of resnet to 18
I want to set the depth of resnet to 18.
But it occur the problem: **AssertionError: FasterRCNN: ResNet: Not implemented yet.**
And could you tell me how to reset the **depth** of resnet?


Discussion:
Refer to this https://github.com/open-mmlab/mmdetection/blob/f08548bfd6d394a82566022709b5ce9e6b0a855e/configs/ld/ld_r18_gflv1_r101_fpn_coco_1x.py#L11-L19
And, need i change the **FPN in_channel** just like this?
https://github.com/open-mmlab/mmdetection/blob/f08548bfd6d394a82566022709b5ce9e6b0a855e/configs/ld/ld_r18_gflv1_r101_fpn_coco_1x.py#L10-L26

Yes, the input channels of FPN should also be changed.

Resolving patch:
diff --git a/configs/retinanet/retinanet_r18_fpn_1x8_1x_coco.py b/configs/retinanet/retinanet_r18_fpn_1x8_1x_coco.py
new file mode 100644
--- /dev/null
+++ b/configs/retinanet/retinanet_r18_fpn_1x8_1x_coco.py
@@ -0,0 +1,23 @@
+_base_ = [
+    '../_base_/models/retinanet_r50_fpn.py',
+    '../_base_/datasets/coco_detection.py',
+    '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py'
+]
+
+# data
+data = dict(samples_per_gpu=8)
+
+# optimizer
+model = dict(
+    backbone=dict(
+        depth=18,
+        init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet18')),
+    neck=dict(in_channels=[64, 128, 256, 512]))
+
+# Note: If the learning rate is set to 0.0025, the mAP will be 32.4.
+optimizer = dict(type='SGD', lr=0.005, momentum=0.9, weight_decay=0.0001)
+
+# NOTE: `auto_scale_lr` is for automatically scaling LR,
+# USER SHOULD NOT CHANGE ITS VALUES.
+# base_batch_size = (1 GPUs) x (8 samples per GPU)
+auto_scale_lr = dict(base_batch_size=8)
diff --git a/configs/retinanet/retinanet_r18_fpn_1x_coco.py b/configs/retinanet/retinanet_r18_fpn_1x_coco.py
new file mode 100644
--- /dev/null
+++ b/configs/retinanet/retinanet_r18_fpn_1x_coco.py
@@ -0,0 +1,18 @@
+_base_ = [
+    '../_base_/models/retinanet_r50_fpn.py',
+    '../_base_/datasets/coco_detection.py',
+    '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py'
+]
+
+# optimizer
+model = dict(
+    backbone=dict(
+        depth=18,
+        init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet18')),
+    neck=dict(in_channels=[64, 128, 256, 512]))
+optimizer = dict(type='SGD', lr=0.01, momentum=0.9, weight_decay=0.0001)
+
+# NOTE: `auto_scale_lr` is for automatically scaling LR,
+# USER SHOULD NOT CHANGE ITS VALUES.
+# base_batch_size = (8 GPUs) x (2 samples per GPU)
+auto_scale_lr = dict(base_batch_size=16)


Test patch:
Repository: open-mmlab/mmdetection

Issue:
Why dose the Deformable DETR only use the score of the first class to choose the topk proposals?
In the two-stage mode of Deformable DETR, I notice that the code choose the topk foreground proposals only by the score of the first class (In cocodataset wo have 80 calss in total)? Although I notice that Deformable DETR uses sigmoid + BCE loss, I doubt if it is reasonable to choose topk foreground proposals only by the first class score?

               **topk_proposals = torch.topk(enc_outputs_class[..., 0], topk, dim=1)[1]**



Discussion:
Although there are 80 classes in `enc_outputs_class`, but we only use the first element in `enc_outputs_class` which means foreground not the first class of 80 classes defined in coco. See https://github.com/open-mmlab/mmdetection/blob/3e2693151add9b5d6db99b944da020cba837266b/mmdet/models/dense_heads/deformable_detr_head.py#L241 . `enc_outputs_class` can also be set to only one class.

Resolving patch:
diff --git a/mmdet/models/utils/transformer.py b/mmdet/models/utils/transformer.py
--- a/mmdet/models/utils/transformer.py
+++ b/mmdet/models/utils/transformer.py
@@ -1007,6 +1007,14 @@ def forward(self,
                     self.decoder.num_layers](output_memory) + output_proposals
 
             topk = self.two_stage_num_proposals
+            # We only use the first channel in enc_outputs_class as foreground,
+            # the other (num_classes - 1) channels are actually not used.
+            # Its targets are set to be 0s, which indicates the first
+            # class (foreground) because we use [0, num_classes - 1] to
+            # indicate class labels, background class is indicated by
+            # num_classes (similar convention in RPN).
+            # See https://github.com/open-mmlab/mmdetection/blob/master/mmdet/models/dense_heads/deformable_detr_head.py#L241 # noqa
+            # This follows the official implementation of Deformable DETR.
             topk_proposals = torch.topk(
                 enc_outputs_class[..., 0], topk, dim=1)[1]
             topk_coords_unact = torch.gather(


Test patch:
Repository: open-mmlab/mmdetection

Issue:
[Bug] Bug in resnet's plugin
**Describe the bug**
- In the ResNet implementation of MMDET, there seems to be a problem in function [forward_function](https://github.com/open-mmlab/mmdetection/blob/master/mmdet/models/backbones/resnet.py#L242)
```python
  def forward_plugin(self, x, plugin_names):
      out = x
      for name in plugin_names:
          out = getattr(self, name)(x)
      return 
```
- If we have multiple plugins at one position, then, only the last one is valid

**Bug fix**
```python
  def forward_plugin(self, x, plugin_names):
      out = x
      for name in plugin_names:
          out = getattr(self, name)(out)
      return 
```


Discussion:
This is a bug. Thank you very much.

Resolving patch:
diff --git a/mmdet/models/backbones/resnet.py b/mmdet/models/backbones/resnet.py
--- a/mmdet/models/backbones/resnet.py
+++ b/mmdet/models/backbones/resnet.py
@@ -242,7 +242,7 @@ def make_block_plugins(self, in_channels, plugins):
     def forward_plugin(self, x, plugin_names):
         out = x
         for name in plugin_names:
-            out = getattr(self, name)(x)
+            out = getattr(self, name)(out)
         return out
 
     @property


Test patch:
Repository: open-mmlab/mmdetection

Issue:
TypeError: list indices must be integers or slices, not str
When I run the demo code **video_gpuaccel_demo.py**, it has the following error. How to solve it, thanks.

Traceback (most recent call last):
  File "demo/video_gpuaccel_demo.py", line 147, in <module>
    main()
  File "demo/video_gpuaccel_demo.py", line 102, in main
    batch_input_shape = prefetch_batch_input_shape(
  File "demo/video_gpuaccel_demo.py", line 60, in prefetch_batch_input_shape
    _, data_sample = model.data_preprocessor([data], False)
  File "C:\Anaconda\Anaconda\envs\mmdetection\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "c:\research\programmar\deeplearning\vehicle_classification\mmdet\models\data_preprocessors\data_preprocessor.py", line 121, in forward
    batch_pad_shape = self._get_pad_shape(data)
  File "c:\research\programmar\deeplearning\vehicle_classification\mmdet\models\data_preprocessors\data_preprocessor.py", line 154, in _get_pad_shape
    _batch_inputs = data['inputs']
TypeError: list indices must be integers or slices, not str



Discussion:

Resolving patch:
diff --git a/demo/video_gpuaccel_demo.py b/demo/video_gpuaccel_demo.py
--- a/demo/video_gpuaccel_demo.py
+++ b/demo/video_gpuaccel_demo.py
@@ -52,7 +52,9 @@ def prefetch_batch_input_shape(model: nn.Module, ori_wh: Tuple[int,
     test_pipeline = Compose(cfg.test_dataloader.dataset.pipeline)
     data = {'img': np.zeros((h, w, 3), dtype=np.uint8), 'img_id': 0}
     data = test_pipeline(data)
-    _, data_sample = model.data_preprocessor([data], False)
+    data['inputs'] = [data['inputs']]
+    data['data_samples'] = [data['data_samples']]
+    data_sample = model.data_preprocessor(data, False)['data_samples']
     batch_input_shape = data_sample[0].batch_input_shape
     return batch_input_shape
 
@@ -69,8 +71,8 @@ def pack_data(frame_resize: np.ndarray, batch_input_shape: Tuple[int, int],
         'scale_factor': (batch_input_shape[0] / ori_shape[0],
                          batch_input_shape[1] / ori_shape[1])
     })
-    frame_resize = torch.from_numpy(frame_resize).permute((2, 0, 1))
-    data = {'inputs': frame_resize, 'data_sample': data_sample}
+    frame_resize = torch.from_numpy(frame_resize).permute((2, 0, 1)).cuda()
+    data = {'inputs': [frame_resize], 'data_samples': [data_sample]}
     return data
 
 
@@ -112,7 +114,7 @@ def main():
         for i, (frame_resize, frame_origin) in enumerate(
                 zip(track_iter_progress(video_resize), video_origin)):
             data = pack_data(frame_resize, batch_input_shape, ori_shape)
-            result = model.test_step([data])[0]
+            result = model.test_step(data)[0]
 
             visualizer.add_datasample(
                 name='video',


Test patch:
Repository: OpenEnergyPlatform/oeplatform

Issue:
sorting database tables does not work
At http://193.175.187.164/dataedit/view/orig_geo_powerplants/renewable_power_plants_germany, 
when I click on a column (like electrical_capacity), nothing happens.



Discussion:

Resolving patch:
diff --git a/api/parser.py b/api/parser.py
--- a/api/parser.py
+++ b/api/parser.py
@@ -165,7 +165,7 @@ def parse_select(d):
             ss = ''
             ss += ' ORDER BY ' + parse_expression(ob)
             if 'ordering' in ob:
-                if ob['ordering'] in ['ASC', 'DESC']:
+                if ob['ordering'] in ['asc', 'desc']:
                     ss += ' ' + ob['ordering']
                 else:
                     ss += parse_operator(ob['ordering'])
@@ -266,6 +266,8 @@ def parse_expression(d):
         return ' * '
     if d['type'] == 'operator':
         return parse_operator(d)
+    if d['type'] == 'operator_binary':
+        return parse_operator(d)
     if d['type'] == 'function':
         return parse_function(d)
     if d['type'] == 'value':
@@ -297,6 +299,10 @@ def parse_operator(d):
         assert (read_pgid(d['function']))
         return '{f}({ops})'.format(f=d['function'], ops=', '.join(
             map(parse_expression, d['operands'])))
+    else:
+        return "%s %s %s" % (
+            parse_expression(d['left']), read_operator(d['operator'], d['right']),
+            parse_expression(d['right']))
     return d
 
 
diff --git a/doc/source/conf.py b/docs/source/conf.py
similarity index 97%
rename from doc/source/conf.py
rename to docs/source/conf.py
--- a/doc/source/conf.py
+++ b/docs/source/conf.py
@@ -16,6 +16,9 @@
 import os
 import shlex
 
+import sys
+from unittest.mock import MagicMock
+
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -296,3 +299,12 @@
 
 # Example configuration for intersphinx: refer to the Python standard library.
 intersphinx_mapping = {'https://docs.python.org/': None}
+
+
+class Mock(MagicMock):
+    @classmethod
+    def __getattr__(cls, name):
+            return Mock()
+
+MOCK_MODULES = ['shapely']
+sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
\ No newline at end of file


Test patch:
Repository: OpenEnergyPlatform/oeplatform

Issue:
Password Change False Alarm in OEP-Website
When you change your password, you type your old password and your new password. 

I did that and then a page showed up and said "something went wrong!". So I assumed I could not change my password. So I logout out and tried my old pass while login, it didn't work, however I could login with the new password I set.

So it actually changes your password, but gives you a false alert, and it makes you think you could not change your password.


Discussion:

Resolving patch:
diff --git a/login/migrations/0017_auto_20181119_1631.py b/login/migrations/0017_auto_20181119_1631.py
new file mode 100644
--- /dev/null
+++ b/login/migrations/0017_auto_20181119_1631.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11 on 2018-11-19 15:31
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('login', '0016_auto_20181018_1401'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='myuser',
+            name='is_native',
+            field=models.BooleanField(default=True),
+        ),
+    ]
diff --git a/login/views.py b/login/views.py
--- a/login/views.py
+++ b/login/views.py
@@ -236,9 +236,10 @@ def post(self, request):
             print(form.errors)
             return render(request, 'login/detach.html', {'form': form})
 
+
 class OEPPasswordChangeView(PasswordChangeView):
     template_name = 'login/generic_form.html'
-
+    success_url = '/'
 
 def activation_note(request):
     return render(request, 'login/activate.html')


Test patch:
Repository: OpenEnergyPlatform/oeplatform

Issue:
Table `api_constraints` is not in migrations
The table is required by some API functionalities, but is not covered by alembic yet.


Discussion:

Resolving patch:
diff --git a/oedb_datamodels/versions/7dd42bf4925b_defaults_edit.py b/oedb_datamodels/versions/7dd42bf4925b_defaults_edit.py
new file mode 100644
--- /dev/null
+++ b/oedb_datamodels/versions/7dd42bf4925b_defaults_edit.py
@@ -0,0 +1,46 @@
+"""Set defaults in meta table
+
+Revision ID: 7dd42bf4925b
+Revises: 96bafa638b4d
+Create Date: 2019-11-26 16:49:42.862276
+
+"""
+from alembic import op
+import sqlalchemy as sa
+
+
+# revision identifiers, used by Alembic.
+revision = '7dd42bf4925b'
+down_revision = '96bafa638b4d'
+branch_labels = None
+depends_on = None
+
+
+def upgrade():
+    op.alter_column(
+        "_edit_base", "_autocheck", existing_type=sa.Boolean,
+        server_default=sa.text("false")
+    )
+    op.alter_column(
+        "_edit_base", "_humancheck", existing_type=sa.Boolean,
+        server_default=sa.text("false")
+    )
+    op.alter_column(
+        "_edit_base", "_applied", existing_type=sa.Boolean,
+        server_default=sa.text("false")
+    )
+
+
+def downgrade():
+    op.alter_column(
+        "_edit_base", "_autocheck", existing_type=sa.Boolean,
+        server_default=None
+    )
+    op.alter_column(
+        "_edit_base", "_humancheck", existing_type=sa.Boolean,
+        server_default=None
+    )
+    op.alter_column(
+        "_edit_base", "_applied", existing_type=sa.Boolean,
+        server_default=None
+    )
diff --git a/oedb_datamodels/versions/96bafa638b4d_add_api_constraints.py b/oedb_datamodels/versions/96bafa638b4d_add_api_constraints.py
new file mode 100644
--- /dev/null
+++ b/oedb_datamodels/versions/96bafa638b4d_add_api_constraints.py
@@ -0,0 +1,39 @@
+"""Add API constraints table
+
+Revision ID: 96bafa638b4d
+Revises: 4ce486182650
+Create Date: 2019-11-26 15:33:05.377190
+
+"""
+from alembic import op
+import sqlalchemy as sa
+
+
+# revision identifiers, used by Alembic.
+revision = '96bafa638b4d'
+down_revision = '4ce486182650'
+branch_labels = None
+depends_on = None
+
+
+def upgrade():
+
+    op.create_table(
+        "api_constraints",
+        sa.Column("id", sa.BigInteger(), nullable=False, primary_key=True),
+        sa.Column("action", sa.String(length=100)),
+        sa.Column("constraint_type", sa.String(length=100)),
+        sa.Column("constraint_name", sa.String(length=100)),
+        sa.Column("constraint_parameter", sa.String(length=100)),
+        sa.Column("reference_table", sa.String(length=100)),
+        sa.Column("reference_column", sa.String(length=100)),
+        sa.Column("c_schema", sa.String(length=100)),
+        sa.Column("c_table", sa.String(length=100)),
+        sa.Column("reviewed", sa.Boolean, default=False),
+        sa.Column("changed", sa.Boolean, default=False),
+        schema="public",
+    )
+
+
+def downgrade():
+    op.drop_table("api_constraints", schema="public")
\ No newline at end of file


Test patch:
Repository: OpenEnergyPlatform/oeplatform

Issue:
The data versioning does not track change types
Change tables do not store the types of changes. "_type" has to be injected into queries


Discussion:

Resolving patch:
diff --git a/api/parser.py b/api/parser.py
--- a/api/parser.py
+++ b/api/parser.py
@@ -98,6 +98,7 @@ def set_meta_info(method, user, message=None):
     val_dict = {}
     val_dict["_user"] = user  # TODO: Add user handling
     val_dict["_message"] = message
+    val_dict["_type"] = method
     return val_dict
 
 


Test patch:
Repository: OpenEnergyPlatform/oeplatform

Issue:
SQLAlchemy>1.3 requires explicit columns 
The OEP uses strings at some point to represent columns. These must be made explicit as columns for [SQLAlchemy 1.3](https://docs.sqlalchemy.org/en/13/core/tutorial.html#using-more-specific-text-with-table-literal-column-and-column) 


Discussion:

Resolving patch:
diff --git a/api/parser.py b/api/parser.py
--- a/api/parser.py
+++ b/api/parser.py
@@ -203,6 +203,11 @@ def parse_select(d):
         if "fields" in d and d["fields"]:
             L = []
             for field in d["fields"]:
+                if isinstance(field, str):
+                    field = dict(
+                        type="column",
+                        column=field
+                    )
                 col = parse_expression(field)
                 if "as" in field:
                     col.label(read_pgid(field["as"]))


Test patch:
Repository: OpenEnergyPlatform/oeplatform

Issue:
Dataedit: Querying 2 tags does not work
Querying two tags throws an error, see e.g: 

https://openenergy-platform.org/dataedit/view/scenario?query=&tags=163&tags=185

Which I did by selecting two tags in the filters sidebar. 



Discussion:

Resolving patch:
diff --git a/dataedit/views.py b/dataedit/views.py
--- a/dataedit/views.py
+++ b/dataedit/views.py
@@ -278,7 +278,7 @@ def listschemas(request):
             if row.schemaname in schema_whitelist
             and not row.schemaname.startswith("_")
             and (not searchedQueryString or searchedQueryString in row.schemaname or list(filter(lambda tableName: tableName and searchedQueryString in tableName, row.tables)))
-            and (not searchedTagIds or numpy.intersect1d(searchedTagIds, list(filter(lambda x: x is not None, row.tag_ids))))
+            and (not searchedTagIds or set(filter(lambda x: x is not None, row.tag_ids)).issuperset(searchedTagIds))
         ],
         key=lambda x: x[0],
     )
@@ -387,7 +387,7 @@ def listtables(request, schema_name):
 
     # Apply tag filter later on, because I am not smart enough to do it inline.
     tables = list(filter(
-        lambda tableEntry: not searchedTagIds or numpy.intersect1d(searchedTagIds, list(map(lambda tag: tag['id'], tableEntry[2]))),
+        lambda tableEntry: not searchedTagIds or set(map(lambda tag: tag['id'], tableEntry[2])).issuperset(searchedTagIds),
         tables
     ))
 


Test patch:
Repository: OpenEnergyPlatform/oeplatform

Issue:
Add OEO Steering Committee Subpage
The OEO Steering Committee needs its own web page, which should be a sub page of the OEP. Please create such a sub page @jh-RLI . I think it makes sense to link it somewhere under ontology.

https://openenergy-platform.org/ontology/

The URL would then be 

https://openenergy-platform.org/ontology/oeo-steering-committee

Content for the page is here:

https://github.com/OpenEnergyPlatform/ontology/wiki/OEO-Steering-Committee

An issue to create an English translation is open here: https://github.com/OpenEnergyPlatform/ontology/issues/313

Creating the page and making it look simple, but decent enough are priorities. The final text and location can easily be changed later on. Contact me if you have any questions. 

Feel free to give feedback make changes to this issue @Ludee 


Discussion:

Resolving patch:
diff --git a/ontology/urls.py b/ontology/urls.py
--- a/ontology/urls.py
+++ b/ontology/urls.py
@@ -7,4 +7,7 @@
 
 urlpatterns = [
     url(r"^$", TemplateView.as_view(template_name="ontology/about.html")),
+    url(r"^ontology/oeo-steering-committee$",
+        TemplateView.as_view(template_name="ontology/oeo-steering-committee.html"),
+        name="oeo-s-c"),
 ]


Test patch:
Repository: OpenEnergyPlatform/oeplatform

Issue:
Fix OEO page and add OEO pages to navigation bar
- [x] Fix linebreak in link (Dipl.-Ing.)
- [x] Add Daniel to list
- [x] Add pages to navigation bar


Discussion:

Resolving patch:
diff --git a/ontology/urls.py b/ontology/urls.py
--- a/ontology/urls.py
+++ b/ontology/urls.py
@@ -7,9 +7,11 @@
 
 urlpatterns = [
   url(r"^$", TemplateView.as_view(template_name="ontology/about.html")),
-  url(r"^ontology/oeo-steering-committee$",
+  url(r"^ontology/$", TemplateView.as_view(template_name="ontology/about.html")),
+  url(r"^oeo-steering-committee/$",
       TemplateView.as_view(template_name="ontology/oeo-steering-committee.html"),
       name="oeo-s-c"),
+  url(r"^ontology/oeo-steering-committee/$", TemplateView.as_view(template_name="ontology/oeo-steering-committee.html")),
   url(r"^(?P<ontology>[\w_-]+)\/releases(\/v?(?P<version>[\d\.]+))?\/imports\/(?P<file>[\w_-]+)(.(?P<extension>[\w_-]+))?$",
       views.OntologyStatics.as_view(), {"imports": True}),
 
diff --git a/ontology/views.py b/ontology/views.py
--- a/ontology/views.py
+++ b/ontology/views.py
@@ -30,6 +30,8 @@ def collect_modules(path):
 
 class OntologyOverview(View):
     def get(self, request, ontology, module_or_id=None, version=None, imports=False):
+        if not os.path.exists(f"{ONTOLOGY_FOLDER}/{ontology}"):
+            raise Http404
         versions = os.listdir(f"{ONTOLOGY_FOLDER}/{ontology}")
         if not version:
             version = max((d for d in versions), key=lambda d:[int(x) for x in d.split(".")])


Test patch:
Repository: OpenEnergyPlatform/oeplatform

Issue:
Wrong HTML in password reset e-mail
I just reset my OEP password using the form on the website. I got the following e-mail:

> Hello<br>
> <br>
>
> You are receiving this email because you requested a password reset for your user account on openenergy-platform.org.
>
> Please follow this link to choose a new password:
>
> https://openenergy-platform.org/user/reset/MTIw/abcdefghijklmnopqrstuvwxyz/
> 
> And - just in case you forgot - your username is: ABCDEFGH
>
> <br>
> If you have any questions, please do not hesitate to get in touch with us via the contact form <br> <a href="https:///contact">https:///contact</a><br>
> <br>
>Best regards,<br>
> the  Team<br>

The `<br>` tags should not show up and the contact link is not valid.


Discussion:
Hey, I'd like to work on this one. What should the valid link be?

Resolving patch:
diff --git a/login/mail.py b/login/mail.py
--- a/login/mail.py
+++ b/login/mail.py
@@ -8,7 +8,7 @@
 def send_verification_mail(recipient, token):
     veri_url = "https://{host}/user/activate/{token}".format(host=URL, token=token)
     html_content = render_to_string(
-        "mails/verification_mail.html", {"url": veri_url, "base_url": URL}
+        "mails/verification_mail.html", {"url": veri_url, "site_name": URL}
     )
     send_mail(
         "OEP account - E-Mail validation",
diff --git a/login/urls.py b/login/urls.py
--- a/login/urls.py
+++ b/login/urls.py
@@ -3,6 +3,9 @@
 from login import views
 
 urlpatterns = [
+    url("^password_reset/$", views.PasswordResetView.as_view(
+        html_email_template_name="registration/password_reset_email.html",
+        email_template_name="registration/password_reset_email.txt")),
     url("^", include("django.contrib.auth.urls")),
     url(r"^profile/(?P<user_id>[\d]+)$", views.ProfileView.as_view(), name="input"),
     url(
diff --git a/login/views.py b/login/views.py
--- a/login/views.py
+++ b/login/views.py
@@ -15,6 +15,7 @@
 from .models import ADMIN_PERM, GroupMembership, UserGroup
 from .models import myuser as OepUser
 
+from oeplatform.settings import URL
 
 class ProfileView(View):
     def get(self, request, user_id):


Test patch: