internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: agconti/cookiecutter-django-rest

Issue:
Updated drf page number pagination settings
http://www.django-rest-framework.org/api-guide/pagination/#pagenumberpagination

``` python
REST_FRAMEWORK = {
    'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
    'PAGE_SIZE': 100
}
```



Discussion:

Resolving patch:
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
+++ b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
@@ -165,10 +165,9 @@ class Common(Configuration):
 
     # Django Rest Framework
     REST_FRAMEWORK = {
-        'PAGINATE_BY': 30,
-        'PAGINATE_BY_PARAM': 'per_page',
-        'MAX_PAGINATE_BY': 1000,
-        "DATETIME_FORMAT": "%Y-%m-%dT%H:%M:%S%z",
+        'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
+        'PAGE_SIZE': 100,
+        'DATETIME_FORMAT': '%Y-%m-%dT%H:%M:%S%z',
         'DEFAULT_RENDERER_CLASSES': (
             'rest_framework.renderers.JSONRenderer',
             'rest_framework.renderers.BrowsableAPIRenderer',


Test patch:
Repository: agconti/cookiecutter-django-rest

Issue:
Set APPEND_SLASH to False
Since Django cannot send POST data in a `301` redirect,  `POST`s to an api at `api/v1/resource` will fail with a `400` bad request, assuming the configured route is `api/v1/resource/`. With `APPEND_SLASH` set to false, `POST`s to an api at `api/v1/resource` will fail with a `404`, letting the developer know they have forgotten a slash. 

While its convenient to redirect `GET` requests, from the perspective of consuming an api; its preferred to have a more direct and straight forward errors.  



Discussion:

Resolving patch:
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
+++ b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
@@ -86,6 +86,7 @@ class Common(Configuration):
     DATABASES = values.DatabaseURLValue('postgres://localhost/{{cookiecutter.app_name}}')
 
     # General
+    APPEND_SLASH = False
     TIME_ZONE = 'UTC'
     LANGUAGE_CODE = 'en-us'
     SITE_ID = 1


Test patch:
Repository: agconti/cookiecutter-django-rest

Issue:
Set versatile image's field to 'create_images_on_demand' to false in production by default.
``` python
VERSATILEIMAGEFIELD_SETTINGS['create_images_on_demand'] = False
```



Discussion:

Resolving patch:
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/production.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/production.py
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/production.py
+++ b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/production.py
@@ -97,3 +97,5 @@ class Production(Common):
             'DEFAULT_TIMEOUT': 500,
         },
     }
+
+    Common.VERSATILEIMAGEFIELD_SETTINGS['create_images_on_demand'] = False


Test patch:
Repository: agconti/cookiecutter-django-rest

Issue:
Scale heroku dynos to hobby tier
We need to use a paid tier to run commands like `createsuperuser`



Discussion:

