Далее устанавливаем установщик CMS django. pip install djangocms-installer. Далее не намного сложнее. Создаем каталог, например, django и делаем его текущей директорией (команда cd).


Чтобы посмотреть этот PDF файл с форматированием и разметкой, скачайте его и откройте на своем компьютере.
�#AB0=2:0 django CMS A =C;O (from scratch)
��2B@: =AB0=B8= 575=F52
��16.03.2015 16:09 - 1=2;5= 21.03.2015 21:15
���������@8 CAB0=2:5 CMSdjango ?;57= 8A?;L720BL 28@BC0;L=5 :@C65=85, A7402055
�CB8;8B9
����&#x ?;&#x@0;&#x ?;&#x@0;&#x ?;&#x@0;virtualenv. 4=0: ?4 ! MS Windows MB =5 A2A5 ?@AB. , 5A;8 MB
�������?5@A=0;L=0O !, B 6= ?@AB CAB0=28BL
���CMS 2 B5:CI59 CAB0=2G=9
�48@5:B@88 Python.


��!=0G0;0, 5A;8 ?B@51C5BAO, CAB0=28 pip.
�����A;8 pip =5 CAB0=2;5=, B =51E48
A:0G0BL
D09;
get-pip.py
A
A09B0
pip.pypa.io
,
8 70?CAB8BL python get-pip.py
���&#x8=;Š&#xB@;�(3CB ?B@5120BLAO ?@020 048=8AB@0B@0)

&#x C;«&#x0=;�0;55 CAB0=02;8205 CAB0=2I8:
CMSdjango.

pip install djangocms-installer

&#x=0;&#x=0;&#x=0;&#x=0;&#x :;�;�&#x 5;00;55 =5 =0=3 A;6=55. !7405 :0B0;3, =0?@85@, django 8 45;05 53 B5:CI59
��&#x0=;@&#x c;
&#x. ;&#x"5;&#x?5;&#[email protected]L;&#x A;&#x0=;@&#x c;
&#x. ;&#x"5;&#x?5;&#[email protected]L;&#x A;48@5:B@859 (:0=40 cd). "5?5@L A740BL ?@5:B
mysite
�����6= A ?ILN :0=4K

djangocms
-
p
.
mysite

������8G53 A;6=3. AB5AB25==, :0=40
djangocms
���4;6=0 =0E48BAO !, 8;8 4;6=0
���������1KBL C:070=0 2 2845 01A;NB=3 8;8 B=AB5;L=3 ?CB8 : 8A?;=O5C D09;C.

&#x5 ;&#x:0;&#x0=;&#x4=;�&#x0=;&#x4=;�&#x ?;&#x@8;Eº&#xO ;�&#x ?;&#x@8;Eº&#xO ;�&#x ?;&#x@8;Eº&#xO ;�&#x ?;&#x@8;Eº&#xO ;�&#x ?;&#x@8;Eº&#xO ;� @5685 :0=4=9 AB@:8 0 ?@845BAO B25B8BL =0 @O4 2?@A2, 2 1;LHB=AB25 87
��������:B@KE 6= ?@AB ?4B25@48BL ?@54;03055 7=0G5=85 (?@85@):


1 / 4
�#AB0=2:0 django CMS A =C;O (from scratch)
��2B@: =AB0=B8= 575=F52
��16.03.2015 16:09 - 1=2;5= 21.03.2015 21:15
-
Database configuration (in URL format): sqlite://localhost/project.db

-
django CMS version: stable

-
Django version:
1.6

-
Activate Django I18N / L10N setting: yes

-
Install and configure reversion support: yes

-
Languages to enable. Option can be provided multiple times, or as a comma separated
list:
en, ru

-
Optional default time zone: America/Chicago:

-
Activate Django timezone support: yes

-
Activate CMS permission management: yes

-
Use Twitter Bootstrap Theme:
yes

-
Use custom template set: no

-
Load a starting page with examples after installation:
yes



�&#x8=;Š&#xB@;�&#x 2; &#x 2;  7025@H5=88 A7405BAO 048=8AB@0B@ CMS, ?CB5 2240 8=D@0F88 =0 ?@83;0H5=8O
��?@F5AA0 55 A740=8O.

�����0?CAB8BL CMS 6= A ?ILN :0=4K
python manage.py runserver
����&#x A;�&#x A;�45AL D09; 87 :0B0;30, 2 :B@ A740= ?@5:B
mysite.

0;55

Note that if you re using Windows, to activate the virtualenv you ll need:
We ll get started by
setting up our environment.


Your working environment


We re going to assume that you have a reasonably recent version of virtualenv installed and
2 / 4
�#AB0=2:0 django CMS A =C;O (from scratch)
��2B@: =AB0=B8= 575=F52
��16.03.2015 16:09 - 1=2;5= 21.03.2015 21:15
that you have some basic familiarity with it.



Create and activate a virtual env


virtualenv env source env/bin/activate


Note that if you re using Windows, to activate the virtualenv you ll need:


envScriptsactivate




Use the django CMS installer

The
django CMS installer
is a helpful script that takes care of setting up a new project.

Install it:


pip install djangocms-installer


This provides you with a new command,
djangocms
.

Create a new directory to work in, and cd into it:


mkdir tutorial-project cd tutorial-project


Run it to create a new Django project called
mysite
:



djangocms
-
p
.
mysite



Windows users may need to do a little extra to make sure Python files are associated correctly if
that doesn t work right away:


assoc .py=Python.file ftype
Python.File="C:UsersUsernameworkspacedemoenvScriptspython.exe" "%1" %*


For the purposes of this tutorial, it s recommended that you answer the installer s questions as
follows - where our suggestions differ from the default, they re highlighted below:


-
Database configuration (in URL format): sqlite://localhost/project.db

-
django CMS version: stable

-
Django version:
1.6

3 / 4
�#AB0=2:0 django CMS A =C;O (from scratch)
��2B@: =AB0=B8= 575=F52
��16.03.2015 16:09 - 1=2;5= 21.03.2015 21:15
-
Activate Django I18N / L10N setting: yes

-
Install and configure reversion support: yes

-
Languages to enable. Option can be provided multiple times, or as a comma separated
list:
en, de

-
Optional default time zone: America/Chicago:

-
Activate Django timezone support: yes

-
Activate CMS permission management: yes

-
Use Twitter Bootstrap Theme:
yes

-
Use custom template set: no

-
Load a starting page with examples after installation:
yes


Create a Django admin user when invited.



Start up the runserver


python manage.py runserver


Open
http://localhost:8000/
in your browser, where you should be presented with your brand
new django CMS homepage.

Congratulations, you now have installed a fully functional CMS!

To log in, append
?edit
to the URL and hit enter. This will enable the toolbar, from where you
can log in and manage your website. Switch to
Draft
mode to add and
edit content.

Try to switch between
Live
and
Draft
view, between
Structure
and
Content
mode, add plugins,
move them around and delete them again.

To add a
Text
or or other plugin elements to a placeholder:


1.
switch to
Structure
mode

2.
select the menu icon on the placeholder s title bar

3.
select a plugin type to add


4 / 4

Приложенные файлы

  • pdf 7848515
    Размер файла: 311 kB Загрузок: 0

Добавить комментарий