Services Blog Français

Using bootstrap and less css in django

| by jpic | python django git

Overview

  1. Compile less in debug mode in the browser for development. This enables your integrator to work faster and to view syntax errors reports in the browser and make development awesome.
  2. Use django-compressor for production to pre-compile all your less into css and make performance awesome.
  3. Be able to reuse in your less scripts: bootstrap classes, variables, etc, etc … else what is less good for ? The problem is that you must get your compiler to compile both bootstrap and your own less scripts in the same run.

Basic strategy at Django level

This is how your site_base.html template could contain:

Read More

Automatic updates for commits made with GitHub code editor

| by jpic | python django github

For development, we host the project on some small server. It is running via ./manage.py runserver just for our customer to be able to see what’s going on. Also, this enables our designer to hack the project via SFTP without having to deploy the website locally.

Currently we are working with a new designer who found out that GitHub’s editor was pretty cool because it saves him from doing backups himself.

Read More

Drupal 7 with nginx and uwsgi-php example configuration

| by jpic | linux php uwsgi nginx

Drupal is a CMS written in PHP which supports PostgreSQL. It is made for mod_php and Apache, thought it works with uWGSI and Nginx.

When you have tried uWGSI you know why you want this.

Example nginx configuration:

server {
    server_name drupal.example.com;
    root /srv/drupal/www/;

    error_log /tmp/nginx_drupal.log;

    index index.php index.html;

    location / { 
        try_files $uri @rewrite;
    }   

    location @rewrite {
        rewrite ^/(.*)$ /index.php?q=$1;
    }   

    location ~* files/styles {
        access_log off;
        expires 30d;
        try_files $uri @rewrite;
    }   

    location ~ .php$ {
        include uwsgi_params;
        uwsgi_modifier1 14; 
        uwsgi_pass unix:/tmp/uwsgi_drupal.sock;
    }   
}   

And an example uwsgi configuration:

Read More
Previous Page 24 of 32 Next Page

They trust us

Contact

logo