Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cosa mi entusiasma nelle prossime release di Django

Cosa mi entusiasma nelle prossime release di Django

Alcune piccole feature inserite nelle prossime release di Django e una piccola guida su come iniziare a proporne di proprie.

Riccardo Magliocchetti

April 17, 2015
Tweet

More Decks by Riccardo Magliocchetti

Other Decks in Programming

Transcript

  1. Poor man's multi tenancy Fixed #15089 -- Allowed contrib.sites to

    lookup the current site based on request.get_host() get_current_site() will now lookup the current site based on request.get_host() if the SITE_ID setting is not defined. https://github.com/django/django/commit/32c7d3c061b83e9206 ef2bf13fbc302a1998f317
  2. Poor man's multi tenancy: threadlocals from threading import local _tlocals

    = local() class ThreadLocalMiddleware(object): def process_request(self, request): _tlocals.request = request def get_tls_request(): return getattr(_tlocals, "request")
  3. Poor man's multi tenancy: your code from django.contrib.sites.shortcuts import get_current_site

    from threadlocals import get_tls_request request = get_tls_request() site = get_current_site(request)
  4. Stop alle window in admin! (DIY) Fixed #22894 -- Made

    admin add related/raw ID fields widgets customizable Fixed #24405 -- Made admin related object JavaScript overridable
  5. Lista applicazioni nell'admin Fixed #24553 -- Added the list of

    applications to the context of admin views
  6. Rework loading template Fixed #15053 -- Make templates more reusable

    by Improving template loading algorithm to avoid extending infinite recursion Thanks to Preston Timmons
  7. Django Fellowship program [...] • reviewing and merging pull requests

    • triaging tickets on Trac • helping new Django contributors land patches and learn our philosophy
  8. Aprire un Ticket https://code.djangoproject.com Cerchiamo tra i ticket già inseriti

    duplicati :) Cosa vogliamo fare e perchè NON scrivo una riga di codice
  9. Preparo l'environment Fork su github git clone <url repo fork>

    cd django git remote add upstream https://github.com/django/django.git git checkout ­b ticketNumero virtualenv masterenv ./masterenv/bin/pip install ~/path/repo/django
  10. Review Ci sono cose da sistemare? patch needs improvement Manca

    doc? needs documentation Mancano i test? needs tests
  11. Test tricks # se ho cambiato a html / js

    # installate ultima versione selenium runtests.py ­­selenium # Trova da quando miotest viene spaccato runtests.py ­­bisect miotest # Trova un test che spacca miotest runtests.py ­­pair miotest
  12. Test like a pro djangocore-box: tutte le versioni di python,

    tutti i db in vm https://github.com/jphalip/djangocore-box djangocore-docker: pgsql + python in un container https://github.com/PirosB3/djangocore-docker