PyLadies Amsterdam diving into Django
On Feb 11th a brand new PyLadies Amsterdam meetup took place at Marktplaats HQ. This time we decided to do things different, we organized our first workshop. This workshop in django is “sliced up” into 3 parts, this time we organized the django workshop part 1. Besma and Claudia prepared a lot for this workshop and they did a great job, thank you! In case you missed it, here’s a small recap.
Around 20 pyladies were very excited to learn the ins & outs of django.The evening started with a lot (and I really mean a lot) of pizza and getting the laptops ready. The atmosphere was really great!
Besma began the evening with an introduction to django.
Basically, when you have a website you need to have a server (machine) where it lives. The server is waiting for any incoming requests and it sends back your website (in another letter).
In short: a web application is an application program that is stored on a remote server and delivered over the Internet through a browser interface.
According to Besma, frameworks are like partial applications. They solve most of trivial tasks for you and allow you to focus on business logic directly. You stuff your business logic into it make it complete. Without a framework you can build an app, but it takes more time and you have to do a lot more work/coding.
Django is a free and open source web application framework, written in Python, which follows the Model–View–Controller architectural pattern:
- A controller can send commands to the model to update the model’s state (e.g., editing a document). It can also send commands to its associated view to change the view’s presentation of the model (e.g., by scrolling through a document).
- A model notifies its associated views and controllers when there has been a change in its state. This notification allows the views to produce updated output, and the controllers to change the available set of commands. In some cases an MVC implementation might instead be “passive,” so that other components must poll the model for updates rather than being notified.
- A view requests information from the model that it uses to generate an output representation to the user.
Installing Python & Django
After an hour of introducing us to django, it was time to get started. Claudia made a very nice guide on how to install Python, pip, django and how to create a virtual environment. If you want to know more about this, please go here.
Run your web application
After installing, it was time to run the server. We wrote down in the terminal:
(myvenv) ~/admin$ python manage.py runserver
Now all we needed to do is to check that our website was running. We opened our browser and entered the address:
And then the ‘magic’ happened! It was nice to see that a lot of girls got excited when they got their first web app started. In the end everyone had their application running.
Unfortunately, there wasn’t any time left to dive deeper into our application. Next time we will have workshop II, then we will work together on our apps and learn even more about django.
Tweets about the django workshop
- @Quirky_Kwallen:Dhango workshop by
@PyLadiesAMS . And tons of pizza!
- @Lieke2208: It worked! Created my first
#Django page! @PyLadiesAMS
- @winterstat: Learning all about
#django with @PyLadiesAMS tonight! Thanks ladies!
- @PyLadiesAMS: Busy installing
#python at #djangoworkshoppart1 pic.twitter.com/Az6nLn4I7V
- @MirBonapart: Thanks so much, Besma and Claudia! Can’t wait for the next workshop!!
About PyLadies Amsterdam
PyLadies Amsterdam is a group for Python female programmers at any level of experience from the Amsterdam Area. PyLadies is an international mentorship group with a focus on helping more women become active participants and leaders in the Python open-source community. Our mission is to promote, educate and advance a diverse Python community through outreach, education, conferences, events and social gatherings. PyLadies also aims to provide a friendly support network for women and a bridge to the larger Python world. While the focus is on women, anyone with an interest in Python is encouraged to participate! If you want to know everything about our next meetup and such, you can go here. If you’d like to know more about PyLadies International, please check this website.
The tutorial we used was based on the Djangogirls tutorial. If you like to learn more or try it yourself, please visit djangogirls.org