Resolving patch:
diff --git a/{{cookiecutter.github_repository_name}}/fabfile.py b/{{cookiecutter.github_repository_name}}/fabfile.py
--- a/{{cookiecutter.github_repository_name}}/fabfile.py
+++ b/{{cookiecutter.github_repository_name}}/fabfile.py
@@ -133,7 +133,7 @@ def ps():
     Scales a web dyno on Heroku
     """
     require('environment')
-    local('heroku ps:scale web=1 --remote {}'.format(env.environment))
+    local('heroku ps:scale web=1:hobby --remote {}'.format(env.environment))
 
 
 def open_heroku():


Test patch:
Repository: agconti/cookiecutter-django-rest

Issue:
Remove duplicate append slash setting in `config/common`



Discussion:

Resolving patch:
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
+++ b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
@@ -61,9 +61,6 @@ class Common(Configuration):
     SECRET_KEY = 'Not a secret'
     WSGI_APPLICATION = 'wsgi.application'
 
-    # Allow for less strict handling of urls
-    APPEND_SLASH = values.BooleanValue(True)
-
     # Migrations
     MIGRATION_MODULES = {
         'sites': 'contrib.sites.migrations'
@@ -86,7 +83,7 @@ class Common(Configuration):
     DATABASES = values.DatabaseURLValue('postgres://localhost/{{cookiecutter.app_name}}')
 
     # General
-    APPEND_SLASH = False
+    APPEND_SLASH = values.BooleanValue(False)
     TIME_ZONE = 'UTC'
     LANGUAGE_CODE = 'en-us'
     SITE_ID = 1


Test patch:
Repository: agconti/cookiecutter-django-rest

Issue:
Remove django sites configuration since its not needed for rest apis



Discussion:

Resolving patch:
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
+++ b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
@@ -45,11 +45,6 @@ class Common(Configuration):
     SECRET_KEY = 'Not a secret'
     WSGI_APPLICATION = 'wsgi.application'
 
-    # Migrations
-    MIGRATION_MODULES = {
-        'sites': 'contrib.sites.migrations'
-    }
-
     # Email
     EMAIL_BACKEND = values.Value('django.core.mail.backends.smtp.EmailBackend')
 
@@ -64,7 +59,6 @@ class Common(Configuration):
     APPEND_SLASH = values.BooleanValue(False)
     TIME_ZONE = 'UTC'
     LANGUAGE_CODE = 'en-us'
-    SITE_ID = 1
     # If you set this to False, Django will make some optimizations so as not
     # to load the internationalization machinery.
     USE_I18N = False


Test patch:
Repository: agconti/cookiecutter-django-rest

Issue:
Update dependencies
- [x] boto (2.38.0) - Latest: 2.39.0 [wheel]
- [x] coverage (3.7.1) - Latest: 4.0.3 [wheel]
- [x] dj-database-url (0.3.0) - Latest: 0.4.0 [sdist]
- [x] Django (1.9) - Latest: 1.9.5 [wheel]
- [x] django-filter (0.11.0) - Latest: 0.13.0 [wheel]
- [x] django-nose (1.4.1) - Latest: 1.4.3 [wheel]
- [x] django-versatileimagefield (1.2) - Latest: 1.3 [wheel]
- [x] djangorestframework (3.3.2) - Latest: 3.3.3 [wheel]
- [x] factory-boy (2.6.0) - Latest: 2.6.1 [wheel]
- [x] fake-factory (0.5.3) - Latest: 0.5.7 [wheel]
- [x] flake8 (2.4.1) - Latest: 2.5.4 [wheel]
- [x] ipdb (0.8.1) - Latest: 0.9.0 [sdist]
- [x] ipython (4.0.1) - Latest: 4.1.2 [wheel]
- [x] Markdown (2.6.5) - Latest: 2.6.6 [sdist]
- [x] mkdocs (0.14.0) - Latest: 0.15.3 [wheel]
- [x] pytz (2015.7) - Latest: 2016.3 [wheel]
- [x] whitenoise (2.0.6) - Latest: 3.0 [wheel]



Discussion:

Resolving patch:
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
+++ b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
@@ -68,7 +68,7 @@ class Common(Configuration):
 
     # Static Files
     STATIC_ROOT = join(os.path.dirname(BASE_DIR), 'staticfiles')
-    STATICFILES_DIRS = [join(os.path.dirname(BASE_DIR), 'static'),]
+    STATICFILES_DIRS = [join(os.path.dirname(BASE_DIR), 'static'), ]
     STATIC_URL = '/static/'
     STATICFILES_FINDERS = (
         'django.contrib.staticfiles.finders.FileSystemFinder',


Test patch:
diff --git a/{{cookiecutter.github_repository_name}}/requirements/test.txt b/{{cookiecutter.github_repository_name}}/requirements/test.txt
--- a/{{cookiecutter.github_repository_name}}/requirements/test.txt
+++ b/{{cookiecutter.github_repository_name}}/requirements/test.txt
@@ -5,14 +5,14 @@
 mock==1.3.0
 
 # Fixtures
-factory-boy==2.6.0
+factory-boy==2.6.1
 
 # Test Runner
-django-nose==1.4.1
+django-nose==1.4.3
 nose-progressive==1.5.1
 
 # Code Coverage
-coverage==3.7.1
+coverage==4.0.3
 
 # Style Enforcement
-flake8==2.4.1
+flake8==2.5.4
Repository: agconti/cookiecutter-django-rest

Issue:
Update `IsOwnerOrReadOnly` permission docstring to be more clear



Discussion:

Resolving patch:
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/permissions.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/permissions.py
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/permissions.py
+++ b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/permissions.py
@@ -4,7 +4,6 @@
 class IsOwnerOrReadOnly(permissions.BasePermission):
     """
     Object-level permission to only allow owners of an object to edit it.
