Post has attachment
Hello Guys!
Are you ready for yet another challenge? The Code Bytes #29 is here!
Get a chance to win lots of goodies, gift vouchers and much more. Battle out your skills with fellow coders and come out victorious.!
Register here for FREE: https://codeground.in/code4/
Photo

Post has attachment
AMAZON is hiring Software Development Engineer - II
Job Location : Bangalore
Experience : 3-8 years
Take the Online Test here: https://codeground.in/code4/
Photo

Django works great on shared hosting too. I hope you are aware of it. If you love Python / Django and going to purchase website hosting package, just ask the company before investing.

+Rakesh Gupta  If you don't mind can you explain to me what populate_rango.py actually do. Whenver I change the value of views and likes in that file and run I always get this error:
django.db.utils.IntegrityError: UNIQUE constraint failed: rango_category.slug

I have to delete the database and recreate it which defeats the purpose of creating this script.

Post has attachment
There are many Django websites available but most fascinating example of the Python/ Django capabilities can be seen here on:
https://www.texastribune.org/
When you visit, don't forget to explore their Directory on this link:
https://www.texastribune.org/directory/

Friends, this work does not looks a one man show but their entire site is arranged and made with great labour and efforts.

I am dreaming to start a similar new project and if you have a similar motto, do message me or reply here.

Some applications might need SITE_ID var declared and throw error while syncdb:

Error: "AttributeError: 'Settings' object has no attribute 'SITE_ID'"

Solution: 
Add following line to the settings.py
'SITE_ID' = 1

Error:
"'sites' has an m2m relation with model <class 'django.contrib.sites.models.Site'>, which has either not been installed or is abstract."

Solution:
Add following line to INSTALLED_APPS list if not added already:
'django.contrib.sites',

Post has attachment
You definitely should watch and work on this great tutorial by Arun Ravindran:

Building a blog in 30 mins with Django (Screencast HD)

I completed this successfully without Feeds feature though as I don't require it for now.

Post has attachment
Chapter 6: http://www.tangowithdjango.com/book/chapters/models_templates.html
Took some time but finally was able to fix the view for 5 most viewed pages.
Screenshot of the exercise: 
Modify the index page to also include the top 5 most viewed pages.
Photo

Django on Windows XP was a frustrating experience for me.
Luckily, I installed Ubuntu 12.04 as a dual boot system on the very first day I bought my laptop 2 years back.
Now, feeling great after setting up every required update and finally with these tools:
virtualenv
pip
git

Heading towards tango with django...

Here is the summary of Chapter 1 for easy followup:

------------------- Tango Chapter 1 ------------------------

1, first, create project using:

django-admin.py startproject tango_with_django_project

2. go into project directory above \tango_~1 and create new application:

python manage.py startapp rango

3. Now add 'rango', into settings.py:
edit settings.py under \tango_~1\tango_~1\

4. edit \tango_~1\rango\views.py and add following views (2 nos.):

from django.http import HttpResponse


def index(request):

    return HttpResponse("Rango says hello world! <a href='/rango/about'><br />About</a>")

def about(about):
    return HttpResponse("Rango Says: Here is the about page. <a href='/rango/'><br />Home</a>")

5. create a new urls.py under /rango application folder and enter:

from django.conf.urls import patterns, url
from rango import views

urlpatterns = patterns('', 
url(r'^$', views.index, name='index'),
url(r'^about', views.about, name='about'),
)


6. Now edit /tango_~1/tango_~1/urls.py and add a new line for urlpatterns:

url(r'^rango/', include('rango.urls')),
Wait while more posts are being loaded