GithubHelp home page GithubHelp logo

adrest's Introduction

adrest's People

Contributors

actuosus avatar denya avatar hogart avatar klen avatar lispython 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

adrest's Issues

How does adrest compares to tastypie?

Hi @klen,

I'm looking for a rest solution for my-self.

Even though django-rest-framework is very good, it seems too much for my case.

I liked your adrest & tastypie projects. I haven't looked into code base but just went through the main pages of both.

For me, both (adrest & tastypie) seems very very similar. Only notable difference I found is that your's using api versions & other is using api naming. And yes, your example looks more neat.

But, is there any good features in adrest that's not in tastypie?

@kra3

Интересное решение из django-rest-framework

Интересное гибкое и расширяемое решение из django-rest-framework по подключению дефолтных моделей.

https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/authtoken/models.py#L23

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1428282-django-rest-framework?utm_campaign=plugin&utm_content=tracker%2F340801&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F340801&utm_medium=issues&utm_source=github).

Add basic documentation

The actual code of this package looks very useful at first sight in comparison with tastypie and djangrestframework, as it seems to be more flexible than both and has a good middleway when it comes to coding practises.

However, it having no documentation whatsoever makes it an unacceptable choice in any development project. So please try to explain at least:

  • What adrest is doing
  • How it is doing it (ie. main concepts, resources, registration, mixins etc.)
  • How this compares to existing API frameworks

And preferably: how to get started with builing an API. Also, knowing the level of automated testing used during development is good to, at least, evaluate it.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1428283-add-basic-documentation?utm_campaign=plugin&utm_content=tracker%2F340801&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F340801&utm_medium=issues&utm_source=github).

Логика работы rpc_call

Привет.

https://github.com/klen/adrest/blob/master/adrest/resources/rpc.py#L101

Вот в этом куске кода в rpc_call аргумент **kwargs он переопределяется умышленно или баг? В метод rpc хочется передавать дополнительные параметры типа объекта авторизации, но чтобы это сделать, надо в унаследованном rpc ресурсе переопределять всю логику метода rpc_call, без возможности вызвать родительский rpc_call, что не есть гуд.

Криво обрезается request.content для лога

Есть мнение, subj.
response.content[:5000]

Если там юникодный контент — то все ложится.
response.content сам по себе имеет тип str.
Предлагаю делать ему .decode('utf-8'), а потом уже резать по длине.
Тем более все-равно в базу оно сохраняется как utf.

Traceback (most recent call last):

File "/.virtualenv/lib/python2.6/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, _callback_args, *_callback_kwargs)

File "/.virtualenv/lib/python2.6/site-packages/django/views/generic/base.py", line 47, in view
return self.dispatch(request, _args, *_kwargs)

File "/.virtualenv/lib/python2.6/site-packages/django/views/decorators/csrf.py", line 39, in wrapped_view
resp = view_func(_args, *_kwargs)

File "/.virtualenv/lib/python2.6/site-packages/django/views/decorators/csrf.py", line 52, in wrapped_view
return view_func(_args, *_kwargs)

File "/.virtualenv/lib/python2.6/site-packages/adrest/views.py", line 94, in dispatch
api_request_finished.send(self, request=self.request, response=response)

File "/.virtualenv/lib/python2.6/site-packages/django/dispatch/dispatcher.py", line 172, in send
response = receiver(signal=self, sender=sender, **named)

File "/.virtualenv/lib/python2.6/site-packages/adrest/models.py", line 48, in save_log
response = response.content[:5000],

File "/.virtualenv/lib/python2.6/site-packages/django/db/models/manager.py", line 138, in create
return self.get_query_set().create(**kwargs)

File "/.virtualenv/lib/python2.6/site-packages/django/db/models/query.py", line 360, in create
obj.save(force_insert=True, using=self.db)

File "/.virtualenv/lib/python2.6/site-packages/django/db/models/base.py", line 460, in save
self.save_base(using=using, force_insert=force_insert, force_update=force_update)

File "/.virtualenv/lib/python2.6/site-packages/django/db/models/base.py", line 553, in save_base
result = manager._insert(values, return_id=update_pk, using=using)

File "/.virtualenv/lib/python2.6/site-packages/django/db/models/manager.py", line 195, in _insert
return insert_query(self.model, values, **kwargs)

File "/.virtualenv/lib/python2.6/site-packages/django/db/models/query.py", line 1436, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)

File "/.virtualenv/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 791, in execute_sql
cursor = super(SQLInsertCompiler, self).execute_sql(None)

File "/.virtualenv/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
cursor.execute(sql, params)

File "/.virtualenv/lib/python2.6/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
return self.cursor.execute(query, args)

DatabaseError: invalid byte sequence for encoding "UTF8": 0xd020
'REQUEST_METHOD': 'GET',

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.