Comments (7)
Are you talking about the streams themselves or the actual Atom feeds?
from django-activity-stream.
I mean the feeds, but I may just be confused. I was looking at the admin user's incoming feed in the example project, and saw that the Atom Activity namespace wasn't specified and no <activity> elements appeared. But again, it's entirely possible that I don't understand the spec and all of this is irrelevant.
from django-activity-stream.
i see what you are saying and it sounds like a good idea. it would b stupidly simple to extend the atom feeds to include the activity namespace. my hesitations are that 1) the atom activity spec is just a proposed draft and not a final rfc or anything official 2) would that mean that it could break atom parsers? this seems like a good idea to implement in the future but im open for suggestions/patches/ideas.
from django-activity-stream.
Compliant Atom parsers should ignore the extra markup: "When unknown foreign markup is encountered in a Text Construct or atom:content element, software SHOULD ignore the markup and process any text content of foreign elements as though the surrounding markup were not present." Your hesitation about implementing a draft spec is reasonable, although presumably any changes won't be so fundamental as to make the work wasted. I'll be taking a look tomorrow night and maybe I'll take a crack at a patch.
from django-activity-stream.
In order to bring the feeds into compliance, it's going to be define verbs differently, because:
- Verbs are associated with URIs, like: http://activitystrea.ms/schema/1.0/post
- The verb associated with an action may be subclassed from a (or several) more generic verb(s), and each applicable verb should be displayed in the feed, so that parsers that understand one of the less specific verbs can still parse the entry.
It seems like it will be necessary to define a data structure containing all of the verbs to be used by an application, perhaps using key value pairs of {'URI':'human-readable verb phrase'}. The data structure should also define a hierarchy so that for a given verb entry, it is possible to access parent entries at each level.
from django-activity-stream.
It sounds like a good thing to categorize, but I also want people to have individual, custom verbage. Maybe this could be a verb_category (Char/IntField using choices ripped from the activitystream.ms schemas) AND a verb (CharField). That seems do-able and i could help you develop a patch for that. Diving deeper down the rabbit hole, we should also categorize in the same manor Object Types (subjects/actors) defined in section 3.2. This one seems much harder since its generically dealing w/ Django models, but just food for thought.
from django-activity-stream.
I thought some more about this, and maybe the solution is to make verb
an array of dicts of the form: {'verb':'posted a notice', 'verb-type':'http://activitystrea.ms/schema/1.0/post'}. The verb-type could be omitted and default to something sensible (like 'post' or nothing) and the storage & organization of the types could be up to the application.
For object types I was thinking that models could optionally specify a get_object_type method to do the right thing, and otherwise to default to the model's __doc__
.
from django-activity-stream.
Related Issues (20)
- Verb examples do not match spec
- django 4.0 support HOT 5
- django-activity-stream and django-comments-xtd HOT 2
- Activity Stream 2 JSON Feeds HOT 2
- AS2 paging
- DRF support HOT 3
- Use pluggy for customization report
- Installation breaks with pip -r HOT 2
- Django -activity stream HOT 1
- Missing migration when moving from Django 2.2 to 3.2 HOT 1
- Not working with Django 4.1 HOT 9
- Release new version HOT 1
- Filter user feed with distinct('action_object') HOT 1
- [Feature proposal] Delete Follow objects when the followed object is deleted? HOT 1
- Remove usage of `datetime_safe` HOT 4
- Field 'actor' does not generate an automatic reverse relation and therefore cannot be used for reverse querying. If it is a GenericForeignKey, consider adding a GenericRelation. HOT 4
- [Feature request ] Soft delete for action
- Registering models from third-party apps HOT 1
- Make a 2.0 release and publish to PyPI HOT 4
- Add multidatabase support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-activity-stream.