Coder Social home page Coder Social logo

Comments (9)

mitar avatar mitar commented on July 28, 2024

Which version are you using?

It seems you are not using trailing slash?

http://django-tastypie.readthedocs.org/en/latest/settings.html#tastypie-allow-missing-slash

from django-tastypie-mongoengine.

burakkilic avatar burakkilic commented on July 28, 2024

I tried both with slash and without slash.

Django==1.4.1
django-mongodb-engine==0.4.0
django-tastypie==0.9.11
django-tastypie-mongoengine==0.2.6

from django-tastypie-mongoengine.

mitar avatar mitar commented on July 28, 2024

No idea. You will have to make a pull request with failing test so that I can try it.

from django-tastypie-mongoengine.

burakkilic avatar burakkilic commented on July 28, 2024

I found the bug, but I don't know if it is about django-tastypie-mongoengine or about django-tastypie

If I set #TASTYPIE_ALLOW_MISSING_SLASH = True

In the tastypie.mongoengine resources.py' s obj_get function

kwargs came with the trailing slash if I put it or not.

TASTYPIE_ALLOW_MISSING_SLASH should be false in order to get it worked.

from django-tastypie-mongoengine.

mitar avatar mitar commented on July 28, 2024

Have you read documentation: You must also have settings.APPEND_SLASH = False so that Django does not emit HTTP 302 redirects. You have this?

from django-tastypie-mongoengine.

burakkilic avatar burakkilic commented on July 28, 2024

My settings:

#Tastypie
TASTYPIE_ALLOW_MISSING_SLASH = True
APPEND_SLASH = False

Still same 404.

from django-tastypie-mongoengine.

mitar avatar mitar commented on July 28, 2024

Maybe your browser caches redirects? So where is / appended? So if you open /api/v1/user/50796e9da5e97c571445d8be, how it is possible that slash is added to kwargs?

from django-tastypie-mongoengine.

burakkilic avatar burakkilic commented on July 28, 2024

I don't know where it is appended. TASTYPIE_ALLOW_MISSING_SLASH = False works ok.

from django-tastypie-mongoengine.

mitar avatar mitar commented on July 28, 2024

Please make a test.

from django-tastypie-mongoengine.

Related Issues (20)

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.