# How we are gaining space with Django

Source: https://djangotv.com/videos/djangocon-us/2014/djangocon-2014-brazil-how-we-are-gaining-space-with-django/
Date: 2014-09-13
Speakers: Henrique Pereira

## Summary

Henrique Pereira describes Django’s growing community in Brazil, including a nearly 3,000-member mailing list, strong Django adoption, and a Django track at Python Brazil. He explains how his small university IT team has used Django to replace spreadsheets, support legacy PHP systems, and build an IT help-desk system in two months instead of the projected six months. The university also replaced a decade-old PHP website with a Django site in four weeks and is developing an IT service-management system that tracks tickets, metrics, reports, and user satisfaction. His examples argue that Django helps small, understaffed teams deliver useful, maintainable systems quickly.

## Transcript

### [00:00] Introduction and Goals

[00:20] First thing is I ask you to apologize. This is my first talk in English We are not English natives there, so we speak Portuguese there. So I might say something that is wrong or incorrect, but I'm trying my best. The title of my talk is Brazil, how we are gaining space with Django. Let me introduce myself. I am Henrique Pereira. I am a board member of Python Brazil. It's like the Python Software Foundation, but in Brazil. I am a Python programmer since 2008. I have been using Django since 2009. I am an assistant professor at a local university. And I am an IT analyst at another university. I'm gonna speak about the not

[01:06] goals of this presentation. I stole this slide from Jacinda yesterday. This presentation won't be about code, it won't be about soccer nor carnival. And I'm not going to talk about Brazilian companies using Python or Django, because there are many of them and I might have missed someone But I'm gonna talk about the goal of this presentation. The goal of this presentation is to show how we are developing stuff in Brazil And how we are forcing Django and how we are using Django to help people and to make cool stuff I'm also going to share my experience and my team's experience in migrating some systems from Legacy Code to Django in Brazil. So let's start by

### [01:52] Django in Brazil

[01:52] Saying something about Brazil. I'm pretty sure you all know that Brazil is a South American country. We have a division of 27 states plus a federal district Our capital is not Buenos Aires, so if you think Brazilian's capital is Buenos Aires, you are wrong. Our capital is Brasília, which stands in the middle of the country in the Federal District We have like 170 million people living in Brazil. Brazil is a pretty big pretty big country, so It's it's here. We are known for soccer and for carnival, but I'm not gonna talk about that. I'm gonna talk about Django in Brazil A recent survey showed that Django is

[02:39] Python's number one framework in Brazil. Out of 251 persons, 139 said they use Django on a regular basis. This research is available through that link. You could check it later. There are many, many, many details about Python usage in Brazil, but this is the most relevant one. Until the past few years Brazil was a great plow country. So we have many plown people there and right now we believe that there are more Django people than planned people in Brazil, so we are winning. We have a mailing list called the Django Brazil mailing list, which has almost 3,000 members. We have

[03:24] over 450 emails per month. Last month alone we had almost 500 emails So that's a lot of activity for a community-based mailing list. And we don't have a Django cone in Brazil. But we have something like a PyCon. We call it Python Brazil. This year's Python Brazil venue is the beach. It's a pretty nice place. Python Brazil will be happening in November. The 6th, the 7th, and the 8th of November in Porto de Galinhas, which is this marvelous beach. There will be a Django track there. So Pai Dani, Alex Gaynor, Linda Ross, lots of good people will be in Brazil. You are invited to come.

### [04:10] University Context

[04:10] It's a very nice place to be, and I would go there. So let's go back to Brazil. I live in the southernmost state, the blue one right on the bottom. It is far from the capitals, it's far from the center of the country We are nowhere near Rio de Janeiro or São Paulo, which are the main states in Brazil when we talk about development. And I work at a university in this state. I work at the Federal University of Santa Maria. In Portuguese it's Universidade Federal de Santa Maria. Our university has five campuses This map only shows four. There is a new one that was recently built.

[04:56] And I live and work on the number one, which is right in the middle of the state. We have almost thirty thousand alumni students, over four hundred and over four thousand and five hundred employees. So that includes professors, technicians, and lots of stuff. We have over 140 undergraduation programs and over 130 postgraduation programs. But we have a problem there Out of those four thousand five hundred staff, we've ha we have got only

[05:41] like four IT analysts. Our IT personnel or IT staff is very small compared to the rest of the staff at the university This research from Gartner shows that the average private company in Brazil has about five Percent of IT employees. So for every one hundred employees, you got five IT personnel. The government averages in Brazil is 6. 6 % Education average is a little under 4. 8. And at my workplace we have a little over 1% of IT personnel. So that's like four times what

### [06:26] IT Constraints and Legacy Systems

[06:26] We would have to be a level company. RIT is mainly done at DCPD, which stands for Data Processing Center. We are 37 IT analysts, which is just a fancy name for computer personnel. These analysts work with infrastructure, user support, development, and all computer related stuff. And the main programming languages used there are Delphi, which is not much used here in America, but It's an old language, Java, and PHP for the web related development. So okay, it's it's a bad choice, but it's the choice we had.

### [07:14] Django Help Desk Rewrite

[07:14] But everything changes. So I joined this university about two years ago, and when I joined, we started doing some changes, we started working with some technologies. But this is not about me. I'm gonna talk about a system that one of my fellow colleagues worked. The system was called the Cal. It was basically a user help desk system. It was written in PHP in the early 2000. It used lots of absolute obsolete technologies like Apache authentication and PHP 3 and lots of stuff that you don't want to touch. And it had no metrics. It was just a simple crude system where the user would create a ticket

[08:00] and someone from the maintenance would move that ticket around and do what had to be done. So this system w was a was a big problem. It was developed in PHP and it went through almost no development over the next 10 years, for example. So we had to change that and we are working on implementing ITU, ITRO CPG. And I talked with my fellow colleague and he said he was gonna rewrite the system and he was gonna do it in Java. So okay, Java, that's fine, but you should try Django. And so he did try Django

[08:47] and he wrote the whole system in almost Two months. He had never programmed in Python. He had never programmed in Django. And the system is like 20 times better than the old system. And this is one of the interfaces of the system. It is a simple interface, but Inside this interface, or going deeper into the system, we have lots of functionalities that were implemented using Python and using Django. This system was supposed to be built in six months using Java and he built it in only two

[09:32] using Django. So we won four months. Or there were another four months that we could have spent doing better stuff or working or creating better stuff for this system. And the system includes many things from user satisfaction service to even working and generating graphics and metrics. And okay. But this wasn't done by me. This was done by my colleague. And it is a pretty big system. It has Like I'm gonna guess about forty models and a hundred views, so okay, it's pretty big. But that's no

### [10:18] Replacing Spreadsheets with Django

[10:18] that's not how we started working with Django at my university. When I arrived there, there were lots of small systems, lots of spreadsheets laying around that we had no backup or that we couldn't automate some processes. So I started working on my own. I started creating stuff. I started Getting those spreadsheets and creating systems using Django with them. So we have lots of these small systems running around. This is one of the systems. It's actually a spreadsheet. That is a simple crud that generates some PDFs and generates some reports. And the system is actually used. Some people stopped using the spreadsheets, and now we have

### [11:04] Supporting Legacy Applications

[11:04] our data automated, our data with backups, our data generating reports. We also created many surveys for courses for evaluating disciplines all using Python and Django. And so this happened while I was there. We also used the Django to support some legacy systems we had written in PHP. This is a chat system that the people from Moodle users at our at our university. It was written in PHP and it was managed directly by going to MySQL and creating chat rooms there by hand. So it was a simple trick to set up a Django admin interface and create it on the Django admin

### [11:54] University Website Migration

[11:54] interface. So we have been doing that for a long time right now. By showing to the administration that we could do with this with Django, we received A great chance to develop more stuff using Python and using Django. Earlier this year we had the chance to rewrite our website, our main website Using Django. Actually, we were open to any technology, we chose Django. It took one programmer four weeks to code our new website. It replaced the 10-year old PHP CMS. Our website

[12:40] receives over 60,000 hits per day, so it's it's For Brazilian standards a heavy website. We have almost 500 simultaneous users and This is pure Django with a simple setup and some caching and it's all done. One programmer did this in four weeks. This website is used by many people, many users and inside the j it is managed by the Django admin And you can post news, you can basically do what SMES would do. And it worked very well.

### [13:25] IT Service Management Platform

[13:25] We had a very good reception over this site. We also started another project based on that Cal project I told you before. This project is the Meyer project. It has been in development for almost a year now. It will manage our services. So all services, all IT services in W at WFSM will be Managed by this tool. It intends to be ITO compliant, so every service will have metrics, those metrics will generate reports that will then help the administration. It is an in-house solution, so we have developed it from zero from ScatterEtch.

[14:13] This tool is already working. We started with we started inserting jobs this week. We have two programmers working. It can generate fancy reports like this one and we hope this can help us do a better job with less people than we should be doing. Basically when a user calls to our cent to our service central, a ticket is generated at the system depending on the service. And this ticket is then forwarded to the responsible people, and these people can then solve the problem and give some satisfaction back to the user. Okay?

[14:59] So this is what I am doing in Brazil. This is what I'm doing in Brazil. If you have any questions, we can talk about it.
