PC: MacOS X 10.9.4 Python3.4.1 Django1.6.6
When creating a Django
app, it seems to be created from the command line, but it is more convenient to use the integrated development environment (ʻIDE). Speaking of ʻIDE
, I'm from Java
and I really like ʻeclipse, so there seems to be a plugin called
PyDev for ʻIDE
for Python
, so I'm going to use this.
The following is an explanation with the PyDev
plug-in already installed in ʻeclipse`.
First of all, in order to set the following Python
installed last time, select [Eclipse]-[Preferences]-[PyDev], add a new interpreter ʻInterpreter-Python, and installed the other day, in the following path Specify
Python3`.
/Library/Frameworks/Python.framework/Versions/3.4/bin/Python3
Now, let's create a project with ʻEclipse`. Select'PyDev Django Project'in the menu.
Set the project name, working directory, Python
version, and the newly added interpreter Python 3.4
.
The database that can be used by default seems to be SQLite
, but my preference is MySQL
, so I will use MySQL
installed in the local PC environment.
By the way, it seems that the database for the Django
app used this time needs to be created in advance on MySQL
.
create_db.sql
--DB creation
CREATE DATABASE django_db CHARACTER SET utf8
;
--DB user creation and authorization
GRANT ALL ON django_db.* TO db_user@localhost IDENTIFIED BY '*****'
;
** * Later, I noticed that the database setting by ʻEclipse` below was not successful. For details, see Next article. ** **
If there are no errors and it goes smoothly, the project will be created as shown below.
In the future, I plan to study based on this sample project.
Lovely Django!!!
Recommended Posts