aldryn / aldryn-blog

aldryn-blog IS DEPRECATED. PLEASE USE aldryn-newsblog!
Other
20 stars 35 forks source link

multiple author support #56

Closed czpython closed 9 years ago

czpython commented 10 years ago

Some posts have a co-author, maybe even more than two.

For the first case I think an extra fk to AUTH_MODEL would do it, but I think a better solution would be to change this to a m2m field with a through model that allows the user to specific a primary author, so this through model would have three fields: author, is_primary.

The author is a fk to either it's own PostAuthor model with a fk to user OR PostAuthor model acting as proxy to user. The idea behind this is to be able to encapsulate some functionality in this model, so we can do author.get_absolute_url() instead of the get_slugs hack...

stefanfoulis commented 10 years ago

There is basically two things here:

1. Optionally allow additional authors

I'd prefer the solution to be a bit simpler. For the 99% case one primary author should be fine. And (if required) additional authors could be added with a django-appdata based extension.

2. A User independent Model for Authors

I like the idea of allowing just having a Person (Author) to assign to a Blog/News Post, without forcing a User object. What do you think about using aldryn_people.Person for this? Do you have ideas about how we could do a migration for existing projects?

Chive commented 10 years ago

We might want to move both author and the coauthor to aldryn_people.Person, but for now: https://github.com/aldryn/aldryn-blog/pull/61

stefanfoulis commented 10 years ago

I don't like it, because it is feature creep and is not usefull for 99% of the users.

Chive commented 10 years ago

61 is basically your number 2 (A User independent Model for Authors) but on auth.User instead of people.Person since Post.author also points there