20 Apr, 15

Happy birthday to me and Devel form debug module to you all

I’m turning 32 today. People love birthdays, to me it’s just another line number in a messed stack trace output (philosophy mode enabled).
 
Two years ago I released a drupal module called Get form id (deprecated from now on) that does one small task - it tells you any form's id ...
Read now
09 Apr, 15

If Your Ionic + Android / Crosswalk App Has Stopped Getting Data From a Remote Server Then Read This

If you've enabled crosswalk browser for your Ionic based Android app and it suddenly stopped getting data from requests sent via $http that means that you've been automatically upgraded to Cordova 4.0 and in this version Cordova implements a whitelist policy for navigating the application webview via external plugin (before that ...

Read now
19 Mar, 15

Improve Ionic's Performance in Android With Native Scrolls

Does your Ionic app feel sluggish on scrolls in Android? Well, there's a way to cure that. Ionic has introduced native scrolls in its latest release. In short: native scroll disables Ionic's JS scrolling and releases CPU by handing over the scrolling task to the OS ie Android. As a result ...

Read now
31 Oct, 14

First Steps To Do When You Start A Project With Ionic

Here are the first steps I do when I start developing a mobile app with Ionic Framework. Ionic has a great getting started page where the main steps are perfectly described, but I usually do a little bit more of a setup. Here's my routine:

1) Install Ionic (if you ...

Read now
27 Oct, 14

How To Force Search API To Reindex a Node / an Entity

By default Search API (Drupal 7) reindexes a node when the node gets updated. But what if you want to reindex a node / an entity on demand or via some other hook i.e. outside of update cycle? Turned out it is a quite simple exercise. You just need to ...

Read now
21 Oct, 14

Django Uwsgi Nginx 504 Gateway Timeout

I had a long running process (data import) and encountered 504 Gateway Timeout error. I use Nginx / uwsgi pair to serve my Django app. After doing some research it turned out that the problem is in uwsgi_read_timeout directive. Directive sets the amount of time for upstream to wait for a ...

Read now
09 Oct, 14

AngularJS plus Django: A match made in heaven

I've just finished watching "AngularJS plus Django: A match made in heaven" DjangoCon US 2014 talk by Nina Zakharenko (Video | Slides) and it was quite helpful. Since I'm working with API's and mobile / angular apps a lot, I just made some helpful Django + AngularJS related notes that came out of ...

Read now
19 Sep, 14

Improving Number of Queries Generated by Django Comment's render_comment_list Template Tag

One of my Django apps uses Django Comments. To show a list of comments on a page I use this simple built-in template tag:

1
  1. {% render_comment_list for object %}

All is fine, but I noticed that it loads user object per every comment line. So if you have 50 comments on ...

Read now
08 Sep, 14

AngularJS Style Guide

I've just stumbled upon a very nice style guide for AngularJS on Github: https://github.com/johnpapa/angularjs-styleguide by John Papa. In the guide you'll find recommended approaches to your AngularJS code organisation in order to provide consistency through good practices. A very useful material for everyone who's already got ...

Read now
03 Sep, 14

Make Django and AngularJS play nicely together

Been working a lot with AngularJS and Django recently. To make them play nicely together one of the first things you need to do in your Angular App is to enable CSRF support and send X-Requested-With header, do it like this:

1
2
3
4
5
6
  1. var app = angular ...
Read now