Menu:

View Alex Koval's profile on LinkedIn

Random photo

p7235408.jpg

Fairy-tales

Жил себе девелопер, жил не тужил, но чего то в жизни ему не хватало. А не хватало ему сайта. Выучил он HTML, CSS, Django и вот такой получился сайт.

Links:

- Halogen D.G.
- Valid XHTML
- Valid CSS

Language:

AVK Site: Version-3.0

Blog Entry: Code of this site

If you have even been interested in my site source code, it is in public access now. The site itself consist from a few different applications, which can be used on its own:

PersonalWebSite is nothing more then application which provides urls, structure and some custom views - ties Gallery and Blog together. When AVKGallery and blog are separate products which has been made to be used as embedding into your own application, PersonalWebSite is a result of such embedding.

We also use DjHDGutils - a set of common Django code by Halogen D.G.

How to install

The source code of this site is available under Subversion access. To checkout:

svn co http://code.koval.kharkov.ua/svn/repos/PersonalWebSite/trunk some.site.org

When asked for password for svn3.halogen-dg.com enter the following:

Next, you will need to configure it. Edit the following files and settings within them:

As a next step you create your database. It is optional if you selected SQLite as database backend. For a postgreSQL I first create role (createuser ) and then createdb .

createuser someuser -U postgres
createdb someuserpws

Next step is to create our database structure. Django does this by running:

./manage.py syncdb

Running site & starting customizing it

Django comes in with a handy development server which could be run as:

./manage.py runserver

When server is running it will display the message:

Django version 0.97-pre-SVN-7092, using settings 'PersonalWebSite.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

When you look in your browser, you will see:

No Tag matches the given query.

This is normal, and that means you need to come to http://127.0.0.1:8000/admin/, add a few posts, add a tag named 'homepage' and tag one of you blog posts with this tag. Then, homepage content will appear.

Normally, next step is to change design. I am doing it every year, and it typically takes around 2 hours to change templates HTML code in 'templates' folder. This work is done by going to Open Source Web Design directory and choosing look & feel which you like. All designs are free to use.

Enjoy! And send me your questions and please comment!

Update 2008.06.25:

Update 2008.06.29: Some people seems to be puzzled by question how to add photos to gallery. The answer is that it follows absolutely different convention then many galleries. Since I run my site on the same computer where photos are, I see no reason to duplicate gigabytes of my photos. So, you just specify the location of photos and index them. Indexing process is the following: just add photo album and specify folder name in 'folder'. Upon save, it will index your photos to web site.

Posted on February 17, 2008 2 Comments
Tags: software development, django, python, personal

Comments

#1

wang bin commented, on February 25, 2008 at 5:18 a.m.:

Great work! Just one question, where is the rss of your blog so I can subscribe?

#2

esauro commented, on February 25, 2008 at 9:23 p.m.:

what kind of license the code is released under?

Can I assume I can use and modify it?


Post a comment