ok, finally get to start to build some functional apps with Django, based on rossp.org posts on "Building a Blog with Django" part 1, 2 and 3.
First thing first,
1.install Django and
2. create a new project
3. within the project, create an application called "blog".
First part no problem, Django installed.
Now, I need to decide to use the existing "myproject " which I created for the polls app, or to create a new one. Without too much hesitation, choose to start a new project, just to avoid any complication in troubleshooting problem if they arise. So, now the one thing left is to create "blog", alright.
So I type the following command,
C:\Python24\Django-0.91\django\bin>django-admin.py startproject myblog
And get the "myblog" folder created as seen in the screenshot below.
Create a database for the blog, in my case, I use MySQL, so use phpMyAdmin to avoid having to use my lazy finger type in all the command, just like this to create a database, named "blog-db".
Edit the "settings.py" file under "myblog" so it point to the correct database,
To create all the tables in the database, type this command.
C:\Python24\Django-0.91\django\bin\myblog>manage.py init
Nothing happen in the dos screen, but check the "blog-db" database, a few tables have been created.
Next...creating the blog application.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment