I have existing apps in Django. I want to integrate them with mezzanine
project in a way that the apps are available in form of pages. I followed this
method
<http://mezzanine.jupo.org/docs/content-architecture.html#integrating-third-party-apps-with-pages>
.
The steps I followed-
1. I created a fresh vanilla mezzanine project- it works!
2. Then I created theme for website- it works! From admin interface if i
add a page, the page renders along with website theme.
3. Copy pasted the Django apps in mezzanine project.
4. Added the app names in mezzanine project's settings.py file at the
beginning of INSTALLED_APPS.
5. Added corresponding URL patterns in mezzanine project's urls.py file
The related code snippets (example app, About Us)-
testproject/aboutus/views.py
from django.shortcuts import render
def aboutus(request):
context=locals()
template = 'aboutus/aboutus.html'
return render(request,template,context)
testproject/aboutus/urls.py
import mezzaninefrom django.conf.urls import urlfrom aboutus import viewsfrom
mezzanine.conf import settings
urlpatterns = [
url(r'^aboutus.html',views.aboutus,name='aboutus'),]
testproject/urls.py
from __future__ import unicode_literalsimport mezzaninefrom django.conf.urls
import include, urlfrom django.conf.urls.i18n import i18n_patternsfrom
django.contrib import adminfrom django.views.i18n import set_languagefrom
mezzanine.core.views import direct_to_templatefrom mezzanine.conf import
settingsfrom aboutus import views
urlpatterns += [
url("^$", direct_to_template, {"template": "index.html"}, name="home"),
url(r'^',include('aboutus.urls')),
url("^", include("mezzanine.urls")),]
I'm missing out on something minute but very important. We want the
existing Django apps to be integrated as pages in mezzanine so that they
are editable through admin interface. I want to know the exact steps to
achieve this.
I'm sorry but I'm very new to Mezzanine so I need guidance on this. What
exactly we need to do? What are the steps for below snap from Mezzanine
docs.
<https://lh3.googleusercontent.com/-lG29RO1oz8E/WjzWDE7pwhI/AAAAAAAAMdU/Ks8Wty0lv7I8qeiC-rbhPg40wsWM-6VawCLcBGAs/s1600/mezzanine-docs.PNG>
Anyone with this knowledge?
Thanks in advance!
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.