Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
Hossein Rabizadeh
Hi guys
I have question about using mezzanine-api on my project
I add the mezzanine api to my project but all the webservices that created was about the general model of mezzanine
I have a custom model on project and it is important for me that I have webservice for this custom model
my question is : it
Mezzanine api support just mezzanine models(page, categories , ..) or I can create the webserver for my custom model?
Mezzanine API is a RESTful API for Mezzanine CMS
If you have added or changed the Mezzanine CMS models and wish to access those resources through the API, you will also need to modify the API for your specific purpose:
Akhlaq Rao
Hi George, thanks for the fabulous and remarkable approach. I had pretty much the same question as Hossien's. I would like to customize rather extend the endpoints to the Cartridge, so first of all are there any chances adding Cartridge endpoints? meanwhile I am working on adding some Shop endpoints like cart, shop/categories, products, product options, and variations etc. If I need to see all these endpoints through /api do I need to add them to the mezzainine-api urls and serializers? or is there a way to extend these classes in my project and expose these endppoints through mezzanine-api.
Akhlaq Rao
i.e this is what my api root shows
where I would like to add /api/cart to my root
is there a way doing so without customizing mezzanine_api/ ?

Hi @DummyDeck , glad to hear you like the project!

I am not familiar with Cartridge and I don't have any need for it, so I have no plans to support it. However, if you or someone else implement Cartridge integration including tests, please create a Github issue for Mezzanine API with a link to the repository, and we can discuss the possibility of merging it in etc.

Regarding API urls: sure, you can create another Django Rest Framework API router specifically for Cartridge if you want. To avoid touching mezzanine_api/, you should be able to add an api/cart/ route before the api/ route in Mezzanine's Then, api/cart/requests will go to the api/cart/router instead of the main api/ router.

Akhlaq Rao
Great help! when I tried your solution it did indeed add the api/cart to the root but then it took away all the mezzanine-api endpoints, any clue?
Akhlaq Rao
Hi George, Do you know if I can override OAUTH2_PROVIDER {} settings into my app's settings? I see you are overriding it in mezzanine-api settings from Django oauth toolkit. Thanks
Akhlaq Rao

I got it working, the order matters I guess.

from mezzanine_api.settings import *
except ImportError:

'ALLOWED_REDIRECT_URI_SCHEMES': ['http', 'https', 'custom-scheme'],

David Childers
Hey everybody,
I'm new with Mezzanine and I just installed the API (0.5.0) and getting an error in the browsable web API when trying some of the calls. For instance, for the GET method of, I get a 500 internal server error that says
'TypeError at /api/posts
init() got an unexpected keyword argument 'lookup_type'
Some of the other calls work fine. I thought it was an issue of authentication but once I set up OAuth for the User call, '' it displayed the same error. Any suggestions or help would be greatly appreciated. Thanks.


We need our server to connect to the MZN server and fetch blog posts from it.
The MZN Server and our server are on the same site, both are deployed as separate Rocket containers (our server is also Django based).
We need to establish the connectivity and authentication in a fully automatic way (no manual interventions).
In order to do that we tried the “Client Credentials” grant type in the OAuth2 method.
We managed to receive a token using the following request:

curl -X POST -H "Accept: application/json; indent=4" -d "grant_type=client_credentials" -u"<client_id>:<client_secret>" http://localhost:8000/api/oauth2/token/

We then tried to use the following API using the accepted token:
curl -H "Authorization: Bearer <your_access_token>" http://localhost:8000/api/users

And got a message indicating that the Client Credentials were not provided.

Is there anything we are missing in the client_credentials flow ?


hello, i installed mezzanine-api on an existing mezzanine working blog, but now i always get a 500 internal server error on any url. so i made a new scratch site directly with mezzanine-api, but still i only got 500 internal error server
i got no msg in error.log, while in access.log i can see the requests
any idea? maybe an undocumentented depndency for mezzanine-api?
Scott McFarlane
How might I go about integrating mezzanine-api to expose Cartridge specific models - like products and product categories?
Forrest Shuang
hi how to custom the mezzanine views
Hi everyone, I just installed cli api client for mezzanine. I created an app in the admin and configured the cli as shown in the docs. I try to list the posts, I get the authorizations url and it returns the code. Everything is ok till there. I copy the code and I get an exception there: oauthlib.oauth2.rfc6749.errors.MissingTokenError: (missing_token) Missing access token parameter
Any clue with this?
I'm using python 3. 6 and mezzanine 4.2.0
Hello everyone Here is my question: By default for customization the page we use the admin panel. If I want to create my admin panel and use for this Django rest. Is it real?