Need help installing django-cms

This question is related to newbie Django and Django-cms trying to install django-cms on a shared hosting account. Here is what I have done so far:

  • Django installed in ~ / .local / lib / python (using python 2.4.3)

  • Flup was also installed in the same place.

  • Created the directory of my application (site) - ~ / .local / lib / python / eck

  • downloaded and extracted django-cms in ~ / .local / lib / python / eck

  • Copied the cms, mptt and publisher folders to ~ / .local / lib / python / Ek

Where I am stuck. Not sure what to do next. Should I copy the contents of the example folder to ~ / .local / lib / python / eck and configure an existing settings.py file? What about other files and folders. Which of them need to be copied to "eck"?

In the folder "example" there is a folder "sampleapp". What should I do with this?

thank

TIA

+3
source share
2 answers

Did you start Django for the first time without Django-CMS? First I will take care of this, and then I will think about how to install Django-CMS. You must create a project somewhere outside of your web root using the django-admin.py commands. Then configure the server to point to it - possibly on Apache with mod_wsgi or mod_python . I would have thought the first one, since you are installing the wsgi toolkit, but make sure your hosting provider has mod_wsgi installed.

Also, I don't know what your hosting environment is, but you don't need to create your project in the Python directory. See this answer about where to place your project .

Django-CMS , - Django, Django !

+1

bennylope - , Django, django-cms.

django , , , urls.py:

urlpatterns += patterns('',
    url(r'^', include('cms.urls')),
)

settings.py , INSTALLED_APPS:

    'cms',
    'cms.plugins.text',
    'cms.plugins.picture',
    'cms.plugins.link',
    'cms.plugins.file',
    'cms.plugins.snippet',
    'cms.plugins.googlemap',
    'mptt',
    'menus',
    'publisher',

. CMS.

templates, . CMS, :

# default.html
{% extends "base.html" %}
{% load cache cms_tags menu_tags %}
{% block menu %}
<ul id="navigation">
    {% show_menu 0 100 100 100 %} 
</ul>
{% endblock menu %}
{% block content %}
    <ul class="breadcrumb">
        <li class="you">You are here:</li>
        {% show_breadcrumb %}
    </ul>

    <h1>{% block title %}{% page_attribute title %}{% endblock %}</h1>

    <div>
        <div class="placeholder" id="body">
            {% placeholder "body" %}
         </div>
    </div>
{% endblock content %}

CMS_TEMPLATES = (
        ('default.html', gettext('default')),
)

.

base.html. , , {% block content %}{% endblock content %} -, CMS.

django-cms /eck. , site-packages . - django-cms /opt/, site-packages. , , , , , .

, , django-cms , . django , , .

0

Source: https://habr.com/ru/post/1742239/


All Articles