Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SystemCheckError #1

Closed
dkdndes opened this issue Jan 11, 2018 · 4 comments
Closed

SystemCheckError #1

dkdndes opened this issue Jan 11, 2018 · 4 comments

Comments

@dkdndes
Copy link

dkdndes commented Jan 11, 2018

The following command generates the attached error log

$ python run_tests.py

'''
Creating test database for alias 'default'...
SystemCheckError: System check identified some issues:

ERRORS:
?: (rest_registration.E001) RESET_PASSWORD_VERIFICATION_URL is not set
?: (rest_registration.E002) register verification is enabled, but REGISTER_VERIFICATION_URL is not set
?: (rest_registration.E003) register email verification is enabled, but REGISTER_EMAIL_VERIFICATION_URL is not set
?: (rest_registration.E004) VERIFICATION_FROM_EMAIL is not set
'''

@dkdndes
Copy link
Author

dkdndes commented Jan 12, 2018

I tried to see if I can fix it. For that reason generated a separate Django project, added "rest_registration" and the setting from your current README.

It executes without errors

 $ python manage.py check

but

 $ python manage.py test 

finds several errors in the tests provided. One in particular, which relates to Django Rest Framework tokens. It seems that the current DRF is not supported anymore.

The setup has not changed anything on the behavior of

 $ python run_tests.py 

It continues to fail with the above message. I forked your repository and corrected some minor pep8 issues but overall found some I would not be sure how to fix.

@apragacz
Copy link
Owner

Hi, thanks for reporting the bug. I was able to reproduce it with the newest version of Django and DRF. I'm looking into it right now, hopefully I will be able to fix the issue during this weekend.

apragacz added a commit that referenced this issue Jan 13, 2018
* providing initial REST_REGISTRATION setting to avoid system check
  errors when running tests
* bumping to Django 1.10 and fixing is_authenticated Django API change
* fixing missing e-mail in register tests causing email to not be sent
@apragacz
Copy link
Owner

Hi, It looks that I fixed the problem. Looks that from Django 1.11 onwards the test runner runs the system checks (see https://docs.djangoproject.com/en/2.0/releases/1.11/#tests) so I added minimal setup in test settings to avoid this problem. The changes are already in the master branch. Hopefully I will release new version 0.3.0 today or tomorrow. I also want to release version 0.2.1, which will disallow using Django version 1.11 and higher versions.

I also found some changes introduced in Django 1.10, like is_authenticated user attribute (see https://docs.djangoproject.com/en/2.0/releases/1.10/#user-is-auth-anon-deprecation) which are breaking compatibility in Django 2.0, so upcoming version 0.3.0 will support only Django 1.10 and higher versions.

However, I wasn't able to reproduce any problems with newest DRF version. I even created example application sharedlinks (reddit-like clone) which uses token authentication and it seems to work correctly. You can find it on separate branch examples-sharedlinks (see https://github.com/szopu/django-rest-registration/tree/examples-sharedlinks/examples/sharedlinks). Please keep in mind that this is work in progress (for instance you need to install django-rest-registration manually, it's missing in requirements.txt; only login endpoint is used in the webapp) and the commit will be amended on this branch frequently. I want to link it in README so the documentation becomes less laconic.

I also looked at your branch feature/testproject in your fork and I don't see the token authentication to be configured there, like described here: http://www.django-rest-framework.org/api-guide/authentication/#tokenauthentication . Maybe that's the reason? You can compare it with the settings of the sharedlinks example app: https://github.com/szopu/django-rest-registration/blob/examples-sharedlinks/examples/sharedlinks/sharedlinks-backend/sharedlinks/settings.py . Also if you want to test django-rest-registration with separate Django app I would rather create separate project with separate virtualenv and then install django-rest-registration via pip.

Hope this helps.

@lock
Copy link

lock bot commented Sep 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants