(One of my summaries of a talk at the 2018 european djangocon.)
Lightning talks are quick 5 minute talks, so I won’t have every detail and speaker name correctly :-)
Passwords are ubiquitous. Passwords are terrible. Solutions: sms (bad), TOTP, one-time passwords. U2F key. That one is great. It will also be a standard in browsers.
There’s django-u2f to help you with it. He managed to get a demo working within 5 minutes!
Making reviews (on pull requests) great again with the new “github checks”.
What is tedious as a maintainer are the small tasks like “could you remove the trailing spaces”. With “github checks”, you can let a linter do that job and give the feedback to the user. Such feedback of a program is much less irritating to the person that created the pull requests than when you do it yourself.
“Github checks” is a new (beta) feature. It is made for computer feedback.
With a colleague, he set up a collection of linters, ready for integration with github. Hosted on AWS. If you’re interested, contact him. (It is all open source, of course).
She showed a yaml serializer error that allowed you to do rm *
when
loading some data. You shouldn’t use yaml.load()
but yaml.safe_load()
… and an xml example with entities. An entity referencing an entity and so on. Smoking laptop.
And some more fun examples :-)
The solution: use a stupid parser. Json is the correct direction. Don’t accept smartness in your serializer. It will bite you.
Everyone uses CSV one time or the other. But the experience is horrible. Just read the documentation and you’ll go mad.
The problem is the commas. But sometimes you want commas in the field values. So you need to escape stuff, with all the problems it entails.
But…. the ascii standard has a standard for a field separator! You can use that and it works all the time.
The comma is a hack. Don’t put somebody’s 30 year old hack into your production code!
(Note: according to https://en.wikipedia.org/wiki/Delimiter it is ascii 31 if I looked right).
He has 15 years of python/plone experience, but is a sales manager now. He needed a django demo so he started to build something himself based on https://simpleisbetterthancomplex.com and a site with some layout examples.
Under 400 lines of code he managed to get something working.
A quick prototype for a sales pitch. That’s what you can do with django!
He’s been working with django for 13, 14 years now.
One of the problems he hears a lot of people is that they just cannot get staticfiles to work right away. Perhaps the docs aren’t clear.
Staticfiles takes static files from your apps and specific
STATICFILES_DIRS
and puts it all in STATIC_ROOT
. People often think
they should put it in there.
The webserver than points at this directory with STATIC_URL
.
Photo explanation: the almost-finished building in my not-yet-finished station.
My name is Reinout van Rees and I program in Python, I live in the Netherlands, I cycle recumbent bikes and I have a model railway.
Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):