Giter VIP home page Giter VIP logo

Comments (7)

selwin avatar selwin commented on August 17, 2024 2

Version 0.3.2 is now on PyPI. Sorry for the delay.

from django-user_agents.

nikaro avatar nikaro commented on August 17, 2024

@selwin please ?

from django-user_agents.

digi0ps avatar digi0ps commented on August 17, 2024

@selwin Really need the new version with the fix for middleware.

from django-user_agents.

originalankur avatar originalankur commented on August 17, 2024

@nikaro and @digi0ps you can use this meanwhile

$ pip install https://github.com/selwin/django-user_agents/archive/master.zip

if you are already aware kindly ignore.

from django-user_agents.

 avatar commented on August 17, 2024

Replace the middleware.py source code with this, fixes the problem.

from django.utils.functional import SimpleLazyObject
from .utils import get_user_agent


class UserAgentMiddleware(object):

    def __init__(self, get_response=None):
        if get_response is not None:
            self.get_response = get_response

    def __call__(self, request):
        self.process_request(request)
        return self.get_response(request)

    def process_request(self, request):
        request.user_agent = SimpleLazyObject(lambda: get_user_agent(request))

The middleware is located in:
site-packages/django_user_agents/

from django-user_agents.

jonashaag avatar jonashaag commented on August 17, 2024

bump

from django-user_agents.

tony avatar tony commented on August 17, 2024

... Another unmaintained project. >_<

This is really hurting people. Please someone make an official fork and we can continue there.

edit: Not trying to be negative, but this is the second django plugin in two hours of an project incompatible with version versions. https://github.com/gregmuellegger/django-mobile is in the same boat.

from django-user_agents.

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.