I’ve started using Drupal on 2007. For about 9 years I visits drupal.org almost on daily basis, I released a module, I suggested some patches, participated to local events and so on. I’ve started working on Drupal with Drupal 5 and I ended on Drupal 7 with a long time on Drupal 6. In the meantime, Acquia was created to support Drupal development and make some money from the project and for the project in […]
In a recent article I explain the motivations for an upgrade from a no longer maintained Drupal 6 installation to Django 1.8. I will now cover more in detail the migration techniques adopted in the upgrade and I’ll deepen the models and the relationships. Structure If you’re a drupaler, you’re familiar with the node/NID/edit and the node/add/TYPE pages: Here we have two visible fields: Title and Body. One is an input type text and the other a […]
I maintain a news website written in Drupal since 2007. It is a Drupal 6, before was a 5. I made many Drupal 7 installations in these years and I went to three Drupal local conventions. This is a guide on how to abandon Drupal if you already knows some basics of Django and Python. Drupal on LAMP: lessons learned PHP is for (not so) fast development but maintainability can be a pain. Drupal try to overcome PHP limits, with […]
Using Varnish as reverse proxy or proxy is an useful approach to reduce the load of webservers like Apache. In Drupal 7 I’ve to clear the varnish cache of a specific domain when Drupal caches are globally cleared. Drupal has the right hook invoked when cache are cleared: Now this piece of code simply adds the current domain to a ASCII text file on /var/www/varnishdomains2cleardir/varnishdomains2clear. Preparing the file to the write On CentOS you have […]
Some months ago I talked about how to achieve a unified login from Django to Drupal using drush. The basic assumption was that both Drupal and Django are on the same server. What if the two components are on different servers? Paramiko is a SSH2 protocol library aimed to provide simple classes to make SSH connection. Let’s see how the code to call drush on command line changes. Prerequisites: paramiko on your app settings.py add: […]
I’m installing a Pressflow 6 on a new machine running CentOS 6. I’m using Apache MPM Worker with FastCGI. Then I get the classical e-mail error: Unable to send e-mail. Please contact the site administrator if the problem persists. Then I try to use sendmail: Where testmail is a file containing these lines: And i get the message. PHP cannot send email through apache! Trying a simple php script to send mail like drupal core […]
I’m working on a project that has two hearts: a Django for a custom CRM with thousands of imported users, and Drupal, where those users should login. This howto apply on: Drupal 7.x (slave) Django 1.5 (master) There are many single/centralized sign-on solutions around, like OpenID, OAuth CAS and external services like SecurePass to do the job. I’m looking for a more basic solution, and I asked to Django-it Google group for a help. Here my […]
Valid for: Drupal 7, Views 3. I have two multiple text fields on a Drupal 7 content type. I want to display those fields paired by delta in a view. Here the code I used in my module named mymodule.module. Thanks to hook_views_pre_render(). I use this piece of code to pair Youtube URLs and plain text description for a JSON output generated via Views Datasource. Remember to disallow multiple values when adding these fields to […]
How to use different date format per language in drupal, using i18n module.
Solving the wrong socket problem with MySQL MySQLi on Drupal.