Even though the chances of having someone stealing your login information or hijacking your sessions are low, you should still consider some security measures to protect any sensitive information you may be sending unencrypted over a public Wi-Fi connection. We all seldomly or frequently use free open Wi-Fi connections available at our local coffee shop, public library or airport terminal. But are you really sure you're safe? These places are playgrounds and test labs for many out there. So next time you're out there with your iPad, consider using an SSH tunnel to encrypt your online activity.
I found this nice solution worth of sharing on how to handle /var/www or /srv/www folder permissions. This setup will make things easier for multiple users uploading content to www. You will avoid having to chmod your file and folder permissions all the time. It will also provide you with a more secure setup, in case you've been too lazy to configure your permissions, setting everything to 777...
As a developer coming from an object-oriented programming background (e.g. C++, Java, etc.), you're probably wondering how to create classes in Javascript. But Javascript is a prototype-based language, a style of object-oriented programming in which there are no classes. If there are no classes, how exactly is this a style of object-oriented programming?
So, you would like to invite your readers to leave a comment or remark to that wonderful blog post you just wrote? Django's Comment Framework makes it really easy to attach comments to any Django model.
You may want to show a teaser instead of your entire blog post in your homepage. All you need to do, is add a teaser field to your Post model.
Implementing a feed for your blog is actually pretty straightforward. Django comes with a high-level syndication-feed-generating framework that makes creating RSS and Atom feeds easy.
Let's say you want to have a list of the most recent posts in your blog and that you want this list in the right column of your site. You can create a template tag to fetch recent posts.
So, you've implemented blog post categories. However, although you did create a list of the categories available in the blog, you still don't have a way to see posts published within a specific category.
So you want to add support for multiple authors? This is actually pretty easy.
If you want to post that cool snippet of code you just wrote, you probably want code highlighting. In Django, this is actually very easy to do with Markdown and Pygments (a syntax highlighter). Markdown includes an extension called CodeHilite that adds code/syntax highlighting to standard Python-Markdown code blocks using Pygments.
Now that your blog app supports post categories, you probably want to be able to showcase them. You could update all your templates to show the categories list, but you want to avoid repeating yourself, right? (DRY). This is where template tags come in handy.
A typical blog engine gives you the ability to organize your blog posts into categories, making them easier to find. In this post we'll go over adding support for post categories to our Django blog app.
Want a date-based archive for your posts? No sweat, use Django's Generic Views to create them. It will be up and running in a matter of minutes.
When blogging, you probably will want to draft posts and publish them when they are ready. We'll need to add a status field to our Post model.
I'm no design guru, and quite honestly, I'm just not in the mood to design a site from scratch. So, to jump start our new blog and give it a nice simple look, we can get ourselves a clean customizable template from initializr.com. Initializr generates templates based on HTML5 Boilerplate, allowing you to choose which parts you want or don't want from it.
Yes, there are a zillion other Django blog apps out there. Yes, thou shalt not repeat yourself. There are many reasons not to, however, I just thought it would be fun. So, I decided to write my own blog engine and document the process. Hopefully, someone will find it useful.
Hello World! Yep, kick-starting with a traditional hello world.