Giter Club home page Giter Club logo

django-activity-stream's People

Contributors

daonb avatar mattmcc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

django-activity-stream's Issues

issue with importing get_people_i_follow get_my_followers

Hi Philipp.

I have gone through the documentation of the plugin and keep running into the same error.

As soon as I set my variable get_people_i_follow in my settings.py file it keeps raising an error.

Caught NameError while rendering: global name 'get_people_i_follow' is not defined

Then if I import the get_people_i_follow, manage.py raises it's ImportError.

Any ideas?

SerializedDataField not pickling correctly the objects

Hello,

i was using the following code:

create_activity_item('updated_project', user, project_and_role.project, data=projec_role)

being 'projec_role' a django model with foreigns keys, and the SerializedDataField was not saving the data correctly. Was saving values like '128', '129' in the database and rendering on the templates was resulting on "indentation" errrors.

my solution was to wrap the object on a dictionary and it worked :

data = {
    'project'   : project_and_role.project,
    'role'      : project_and_role.role,
    'person'    : project_and_role.person,
}

best

order_by('?') is very inefficient

The get_people_i_follow() and get_my_followers() functions both use order_by('?') - this is an extremely inefficient database operation. It looks like this is being done to emphasize the non-ordered nature of the data, in which case I would recommend calling Python's set() function on the queryset instead.

models.py line 30 def to_python

Hi,

I found an error in your activity stream,

def to_python(self, value):
if value is None: return
if not isinstance(value, basestring): return value
value = pickle.loads(base64.b64decode(value))
return value

ERROR:
return base64.b64decode(value)
File "/usr/lib/python2.6/base64.py", line 76, in b64decode
raise TypeError(msg)
TypeError: Incorrect padding

This works for me:

def to_python(self, value):
    try:
        if value is None: return
        if not isinstance(value, basestring): return value
        value = pickle.loads(base64.b64decode(value))
        return value
    except TypeError:
        return value

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.