-    Assumes the model instance has an `owner` attribute.
     """
 
     def has_object_permission(self, request, view, obj):


Test patch:
Repository: agconti/cookiecutter-django-rest

Issue:
Add `created_on_demand` versatile image field to True for local development



Discussion:

Resolving patch:
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/local.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/local.py
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/local.py
+++ b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/local.py
@@ -28,6 +28,10 @@ class Local(Common):
     EMAIL_PORT = 1025
     EMAIL_BACKEND = values.Value('django.core.mail.backends.console.EmailBackend')
 
+    # Vesitle Image Field settings
+    VERSATILEIMAGEFIELD_SETTINGS = Common.VERSATILEIMAGEFIELD_SETTINGS
+    VERSATILEIMAGEFIELD_SETTINGS['create_images_on_demand'] = True
+
     # Django RQ local settings
     RQ_QUEUES = {
         'default': {


Test patch:
Repository: agconti/cookiecutter-django-rest

Issue:
Add RQ_SHOW_ADMIN_LINK to true in config/common



Discussion:

Resolving patch:
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
+++ b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
@@ -194,3 +194,9 @@ class Common(Configuration):
         'placeholder_directory_name': '__placeholder__',
         'create_images_on_demand': False
     }
+
+    # django-rq
+    # Adds dashboard link for queues in /admin, This will override the default
+    # admin template so it may interfere with other apps that modify the
+    # default admin template. If you're using such an app, simply remove this.
+    RQ_SHOW_ADMIN_LINK = True
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/urls.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/urls.py
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/urls.py
+++ b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/urls.py
@@ -15,6 +15,7 @@
 
 urlpatterns = [
     url(r'^admin/', include(admin.site.urls)),
+    url(r'^django-rq/', include('django_rq.urls')),
     url(r'^api/v1/', include('authentication.urls')),
     url(r'^api/v1/', include(router.urls)),
 


Test patch:
Repository: agconti/cookiecutter-django-rest

Issue:
Set django storages default acl to public read



Discussion:

Resolving patch:
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/production.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/production.py
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/production.py
+++ b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/production.py
@@ -55,6 +55,7 @@ class Production(Common):
     AWS_ACCESS_KEY_ID = values.Value('DJANGO_AWS_ACCESS_KEY_ID')
     AWS_SECRET_ACCESS_KEY = values.Value('DJANGO_AWS_SECRET_ACCESS_KEY')
     AWS_STORAGE_BUCKET_NAME = values.Value('DJANGO_AWS_STORAGE_BUCKET_NAME')
+    AWS_DEFAULT_ACL = values.Value('public-read')
     AWS_AUTO_CREATE_BUCKET = True
     AWS_QUERYSTRING_AUTH = False
     MEDIA_URL = 'https://s3.amazonaws.com/{}/'.format(AWS_STORAGE_BUCKET_NAME)


Test patch:
Repository: agconti/cookiecutter-django-rest

Issue:
Limit default pagination size to 10



Discussion:

Resolving patch:
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
+++ b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
@@ -167,7 +167,7 @@ class Common(Configuration):
     # Django Rest Framework
     REST_FRAMEWORK = {
         'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
-        'PAGE_SIZE': 100,
+        'PAGE_SIZE': int(os.getenv('DJANGO_PAGINATION_LIMIT', 10)),
         'DATETIME_FORMAT': '%Y-%m-%dT%H:%M:%S%z',
         'DEFAULT_RENDERER_CLASSES': (
             'rest_framework.renderers.JSONRenderer',


Test patch:
Repository: agconti/cookiecutter-django-rest

Issue:
Update IsOwnerOrReadOnly to IsUserOrReadOnly



Discussion:

Resolving patch:
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/permissions.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/permissions.py
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/permissions.py
+++ b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/permissions.py
@@ -1,7 +1,7 @@
 from rest_framework import permissions
 
 
-class IsOwnerOrReadOnly(permissions.BasePermission):
+class IsUserOrReadOnly(permissions.BasePermission):
     """
     Object-level permission to only allow owners of an object to edit it.
     """
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/views.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/views.py
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/views.py
+++ b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/views.py
@@ -2,7 +2,7 @@
 from rest_framework.permissions import AllowAny
 
 from .models import User
-from .permissions import IsOwnerOrReadOnly
+from .permissions import IsUserOrReadOnly
 from .serializers import CreateUserSerializer, UserSerializer
 
 
@@ -15,7 +15,7 @@ class UserViewSet(mixins.CreateModelMixin,
     """
     queryset = User.objects.all()
     serializer_class = UserSerializer
-    permission_classes = (IsOwnerOrReadOnly,)
+    permission_classes = (IsUserOrReadOnly,)
 
     def create(self, request, *args, **kwargs):
         self.serializer_class = CreateUserSerializer


Test patch:
Repository: agconti/cookiecutter-django-rest

Issue:
Update logging config to match django 1.9 changes
https://docs.djangoproject.com/en/1.9/topics/logging/#topic-logging-parts-loggers



Discussion:

Resolving patch:
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
+++ b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
@@ -113,11 +113,6 @@ class Common(Configuration):
     LOGGING = {
         'version': 1,
         'disable_existing_loggers': False,
-        'filters': {
-            'require_debug_false': {
-                '()': 'django.utils.log.RequireDebugFalse'
-            }
-        },
         'formatters': {
             'verbose': {
                 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
@@ -130,14 +125,15 @@ class Common(Configuration):
                 'datefmt': '%H:%M:%S',
             },
         },
-        'handlers': {
-            'mail_admins': {
-                'level': 'ERROR',
-                'filters': ['require_debug_false'],
-                'class': 'django.utils.log.AdminEmailHandler'
+        'filters': {
+            'require_debug_true': {
+                '()': 'django.utils.log.RequireDebugTrue',
             },
+        },
+        'handlers': {
             'console': {
-                'level': 'DEBUG',
+                'level': 'INFO',
+                'filters': ['require_debug_true'],
                 'class': 'logging.StreamHandler',
                 'formatter': 'simple'
             },
@@ -147,17 +143,25 @@ class Common(Configuration):
                 'formatter': 'rq_console',
                 'exclude': ['%(asctime)s'],
             },
+            'mail_admins': {
+                'level': 'ERROR',
+                'class': 'django.utils.log.AdminEmailHandler'
+            }
         },
         'loggers': {
+            'django': {
+                'handlers': ['console'],
+                'propagate': True,
+            },
             'django.request': {
                 'handlers': ['mail_admins'],
                 'level': 'ERROR',
-                'propagate': True
+                'propagate': False,
             },
             'rq.worker': {
                 'handlers': ['rq_console'],
                 'level': 'DEBUG'
-            },
+            }
         }
     }
 


Test patch:
Repository: agconti/cookiecutter-django-rest

Issue:
Update Managers to Admins in `common.py`



Discussion:

Resolving patch:
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
+++ b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
@@ -48,7 +48,7 @@ class Common(Configuration):
     # Email
     EMAIL_BACKEND = values.Value('django.core.mail.backends.smtp.EmailBackend')
 
-    MANAGERS = (
+    ADMINS = (
         ('Author', '{{cookiecutter.email}}'),
     )
 


Test patch:
Repository: agconti/cookiecutter-django-rest

Issue:
Move forms in `users/admin` to `users/forms`



Discussion:

Resolving patch:
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/admin.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/admin.py
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/admin.py
+++ b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/admin.py
@@ -1,36 +1,9 @@
-from __future__ import absolute_import, unicode_literals
-
-from django import forms
 from django.contrib import admin
 from django.contrib.auth.admin import UserAdmin as AuthUserAdmin
-from django.contrib.auth.forms import UserChangeForm, UserCreationForm
-
+from .forms import CustomUserChangeForm, CustomUserCreationForm
 from .models import User
 
 
-class CustomUserChangeForm(UserChangeForm):
-
-    class Meta(UserChangeForm.Meta):
-        model = User
-
-
-class CustomUserCreationForm(UserCreationForm):
-
-    # http://james.lin.net.nz/2013/06/08/django-custom-user-model-in-admin-relation-auth_user-does-not-exist/
-    def clean_username(self):
-        # Since User.username is unique, this check is redundant,
-        # but it sets a nicer error message than the ORM. See #13147.
-        username = self.cleaned_data["username"]
-        try:
-            User._default_manager.get(username=username)
-        except User.DoesNotExist:
-            return username
-        raise forms.ValidationError(self.error_messages['duplicate_username'])
-
-    class Meta(UserCreationForm.Meta):
-        model = User
-
-
 @admin.register(User)
 class UserAdmin(AuthUserAdmin):
     form = CustomUserChangeForm
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/forms.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/forms.py
new file mode 100644
--- /dev/null
+++ b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/forms.py
@@ -0,0 +1,27 @@
+from __future__ import absolute_import, unicode_literals
+from django import forms
+from django.contrib.auth.forms import UserChangeForm, UserCreationForm
+from .models import User
+
+
+class CustomUserChangeForm(UserChangeForm):
+
+    class Meta(UserChangeForm.Meta):
+        model = User
+
+
+class CustomUserCreationForm(UserCreationForm):
+
+    # http://james.lin.net.nz/2013/06/08/django-custom-user-model-in-admin-relation-auth_user-does-not-exist/
+    def clean_username(self):
+        # Since User.username is unique, this check is redundant,
+        # but it sets a nicer error message than the ORM. See #13147.
+        username = self.cleaned_data["username"]
+        try:
+            User._default_manager.get(username=username)
+        except User.DoesNotExist:
+            return username
+        raise forms.ValidationError(self.error_messages['duplicate_username'])
+
+    class Meta(UserCreationForm.Meta):
+        model = User


Test patch:
Repository: agconti/cookiecutter-django-rest

Issue:
Update MIDDLEWARE_CLASSES setting to MIDDLEWARE



Discussion:

Resolving patch:
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
+++ b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
@@ -29,8 +29,8 @@ class Common(Configuration):
 
     )
 
-    # https://docs.djangoproject.com/en/1.8/topics/http/middleware/
-    MIDDLEWARE_CLASSES = (
+    # https://docs.djangoproject.com/en/1.10/topics/http/middleware/
+    MIDDLEWARE = (
         'django.contrib.sessions.middleware.SessionMiddleware',
         'django.middleware.common.CommonMiddleware',
         'django.middleware.csrf.CsrfViewMiddleware',
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/local.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/local.py
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/local.py
+++ b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/local.py
@@ -17,6 +17,7 @@ class Local(Common):
     TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
     NOSE_ARGS = [
         BASE_DIR,
+        '-s',
         '--nologcapture',
         '--with-coverage',
         '--with-progressive',


Test patch: