Giter Club home page Giter Club logo

Comments (4)

apragacz avatar apragacz commented on May 22, 2024 1

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.

from django-rest-registration.

dkdndes avatar dkdndes commented on May 22, 2024

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.

from django-rest-registration.

apragacz avatar apragacz commented on May 22, 2024

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.

from django-rest-registration.

lock avatar lock commented on May 22, 2024

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.

from django-rest-registration.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.