Skip to content
This repository has been archived by the owner on Sep 25, 2022. It is now read-only.

Add Support for Mezzanine 4.1.0 #2

Closed
zaneadix opened this issue Jan 25, 2016 · 6 comments
Closed

Add Support for Mezzanine 4.1.0 #2

zaneadix opened this issue Jan 25, 2016 · 6 comments
Assignees

Comments

@zaneadix
Copy link

Apologies if this isn't really the place for this but I'm trying to get started with the api and just can't. I've followed the installation instructions (even added LOGIN_URL = "/api/auth/login/" to settings.py) but no matter what I do all /api/* urls 404 for me. Do you have any idea why this would happen?

beautifulsoup4 (4.4.1)
bleach (1.4.2)
chardet (2.3.0)
Django (1.9.1)
django-braces (1.8.1)
django-contrib-comments (1.6.2)
django-filter (0.12.0)
django-oauth-toolkit (0.8.1)
django-rest-swagger (0.3.5)
djangorestframework (3.3.2)
filebrowser-safe (0.4.1)
future (0.15.2)
grappelli-safe (0.4.2)
html5lib (0.9999999)
Mezzanine (4.1.0)
mezzanine-api (0.3.0)
oauthlib (1.0.3)
Pillow (3.1.0)
pip (7.1.2)
pytz (2015.7)
PyYAML (3.11)
requests (2.9.1)
requests-oauthlib (0.6.0)
setuptools (18.2)
six (1.10.0)
tzlocal (1.2)
wheel (0.24.0)

@gcushen
Copy link
Owner

gcushen commented Jan 25, 2016

Mezzanine 4.1.0 was only released 9 days ago. I suspect that your version of Mezzanine may be currently incompatible as the API has not been tested with this new version yet. You may have better luck with Mezzanine 4.0.x. In the meantime, I will look at all the change logs for the API dependencies and begin upgrading the API to use more recent dependency versions, or at least be tested against them.

@gcushen
Copy link
Owner

gcushen commented Jan 25, 2016

Are you sure that you followed all of the installation instructions, such as step 4 here: http://gcushen.github.io/mezzanine-api/

Add the following code in your Mezzanine urls.py somewhere after the urlpatterns = [] line:

# REST API URLs
urlpatterns += patterns("",
    ("^api/", include("mezzanine_api.urls")),
)

@zaneadix
Copy link
Author

@gcushen
Yeah I copied that in then fiddled with it a bunch of different ways. It's the main reason I posted here. I was baffled for about an hour as to why the urls weren't being recognized. I also ran upgrades on django-rest-swagger and DRF as they were throwing errors. Next chance i have I'll give Mezz 4.0.x a shot. Thanks, George.

@gcushen
Copy link
Owner

gcushen commented Jan 26, 2016

Thanks for the details @zaneadix. I reproduced a similar issue by installing Mezzanine 4.1.0 in a new build. There was actually a python error accessing API urls, perhaps why you saw 404 error. The latest master has been updated to add compatibility for Mezzanine 4.1.0 and remove support for older versions. To install latest master from GIT:

pip install -e git+https://github.com/gcushen/mezzanine-api.git#egg=mezzanine_api

The remaining installation procedure is the same as http://gcushen.github.io/mezzanine-api/ , except the Mezzanine urls.py can be modified to add url("^api/", include("mezzanine_api.urls")), after the existing urlpatterns += [ (approx line 29) like below:

urlpatterns += [
    # API URLs
    url("^api/", include("mezzanine_api.urls")),
    ...

The official new 0.4.0 API will be released sometime soon once a few other features are completed and fully tested.

@gcushen gcushen changed the title 404 on everything Add Support for Mezzanine 4.1.0 Jan 26, 2016
@gcushen gcushen self-assigned this Jan 26, 2016
@gcushen
Copy link
Owner

gcushen commented Jan 26, 2016

Regarding Mezzanine's urls.py, I meant to say add url("^api/", include("mezzanine_api.urls")), after urlpatterns += [ (approx line 29) for Mezzanine 4.1.0 as there were changes to the url system in 4.1.0.

@gcushen
Copy link
Owner

gcushen commented Mar 2, 2016

Version 0.4.0 (f95a23b) is now available. To check out the release notes and to upgrade: http://gcushen.github.io/mezzanine-api/release-notes/ .

If installing/upgrading with Mezzanine 4.1.0 and above, the Mezzanine API url declaration requires changing as per Step 4 at http://gcushen.github.io/mezzanine-api/#installation .

@gcushen gcushen closed this as completed Mar 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants