thejaswi
Comments
Reactions

Link Roundup for week ending 5/11/2011

By : thejaswi

  • Jacob Kaplan-Moss has a beautiful article on concrete inheritance vs abstract models for inheritance. Must read!
  • Charles Leifer, the current maintainer of Django Snippets has an exhaustive blog post on setting up search using the Solr backend for Haystack.
  • Chris Heilmann has an interesting video on "Reasons to be Cheerful: being a web developer is awesome!"
  • Andy McKay defends the plain old non-reusable Django apps as they are easy to write, rapid to develop and have very little boilerplate code.
  • Piotr Malinski has a blog post on how to use web based image editors within django apps.
  • Derek Gathright shows ...

more info..
Topics : linkroundup
Javed
Comments
Reactions

Seven reasons why you should switch to Vim

By : Javed

So you want a better IDE for developing django, huh? Why not give good old vim a try?

Use pathogen to maintain your vim plugins (and sanity). Using this, you can clone the repositories listed here to .vim/bundle/ and start using them right away.

Also, consider adding your .vimrc and .vim to a repository. Include .vimrc inside .vim and symlink .vim/.vimrc to ~/.vimrc to version control your .vimrc.

My vim files can be found here. Also, here's an imgur album demonstrating these plugins in action.

1. Syntax highlighting for django templates

Starting from vim 7.1, syntax ...

more info..
Topics : django vim

Importing wordpress

By : shabda

We now have a way to import wordpress to blogango, and all our old posts are on this blog.

Thanks for reading.

more info..
Topics : django wordpress
shabda
Comments
Reactions

Getting trending Github projects via YQL

By : shabda

Github.com/explore allows you to see the trending Github topics. They use repopular.com for this, which use twitter retweets to find out the popular Github repos.

Since neither Repopular, nor Github have a RSS of these trending repos, I wanted to get a list of these. Here is how easy it is with YQL.

How we do it

  • Go to YQL console. Give the SQL query to get the data from the webpage.

  • where url="repopular.com" and css="div.pad a" is the magic which select the webpage, and also what DOM elemenst we are interested in ...

more info..
Topics : django API
thejaswi
Comments
Reactions

Link Roundup for week ending 22/10/2010

By : thejaswi

more info..
Topics : linkroundup
shabda
Comments
Reactions

Essential web-apps to run a software business.

By : shabda

We work on a variety of products and with people. We work in a highly distributed environment, with all of our clients working remotely from us. And while we work out of the same office, we are frequently working from other places as well. Here are the tools which help us stay productive, sane and working. :)

For our open source projects we use Github.
For our client and non OS projects, we use Unfuddle.

For our client code we need both SVN and Git, and we need tickets which can be assigned to people. Both ...

more info..
Topics : business
shabda
Comments
Reactions

Django is not flexible

By : shabda

Django is not flexible at all because you can not do simple things like.

more info..
thejaswi
Comments
Reactions

Link Roundup for week ending 15/10/2010

By : thejaswi

This is the first in a series of posts where we share links aggregated from popular sources, tools we use, projects we work on, almost everything related to web development and more....

  • Django's got HMAC signing: These set of changes prevent timing-based attacks and are fully backwards compatible unless you've a short SECRET_KEY.
  • Django's got more committers and they are already hard at work!
  • The django tests have been upgraded to use the unittest2 module. Phew! Lots of work has gone in the past couple of weeks. It just means one thing, the 1.3 alpha window ...

more info..
Topics : linkroundup
Javed
Comments
Reactions

Testing webhooks in development platforms

By : Javed

Webhooks were popularized by PayPal and have become commonplace now a days. A typical webhook service fires a POST to a URL of your choice whenever something interesting happens. You handle this request and respond accordingly.

But you need to test webhooks regularly during development and it is a bit of a problem if your development server is inaccessible from the rest of the Internet. I have tried to solve this using ssh and nginx.

For this method to work you need:

  • Development server (which can hopefully process the webhook at /webhook) lets call it (D)
  • SSH accessible server (S ...

more info..
Javed
Comments
Reactions

Ubuntu as a django development platform

By : Javed

Introduction:

Hi, I am Javed Khan, also known as tuxcanfly elsewhere on the internets. I have recently joined agiliq and am thrilled to be a part of the team.

This blog post covers the steps I took to convert a fresh ubuntu install to a full fledged django development platform.

Databases:

Mysql sudo apt-get install mysql-server mysql-client python-mysqldb Postgresql sudo apt-get install postgresql Sqlite sudo apt-get install sqlite python-sqlite

Version Control:

Git
need help setting up git with github? sudo apt-get install git-core git-gui git-svn Svn sudo apt-get install subversion rapidsvn meld meld is a diff/merge tool that can ...

more info..
shabda
Comments
Reactions

Moving home

By : shabda

Tl;dr version:

We are moving our site from Uswaretech.com to Agiliq.com. Please update your book marks and the like.

Longer version:

We have moved. Our new, cool, and amazing site is Agiliq.com. Built with Django, pixie dust and pink unicorns, its is sure to amaze you. Please update your bookmarks.

Gory details:

If you are client of ours, the Unfuddle and billing details would be changing soon. (You should also have received an email from ...

more info..
Topics : meta about
lakshman
Comments
Reactions

Great Indian Developer Summit 2010: A Review

By : lakshman

GIDS_logo Great Indian Developer Summit, is the India's largest developer conference, held at Bangalore, India; in its third edition this year. The conference concluded last Friday. The summit had about a 1000 visitors on the first day and a comparable number on the other days. The conference basically caters to the enterprises, and hence their focus on the .Net, Java and Flash. There were many star speakers. I'm speaking I gave a talk on django, introducing it and then explaining the standard community conventions to make good reusable applications. Django, being a social software, developed by a community, it is important to ...

more info..
Topics : Uncategorized
saikiran
Comments
Reactions

CSS Frameworks

By : saikiran - Designholik

A framework is a basic conceptual structure which you can use as a “scratch” for your web-projects. For instance, instead of defining global reset, consistent baseline, typographic rules or basic styles for forms over and over again — every time you work on a new project — you can prepare a default-style once and reuse it in all your future projects. This is what you call a CSS Framework. Major Advantages of CSS Frameworks

  • Increase productivity.
  • Cross Bowser Compatibility
  • Clean, Well structured easy to maintain code base.
Disadvantages of CSS Frameworks
  • Takes time to understand the CSS framework.
  • You ...

more info..
Topics : CSS Design
shabda
Comments
Reactions

Rails and Django commands : comparison and conversion

By : shabda

The most commonly used Rails commands and their Django equivalents

Rails | Django

rails console | manage.py shell
rails server | manage.py runserver
rake | None
rails generate | None
rails dbconsole | manage.py dbshell
rails app_name | django-admin.py startproject/manage.py startapp
rake db:create | manage.py syncdb

The salient points to note are,

  1. Django has all commands via manage.py, Rails has it broken into rails and rake.
  2. Overall there are more Rails+Rake commands available than Django commands
  3. There is no one to one mapping between Rails and Django commands. Eg. There are no equivalent to rake doc:* or rake ...

more info..
shabda
Comments
Reactions

The Rails and Django models layer Rosseta stone

By : shabda

Rails Active records and Django models are more similar than they are different. This is a quick guide to converting between Rails 3 and Django 1.2, and is available on github at http://github.com/uswaretech/Acts-as-Django

Defining models

Both Django and Rails keep the canonical database representation in ruby or python.

#Django

class Post(models.Model):
    name = models.CharField(max_length = 100, )
    slug = models.CharField(max_length = 100, )
    body = models.TextField()

class Comments(models.Model):
    post = models.ForeignKey(Post)
    username = models.CharField(max_length = 100, )
    comment = models.TextField()

#Rails

#db/schema.rb
ActiveRecord::Schema.define(:version => 20100319195739) do

  create_table "comments", :force ...

more info..
shabda
Comments
Reactions

Doing things with Django models - aka - Django models tutorial

By : shabda

Django abstracts most of the actions you would be doing with the Database. What it doesn't abstracts, and doesn't try to abstract is the Database modelling part. This is a quick tutorial describing to how model your data in Django models.py, and how to access and modify them.

Consider a hypothetical HR department, which wants you to build an application to track and manage their processes. They have employees who work for a department, contractors who work for multiple department. Let's see how you you would do that in Django.

from django.db import models

class ...

more info..
shabda
Comments
Reactions

Wordpress and Django: best buddies

By : shabda

Summary: How to integrate a non Django database system in your Django code, using Wordpress as example. The completed code is available at github or you can see some screnshots


Though there are quite a few good Django blog applications, our blog is based on Wordpress. A number of plugin's make moving to a Django based app a bad decision for us, and not in the spirit of "best tools for the job".

We moved the other way, and decided to use Django to admin the Wordpress database. The completed code is available on Github

It is not too ...

more info..
shabda
Comments
Reactions

Doing things with Django forms

By : shabda

Forms are one of the best features of Django. (After models, admin, url routing etc :) ). Here is a quick tutorial describing how to do things with Django forms.

  1. Basic form

Prob. You want to show a form, validate it and display it.

Ans. Create a simple form.

class UserForm(forms.Form):
    username = forms.CharField()
    joined_on = forms.DateField()

This wil take care that the form is displayed with two text field, and a value for them are filled in, and the second field has correct formatting for a date.

2.

Prob. Create a form which has values populated depending upon a ...

more info..
shabda
Comments
Reactions

Tools of Pro Django developer - aka What powers dinette and almost every app we write.

By : shabda

There are some tools and apps which we use with almost all apps we write, and in particular which, we used for dinette. Here they are broken into useful during development, and (also) useful post development.

During Development

  1. Ipython and ipdb
  2. South
  3. Django test utils
  4. Django extensions
  5. Django debug toolbar
Ipython and ipdb

Ipython is a enhanced shell for python. Ipdb similarly add extra capacity to the builtin pdb debugger. It is extremely convenient to drop into a ipython shell right where a complex piece of code is being hit.

from IPython.Shell import IPShellEmbed
ipython = IPShellEmbed()
ipython()

Of course ...

more info..
Topics : python tips
shabda
Comments
Reactions

django-forum

By : shabda

twitter ready version:

We have released a Django forum application, with some cool features not in any other Django based forum. You can get it here or see it in action.

blog version

There are quite a few Django based forum applications, so why another? Its a bit of a rhetorical question, as the answer is "none of them met my needs exactly, so we created my own", as you might expect.

Without further ado here is a list of features. It is available on uswaretech.com/forum/.

  • Based on, inspired by and ripped from PunBB. (Thanks!)
  • PunBB like 3 ...

more info..
Topics : django utilities apps
shabda
Comments
Reactions

Django-buzz

By : shabda

We have updated the Django popular stories widget, which powers the widget in the side bar. It is now on Github.

Earlier the code used was hardcoded to only find Django stories, but now you can create arbitary topics from admin.

Get the code and create the widgets on your servers, (or let us know, and we will create it here if it is interesting). We created three we want to track. Databases, Python and Javascript

Databases

Python

Javascript


We build amazing web apps. Talk to us to discuss what we can do for you.

more info..
Topics : Uncategorized
lakshman
Comments
Reactions

Using bpython shell with django (and some Ipython features you should know)

By : lakshman

What is bpython?

bpython is a fancy interface to the Python interpreter for Unix-like operating system.

says the bpython home page. It provides syntax highlighting, auto completion, auto-indentation and such stuff.

Unlike iPython, which implements then entire shell functions and emulates the standard python shell, and adds enhancements, bpython just adds features on top of the existing python shell functionality, using the curses module.

bpython

The "killer feature" of bpython is, as you can see from the image above, the IDE like prompting of the function parameters and the doc string of the function dynamically. I have always thought, what IntellijIDEA ...

more info..
lakshman
Comments
Reactions

Foss.in 2009: The best foss.in. Ever.

By : lakshman

There are technology conferences, and then there are gatherings of passionate technology enthusiasts. You will most likely not know what I am talking about, unless you saw that someone wrote a software for controlling a toy-car, using it's blue tooth module, from an Nokia phone, at the event. You will most likely not know what I am talking about, unless you were at Nimhans Convention center at Bangalore between 1st to 5th December 2009.

nimhans hardware hack

Foss.in had its beginnings 10 years ago, as linux bangalore, whose objective was the popularize free and open source software to local Indians. From ...

more info..
Topics : meta India
shabda
Comments
Reactions

Django quiz

By : shabda

A quick django quiz. Answers available tomorrow. Get it as a text file (django-quiz) or on google docs or read below.

### Easy

1. You have a class defined as

    class Post(models.Model):
        name = models.CharField(max_length=100)
        is_active = models.BooleanField(default=False)

You create multiple objects of this type. If you do
Post.objects.get(is_active=False),

what exceptions is raised?

a. MultipleObjectsReturned
b. ManyObjectsReturned
c. SyntaxError
d. MultipleModelReturned
e. ManyModelReturned

2. Where is the function render_to_response defined?

a. django.views
b. django.shortcuts
c. django.templates
d. django.contrib.templates
e. django.contrib.shortcuts

3. What is the ...

more info..
Topics : django tips meta
©COPYRIGHT AGILIQ SOLUTIONS