mirror of
https://github.com/not-kennethreitz/convore.json.git
synced 2026-06-17 21:50:58 +00:00
1 line
6.1 KiB
JSON
1 line
6.1 KiB
JSON
[{"user_id": 6648, "stars": [], "topic_id": 35931, "date_created": 1305799920.965987, "message": "I'm looking to rewrite a project to use 1.3 class based views but I'm also looking at other ways of doing it.", "group_id": 81, "id": 1110106}, {"user_id": 6648, "stars": [], "topic_id": 35931, "date_created": 1305799909.6519101, "message": "The common pattern of using an `if request.method == 'POST'` in views has always been a frustration point for me. I've found a few examples of how to route based on the HTTP method on djangosnippets and around the blogosphere...", "group_id": 81, "id": 1110104}, {"user_id": 6648, "stars": [], "topic_id": 35931, "date_created": 1305800049.6992309, "message": "I'm starting to have more and more javascript in my application and I was thinking about how there is an arbitrary divide between the html views and the api. Has anyone here ever had experience with using something like tastypie and/or Piston to serve out their normal html views?", "group_id": 81, "id": 1110109}, {"user_id": 6648, "stars": [], "topic_id": 35931, "date_created": 1305815860.850527, "message": "Are there any non-Ayn Rand themed frameworks? Just kidding, this looks interesting. Thanks for the pointer.", "group_id": 81, "id": 1111713}, {"user_id": 3978, "stars": [{"date_created": 1305815291.2034321, "user_id": 960}, {"date_created": 1306240774.5550799, "user_id": 5778}], "topic_id": 35931, "date_created": 1305815119.6885381, "message": "Check out https://github.com/zacharyvoase/dagny I think it might already do what you want.", "group_id": 81, "id": 1111590}, {"user_id": 6648, "stars": [], "topic_id": 35931, "date_created": 1305817076.34286, "message": "Just realizing this was all covered a bit here: https://convore.com/django-community/rest-in-django-piston-or-tastypie/ Dagny only gets a brief mention... wonder if people are turned off by the Rails-ness of it?", "group_id": 81, "id": 1111990}, {"user_id": 31715, "stars": [], "topic_id": 35931, "date_created": 1305820129.954875, "message": "I am currently working on a project with a lot of Ajax and we were/are using Piston for all of that. However I used class-based views for the last object and it was quite a bit easier. While Piston is great and gives you a lot of functionality I found using it for Ajax somewhat cumbersome because of some things that are not implemented and it's error handling is quite hidden. Which makes sense for an exposed API, not so much for internal Ajax. So I would be a thumbs down on creating an internal JSON emitter with Piston. For an external API in just a few minutes, it is still great.", "group_id": 81, "id": 1112716}, {"user_id": 1736, "stars": [], "topic_id": 35931, "date_created": 1305825364.2359059, "message": "Here is an implementation of a method-routing controller in ~100 lines https://github.com/coderanger/commis/blob/master/commis/generic_views/api.py", "group_id": 81, "id": 1113914}, {"user_id": 1736, "stars": [], "topic_id": 35931, "date_created": 1305825372.319977, "message": "Not really that hard to write :-)", "group_id": 81, "id": 1113917}, {"user_id": 1930, "stars": [], "topic_id": 35931, "date_created": 1305831322.5224061, "message": "... trying to read this code... brain.... hurts....", "group_id": 81, "id": 1114849}, {"user_id": 6648, "stars": [], "topic_id": 35931, "date_created": 1305852961.0556641, "message": "@zenWeasel, @coderanger: thanks for sharing. Since the routing and views form the core design pattern of a web application, I'm interested in hearing from others.", "group_id": 81, "id": 1118397}, {"user_id": 1127, "stars": [], "topic_id": 35931, "date_created": 1305867570.29338, "message": "@coderanger that looks insane! :)", "group_id": 81, "id": 1120688}, {"user_id": 1736, "stars": [], "topic_id": 35931, "date_created": 1305876663.310245, "message": "@zeeg Most web dispatch code is :-P", "group_id": 81, "id": 1121993}, {"user_id": 1127, "stars": [], "topic_id": 35931, "date_created": 1305916663.7889271, "message": "http://cramer.io/0K232N2R3p3m2K3M3J1p", "group_id": 81, "id": 1128939}, {"user_id": 1127, "stars": [], "topic_id": 35931, "date_created": 1305916657.8130579, "message": "@coderanger I would paste ours but its like a 300 LOC method call inside of a Controller class that does a bunch of sexy magic", "group_id": 81, "id": 1128937}, {"user_id": 1127, "stars": [], "topic_id": 35931, "date_created": 1305916662.7636411, "message": "The core of it though is pretty simple:", "group_id": 81, "id": 1128938}, {"user_id": 1127, "stars": [], "topic_id": 35931, "date_created": 1305916664.4058559, "message": "err", "group_id": 81, "id": 1128940}, {"user_id": 1127, "stars": [], "topic_id": 35931, "date_created": 1305916670.9691401, "message": "rather:", "group_id": 81, "id": 1128941}, {"user_id": 1127, "stars": [], "topic_id": 35931, "date_created": 1305916671.3663139, "message": " def __call__(cls, request, path):\n return cls.request(request, path)\n\n @classmethod\n @database.autocommit(conditional=lambda cls, req, *a, **kw: req.method == 'GET')\n def request(cls, request, path):\n # /version/app/method.format\n path = path.split('/', 1)", "group_id": 81, "id": 1128942}, {"user_id": 6648, "stars": [], "topic_id": 35931, "date_created": 1306077356.7213261, "message": "@deeg pot callin the kettle black? :-) Overall, I do like the dagny approach because it's so explicit. Seems less magic. At this point I think I'm going to explore that and/or tastypie.", "group_id": 81, "id": 1142349}, {"user_id": 6648, "stars": [], "topic_id": 35931, "date_created": 1306077419.444958, "message": "Err.. @zeeg not deeg", "group_id": 81, "id": 1142354}, {"user_id": 960, "stars": [], "topic_id": 35931, "date_created": 1306081119.822319, "message": "Throwing another one in the mix -- dj-webmachine (https://github.com/benoitc/dj-webmachine). It's based on Erlang's WebMachine for building RESTful services. I like it, but I happen to like WebMachine, so... :-)", "group_id": 81, "id": 1142630}, {"user_id": 1127, "stars": [], "topic_id": 35931, "date_created": 1306086935.7901909, "message": "@poswald ours is very heavily driven by magic -- which also means we can deploy a new view (api method) with just a few lines of codes", "group_id": 81, "id": 1143015}] |