Day 2 Lightning Talks

This video is from DjangoCon Europe 2024 in Vigo, Spain.

Day 2 Lightning Talks
0:27:14
Published July 11, 2024
133 views

Summary

The lightning talks cover several practical and community topics: Alyssa presents a Django/Nginx approach to authorizing access to uploaded files using protected file fields, internal Nginx locations, registries, and automatically generated views. Other speakers introduce a Django object-cloning library, explain how developers can improve user journeys by defining problems and designing UX before implementation, and invite attendees to PyConES in Vigo and EuroPython in Prague. The final talks encourage engineers to organize around technology ethics—especially AI—and describe Django Space as a supportive mentorship route into contributing to Django.

Key takeaways

  • Protected Django files can remain served by Nginx while access is controlled through authentication, authorization, internal locations, and reusable protected file fields.
  • A configurable Python library can clone Django model instances together with selected related objects and apply custom changes during cloning.
  • Backend developers can improve user and customer journeys by mapping current and ideal experiences and completing problem definition and design before development.
  • PyConES in Vigo and EuroPython in Prague offer talks, workshops, tutorials, sprints, and opportunities for speakers, sponsors, contributors, and attendees.
  • Engineers should consider the social consequences of what they build and form internal ethics communities that can challenge questionable company projects.
  • Django Space provides mentorship and a supportive group structure for people making their first contributions to Django.

Summarised automatically from the transcript.

Transcript

4,157 words · auto-generated Show

Automatically transcribed, so expect mistakes in names and technical terms.

0:00

So

0:00

Speaker 1: lightning doors will be five minutes maximum. Yeah. It's start.

0:07

Speaker 2: Okay, so Yeah, I'm talking about file access authorization and uh I have a basically a concept for that and I'm mostly asking for feedback here. So uh first about me, I'm Alyssa, I use she, her pronouns. Um I'm a DevOps engineer at Unas and Devolve, which is a small or medium-sized um software consultancy in Berlin, and I'm also a freelance system engineer consultant. We ran into a problem about serving files from our server. So we have file fields in a monolithic Django application that is running behind an Nginx server. We are running in a somewhat constrained network environment, so we cannot really use Amazon as three buckets or similar uh services and we wanted to avoid hosting additional software like Minio

0:54

Speaker 2: because this just adds complexity, it makes it more difficult to maintain the whole infrastructure and we really just had some the few files That users uploaded that we wanted to serve. And our question was: how can we actually add authentication authorization to access to these files? So if you look at the Django tutorials, they usually just ask you to put them in the media folder. folder and then make the media folder available with Nginx. But they don't really talk anything about like managing the access to these files. So I searched around the web and I did not really find any good solution for that. If you know a good solution, please let me know. But we basically wrote our own solution.

1:40

Speaker 2: That um solution works mostly on view classes that I have first a public View that is just the normal access as you know it um for like public files that everyone may be able to see like user profiles or stuff like that And then there's also protected views that um may either require at least authentication that user may users need to be logged in, or even authorization that only for sp like certain users can view a certain file. And this um is based on XXR Redirect and uses uh Nginx internal locations. So um these are still served via Nginx, but they aren't accessible from the outside if you aren't authorized to do so.

2:25

Speaker 2: We have protected file fields, which are subclass of file fields that use a mix-in. They basically are aware of the links where to find the view that is related to them. Um they can be integrated with all the other features um and they are the point where access properties and other things can be configured about the views. Um there's a registry for protected file fields, so this avoids using the same directory for multiple purposes. This um keeps track on which files are stored where so you have a bit of data governance so you actually know what kinds of information you are storing in your files that users are uploading. And they can also automatically generate the URLs entry for all the different views you use for these files.

3:12

Speaker 2: There's protection classes that are mostly based on Kevin Mitnick's four classes like public, internal, private, and confidential. There's An automatic generation of view classes so you don't really need your developers in a team to manage a whole bunch of views because most of them can be derived from just some properties of these protected file fields. And I'm now at the point where I would like to open source this um library because it's yeah, it's basically a whole framework that I built there. I really need feedback on this, like what are actual use cases outside of our own organization and our own projects. And so I'm just asking you to, um, if you if this is an issue that is affecting you that you would like to talk about.

4:00

Speaker 2: Or you know any other framework that I didn't find, like please talk to me. So you can either send an email or Come to my website to find other means of contact or just talk to me at this uh conference. I'm uh only here until tomorrow evening. So yeah.

4:22

Speaker 1: Okay, I can speak here while he is preparing everything. We we start. So yeah, uh we are uh uh David, Miguel and Arthur and me Alex uh so we want to ask you if you had uh enough time visiting bigo and surroundings. I think that I 'm gonna talk for here. So if not you will have a second chance. So uh this year in October uh will be the PyCon S uh the Python Spanish conference in Vigo as uh again will be the f uh fourth five and sixth of October No, that's fine, no problem. Um so we'll be a really big conference as usual with Python. We'll be more than eight hundred uh developers. Uh we will try to reach even one thousand, we don't really

5:09

Speaker 1: know. Uh Spanish uh Python uh the Python is uh PyCon S is really big conference. Uh we will have from people from mostly of course from Spain because it's Spanish conference, but we will have English track as well. Uh we will have workshops. Uh we'll not be only the the three days of the conference. uh Fridays, uh Sunday, Saturday and Sunday, but also the previous week will be activities in the city. Um there will be people from different levels, uh from core uh developers in the Python uh Python core uh but also from different computers communities, uh students, so it's a conference uh prepared for everyone. Um we are trying to uh be very diverse, uh very inclusive, bringing everyone together

5:55

Speaker 1: from companies and etc. Uh the Python conference relay specifically in sponsors, in sponsorships, uh because the ticket also is very achievable and very cheap for everyone. Uh and as well, uh well the call for papers is open. Uh we'll be closing soon, but if anyone here is happy to to join the conference uh as a speaker as well, it's very welcome. Uh that would be great. Uh and yeah uh well Here some of part of the team. There are more people. Others are uh attendees. And so yeah, just just to say that. That we will be very happy to have uh you in

6:41

Speaker 1: in the conference as well as speakers, sponsors, or attendees. That would be great. And yeah, thank you. If you have any questions you can reach us uh these days and I think that's that's everything. Thank you.

6:54

Speaker 3: Hello. Hello. My name is Alexander. I am from a company named Jandy Starov. We based from uh in Ukraine, but it's like irrelevant pronoun. Yeah, I want to talk a little bit about a custom practical very practical solution for a very uh k common problem that they faced a lot uh lately, which is like cloning for the Janga instances. Uh there is like a few solutions on the online on the GitHub that I found and I also seen the custom solutions that I wasn't satisfied. So I build my own. Uh so f for me, uh the main requirements was uh the solution must provide automatic way to

7:41

Speaker 3: walk all over over all of the instances it should be cloned. That it should be have a way to control the how instances of the Django modulus actually. copied also uh I need to specify what ex what exactly relations I need to clone and yeah uh it should be also reusable. There is uh more in-depth technical explanation on the hacker about all of the solutions that they made and the reasoning for that and there is also um a Python library that you can like check on the GitHub Uh so a a little example what I mean by cloning, cloning uh it's like just copy object to another object. And uh

8:26

Speaker 3: for me it was very often I needed to copy like Like for example yeah it actually okay I I can see like if you have like a pro product and some like characteristic for the fee features for this product you need to copy like product and all of the features of that. And sometimes you need to change like title, change some uh automatically change um some like um properties of the said instances. So I what I made was like a library that uh actually have ability to uh fetch all of the data like if you have one product and bunch of related instances you can like specify a simple config for that. Like

9:11

Speaker 3: if you if like uh on the config it's like it will be uh related name for just like uh related instances so it's like if it's it's a characteristics it's characteristics it's like whatever You can also specify very simple. I don't know if you see specify very simple what how actually cloned instances can be changed. you can do it like in the code and then you just like use the clone function put the instance that you want to clone uh config uh for the relations that need to be cloned and uh this like class that you use to specify the customize the cloning process and it will take uh

9:56

Speaker 3: it will make a new instances for you. So yeah that's basically it. Yeah, you can check the library there. You can uh check the technical explanations and the reasoning for the technical uh solutions there as well uh as part of this library Because I needed a way to walk over the relations that actually also provide interface to like iterate ov. this all of this structure so you can iterate over product over all of this like charakteristic and so etc so yeah thank you very much

10:41

Speaker 4: Hi everyone, my name is Martin and I prepare a fast talk about user journey. Um so I'm the founder and CEO of Optimist Studio. There is a reason why our logo goes outside of the box. Uh so we help companies succeed by solving business and tech problems with customer-centric approach. So essentially we do Django development, but we also heavily focus on user experience. So Um I'll share with you why I want to do that stock. But uh so first of all, customer journey and user journey is very important of course when we build uh we all work for you know uh companies, we build software and we always think about um you know gonna be the user experience. But why this talk here? Because usually backend developers are not UX

11:28

Speaker 4: designers and not every company affords the possibility to have a UX designer in the team And sometimes, let's face it, as back end developers we have to touch frontend, we have to think about the UX and we have to suggest to our bosses, managers, clients and so on how to do that better. And not everybody who like I'm a back-end developer and I don't love touching front end, for example I don't like doing CSS, but uh you know I have to also sometimes do it and so I also have to often think about the UX experience of everything. Um so our approach how we usually work and I want to share this with you because we found this to be very helpful in in the way how we process things, uh is when there is like a request for a task or like a mini project happening, new features.

12:18

Speaker 4: We like to first define what the problem is. So you know we'll write like a pretty extensive uh um ticket on Jira or whatever. Uh and then we do the design, which could be user experience design, could be user interface design, uh could be software architecture design, right? But and only after that we do the development. Because we figured, you know, let's better walk through every possible step and you know edge case while we define it. And then we design it. And after that only we we actually go and execute. Um so I prepared a bunch of questions here and I would love and uh and uh inputs from the audience. So how customers find you, I mean your company usually on the internet? Anyone Anything?

13:04

Speaker 4: Google, right? So SEO. So SEO is pretty important. So um uh uh SEO is like of course one of the first things that we think about. So we actually have a uh you know a free service for to a evaluate like SEO and the UX of companies and like just websites. So this is like the first more evident thing that we think about how customers find us. But I don't know if you saw the the talk of Will yesterday. He talked a lot about distribution and just marketing your company and just bringing it out there to people and that they will be aware of what you're building and then that leads them this leads them through certain paths of their user journey right And so other ways uh that customers can find you is through code outreach. Right? Probably you have like a sales or business development team that maybe takes care of that, uh

13:51

Speaker 4: to set up ads and lead magnets, um social media as well, of course, like you could be very active you know post videos online and so on. Um or let's face it through recommendations. So uh often a company could be referred to by another one or just you hear some about somebody from a friend. So why I'm sharing all that is just to probably think about a site project you're running or a company that you're running and you know uh consider how customers find you and what's the next step when they find you So what are the import the most important aspects to consider on your website? I think, and that's what we think with our team, and that's what we've identified as helpful, but if you have more feedback, please talk to me. I would love to discuss more on this. Um

14:37

Speaker 4: so some of the things uh that we think are very important on a website are copy, UI, UX, and clear call to action. So essentially if uh uh if a website is not functional It's not gonna be great, right? Like uh if you don't have a clear code for action, probably the users would not know, you know, okay, like it's a nice company, nice website presentation. What am I supposed to do next? Um so just again like just thinking about what's what's their experience once they come on your website and then What aspects are important about your customers' experience when they use your systems or service or product? Um so there's like so many factors there, right? Like it could be performance and so on, but uh for example, just an idea is to map What's the current user experience and map it to the what you want to be the ideal user experience?

15:26

Speaker 4: Software performance, of course, like how fast it's loading, the tool, the SAS, or whatever you're uh building for your users. Um is there process automation? For example, you know, like they place an order, do they receive an automated email? Is it something that's uh enhancing their experience, right? A good communication with the customer. And of course the infrastructure, because that impacts performance. Um and lastly, uh how to encourage the customers to recommend you after using your service. So say they've consumed your product or service and you know you can do affiliate programs, email campaigns, and fun. Have an article that you can go in depth and check it out online. Thank you.

16:08

Speaker 5: Thank you. It's a borrowed laptop. So uh I thought I'm going to give a reaction to the today's keynote by uh the excellent keynote by Mary. So this is like a conversation 'cause uh she gave an excellent keynote which I think was very well connected to my thought yesterday and then I asked a question and then she replied and then she asked another question and then I wanted to have a follow-up but uh That was room for questions and not for comments. So this is the follow-up comment. So this is uh I imagine like two birds speaking, what is happening here. Uh and the follow-up is about this. Um I asked a question about who should where are these people ha uh

16:53

Speaker 5: who are uh conscious about the the problems that may be caused by AI and uh her answer was uh well uh people uh engineers in deep mind and in in uh open AI and that sort of places should be the ones who should uh initiate this conversation uh wider in the society. And I made a face which you didn't see and it was like meh Because the problem is in my experience these engineers, smart engineers in in these communities like uh Google and other communities are um smart but um Not all of them think like this. So uh th there are two kinds of developers. People who want to just build something

17:41

Speaker 5: And they don't care about how that will be used. They are just interested in the technical challenges. Like they want to build a bridge. And they don't ask, why are we building the bridge? And unfortunately most of the developers are like like that. And I what I would like to see is more developers who are also asking, why are we building the bridge? What are the consequences, intended and unintended consequences of link? a system, a bridge or anything else engineering like. So um I observed this problem already uh years ago because uh I had this discussion inside Google a lot of times And especially starting in uh 2018 where there were some ethical problems that I deeply care about, which is inside Google.

18:26

Speaker 5: And I I know that this is recorded, so I cannot say too much about that. But uh You should Google the term Project Maven , twenty eighteen. Uh it's a contract between Google and the United States. uh Department of Defense. A lot of us were really not happy about that contract going on. So what we did is we protested. And we reached some some results with trying to stop Google of doing this, but in the end we were not as strong as the company and the pressure from the um shareholders. So uh that will not work. That's the problem.

19:12

Speaker 5: That will not work. So what can we do? Well I'm trying to do something and I created an ethics community that that group of uh animals talking. Inside Google I created, co-founded, an ethics community where engineers are thinking about the ethical, the tech ethical aspects of the things that we are building. And I encourage all of you to do the same, especially if you are working at a big or medium-sized company, to do the same and organize together and put pressure on your employer so that They don't do unethical or questionable things, especially in this new world where AI is having such an impact on everything, not just tech, but everything in society

20:04

Speaker 5: The question is I ask every day and you might ask now, then why am I actually still at Google if I have ethical concerns? uh about the work I'm doing and about the company. Well I looked around that that that White Forest at other big tech companies and the thing is Other big tech companies are not better. In fact they are somewhat worse. For example, Google still has some internal term transparency, but Amazon and Facebook and uh Apple does not and this is getting worse and worse. So um the next question is the last one Why am I in big tech in general? I mean small tech is not affected that much about these problems. So I'm at this crossroad

20:49

Speaker 5: And I'm thinking about this a lot and uh I guess I I don't have a good answer to that one. Um I'm I'm staying at Google because it's still uh nice to be there. I mean they are excellent people, they are interesting technical challenges. Um But there will be a day when I'm gonna take the other pass. So thank you for sharing. Thank you for allowing me to share this

21:19

Speaker 6: Hi everyone, I'm Raffaella. This is the first ever Django Con and this is the first one I I'm BR speaker, so I just want you to be supportive and thank you. Have you ever wondered to contribute to Django? Because I I actually just want to but uh how? Um where did I start it? Where what should I ask? How can I uh did this one thing? Um My um my option

22:04

Speaker 6: it's going to um the jungle no space program uh what is this This is a mentorship program where all participants are going to be split inside the group. So they will be leaded by a mentor. and uh there will be our navigator, our captain and um with a um small uh group uh we'll be able to um to achieve more uh different different kind of work and uh I think it's uh it's it was really a great idea to uh contribute. and join the community. I really want to be

22:50

Speaker 6: a big thank you to my my teammate Mo my n other teammate uh Pradman my uh there was a lot of uh people that uh will help you because uh one of my problem was uh what uh if I asked a silly question. There's uh there's a lot of the thing uh I don't know. I shouldn't really uh did this one thing. And inside the program I understand there there no what uh there were no um silly silly questions. And I encourage all of you if you want to contribute for the first time ever. to uh apply to Jungle Space if you want to mentor

23:36

Speaker 6: or if you're gonna uh to be a participant. We are willing to um find uh new captains new uh new navigator and of course new jungle notes. If you want some more um info you could check this out Thank you.

23:57

Speaker 7: Alright, so let's play a game. I have three very easy questions for you to guess. First one, which city is this one? It's not Brago. No, not Curic. Florence, no. Geneva, no. Stockholm no. There is a hymn here. There's a flag on top. Luzar, no, but close to it? Tug no. Very close to it. No, Geneva German speaking. Yes, Basel.

24:43

Speaker 7: The second question, this one. I think this one is easier, right? Yes, Dublin. And the final one Yes, now Bragg. And now uh I have a question and it's for a prize. The fastest one can win this beautiful cookie cutter so you can make python cookies to your friends. So pay attention. What do those three cities have in common? Okay. I've heard the right answer, but I have no idea who was the first one. Who was the first one? Someone there? Okay, congratulations

25:31

Speaker 7: EuroPython. So these three cities are the cities that hosted the last three editions of EuroPython. And this year it happens that EuroPython is again in Prague for the 23rd time. forward to is more than 120 talks, six parallel tracks, sixteen tutorials, ten posters. We have six keynote speakers and if you're interested in the schedule you can scan this QR code. This is a preview we have created only for DjangoCon, so please do not share it. But if you're interested in the schedule, I will leave it here for a few seconds so you can can go and check out all the amazing sessions we have. And this year

26:17

Speaker 7: we have one celebration at European. We are celebrating 10 years of Django Girls jogo girls were created ten years ago at Europarton in Berlin and as this year Here is the 10th anniversary. We are seeing a Django Girls workshop. So if you like, if you would like to attend, please go to our website and sign up for it. So uh Europe Python as well, it's a week of All Things Python. There will be two days of tutorials and workshops, three days of conference talk, after it there are sprints If you uh want to find out more about EuroPython, you can scan this code or you can go to europython.

27:08

Speaker 7: eu and find more info. Thank you and hope to see you all in Prague.

Questions this talk answers

How can I add authentication and authorization to files served by Django and Nginx?

The speaker describes protected Django file views that check authentication or per-file authorization, then use an X-Accel-Redirect with Nginx internal locations so authorized files are still served by Nginx but cannot be accessed directly.

Discussed at 1:40

How do protected file fields help manage authorized uploads in Django?

Protected file fields connect uploaded files to their access-controlled views, while a registry tracks storage locations, data governance, and URLs. Protection classes such as public, internal, private, and confidential can also drive automatically generated views.

Discussed at 2:25

When and where is PyCon Spain being held?

PyCon Spain will take place in Vigo on October 4–6, with workshops and additional city activities around the main conference. It will include Spanish and English tracks and welcomes attendees, speakers, and sponsors.

Discussed at 4:22

How can I customize cloned Django objects during the cloning process?

The cloning configuration specifies which relations to copy, and a customization class can change fields or other properties as each new instance is created.

Discussed at 9:11

What is a good workflow for backend developers who need to think about user experience?

Define the problem first, design the user experience, interface, or architecture, and only then develop the feature. This makes it easier to work through edge cases before implementation.

Discussed at 12:18

What should I improve on a company website to make the user journey clearer?

The talk highlights strong copy, good UI and UX, and a clear call to action. Visitors should understand what the company offers and what they should do next.

Discussed at 14:37

How can developers encourage ethical decision-making about AI and technology at work?

Developers can organize an internal ethics community, discuss the consequences of what they build, and put collective pressure on their employer to avoid unethical or questionable projects.

Discussed at 19:12

How can I make my first contribution to Django?

The Django Space program provides a mentor-led group where newcomers can learn, ask questions, and contribute together. The speaker encourages people to apply as participants or mentors and emphasizes that beginner questions are welcome.

Discussed at 22:04

What is EuroPython offering this year?

EuroPython is returning to Prague with more than 120 talks, six tracks, tutorials, posters, and keynote speakers, followed by sprints. The event also includes a Django Girls workshop celebrating its tenth anniversary.

Discussed at 25:31

Note: We understand that names change, people change, and bodies change. We respect each individual's journey and privacy. If you have any concerns about a video or need us to remove content, please don't hesitate to contact us. We will handle your request with care and promptly address any issues.

More videos from DjangoCon Europe