SpreadBand / django-backcap

Help center for community-driven websites
GNU General Public License v3.0
20 stars 3 forks source link

Provide tastypie resources.py RESTful definitions #4

Open airtonix opened 11 years ago

airtonix commented 11 years ago

Providing a simple api/resources.py module would be great for those who don't want to use the full response cycle template approach.

Additionally the use of django-guardian and my guardianpie application would assist in permission management.

I'll provide a pull request implementing these aspects in the next week or so.

glibersat commented 11 years ago

That would definitively be an awesome feature, especially since toolkits such as AngularJS are becoming more and more common, we really need that. I just throw an eye to your guardianpie app, and you're right, it's a good idea to use it.

Hope to see your PRs soon :)

Guillaume PS: Just saw you angular-named-route repo, cool one!

airtonix commented 11 years ago

@glibersat I've been working on two branches for backcap, one for personal use, the other relates to this ticket.

https://github.com/airtonix/django-backcap/tree/patch-2 seeks to provide an api module

https://github.com/airtonix/django-backcap/tree/no-templates seeks to make no assumptions about what templates an integrator might use in their project. It's mainly suited for situations where you will only be using angularJS templates.

Targets planned :

Possible targets:

This is something I'm still working through, and I've yet to create unit tests.

glibersat commented 11 years ago

Hi @airtonix ! Thanks for the amazing work :) I'm currently working on an Angular project, so I'll try your branch right now.

About templates, while I agree it's totally useless for production (and in the case of angular), I think it's worth letting them into the repository for people who want to try the module without any effort.

On including angularJS controllers, it's a really cool idea but maybe in another package? I'm not sure it's a good idea to mix django and angular stuff since they do no required each others. Or, we might consider having a "demo" folder, where we put the angular stuff.

Thanks again, I'll come back to you once I've tried your branch!