| 1 | [[PageOutline]] |
| 2 | = Google's Summer of Code 2024 = |
| 3 | |
| 4 | Django is a mentor organization for the 2024 Google Summer of Code. Read |
| 5 | [https://summerofcode.withgoogle.com Google's page] for more information on |
| 6 | how the program works. |
| 7 | |
| 8 | Django's GSoC program is being coordinated by the current Django Fellows, |
| 9 | Natalia Bidart and Mariusz Felisiak. |
| 10 | |
| 11 | == Mentors == |
| 12 | |
| 13 | If you're interested in mentoring -- supervising a student in work on Django-related activities -- let us know via the Mentoring topic on https://forum.djangoproject.com/. |
| 14 | |
| 15 | == Students == |
| 16 | |
| 17 | Student application period runs until April 2, 2024. |
| 18 | |
| 19 | If you'd like to get started on your proposal early, we'll be looking for a few things. |
| 20 | |
| 21 | * You'll need to have a concrete task in mind (some ideas are below) along with |
| 22 | a solid idea of what will constitute "success" (you tell us). |
| 23 | * If your proposal is a single large feature, library or site, you'll need to present |
| 24 | a detailed design specification. This proposal should be posted to |
| 25 | [https://forum.djangoproject.com/c/internals/mentorship/10 the Django Forum], |
| 26 | where it can be refined until it is accepted by the developer community. |
| 27 | * We'll want to know a bit about you -- links to previous work are great, if any. If you're proposing something ambitious, you'll need to convince us that you're up to the task. |
| 28 | * You'll also need to provide us with a schedule, including a detailed work breakdown and major milestones so your mentor can know if and when to nag you :) |
| 29 | |
| 30 | Here's an example of an accepted proposal from a previous year: |
| 31 | |
| 32 | * https://gist.github.com/chrismedrela/82cbda8d2a78a280a129 |
| 33 | |
| 34 | Note that none of the ideas below are good enough to be submissions in their |
| 35 | own right (so don't copy and paste)! We'll want to know not just what you want |
| 36 | to do but how you plan to pull it off. |
| 37 | |
| 38 | Don't feel limited to the ideas below -- if you've got a cool project you want |
| 39 | to work on, we'll probably be able to find you a mentor. We plan on approving |
| 40 | as many projects as we possibly can. |
| 41 | |
| 42 | We're accepting any GSOC proposal that fits one of the following three categories: |
| 43 | |
| 44 | * Work on Django itself - such as the ORM, forms, etc. This is what we've traditionally accepted GSoC entries in. |
| 45 | * Work on tools to support Django - the issue tracker dashboard (https://dashboard.djangoproject.com/) is a good example of an existing tool that would have fit into this category. |
| 46 | * Work on libraries that supplement or add new features to Django to ease development - `django-stubs` and Django Debug Toolbar are good examples of existing projects that would have fit here. |
| 47 | |
| 48 | Unless explicitly mentioned below, we're **not** looking for people to work on |
| 49 | existing third-party libraries - we aren't able to guarantee commit access to |
| 50 | them. We may allow an exception if a maintainer of the library in question |
| 51 | agrees to help mentor beforehand. |
| 52 | |
| 53 | The broadening in scope is to allow people to work on new ideas to help Django |
| 54 | development and developers without tying you down to having to implement it in |
| 55 | the core codebase (and thus ruling out some projects that might otherwise be |
| 56 | useful). |
| 57 | |
| 58 | We're still going to be strict with what we accept - you'll need to provide a |
| 59 | strong use case for your idea and show that it would be useful to a majority of |
| 60 | developers or significantly improve the development of Django itself. |
| 61 | |
| 62 | We're not looking for small groups of incremental updates - like "improve |
| 63 | Django's Trac" - nor are we looking for impossible tasks, like "replace Trac |
| 64 | with this brand new issue tracker I'm writing". What you propose should be a |
| 65 | single project, achievable within the time period of GSoC, and something the |
| 66 | core developers can help mentor you on. |
| 67 | |
| 68 | We're also not looking for sites or projects that are merely written in Django — this GSoC is not for you to propose your new forum hosting site or amazing Django-based blogging engine. |
| 69 | |
| 70 | Note that when you contribute code, you will be expected to adhere to the same |
| 71 | contribution guidelines as any other code contributor. This means you will be |
| 72 | expected to provide extensive tests and documentation for any feature you add, |
| 73 | you will be expected to participate in discussion on |
| 74 | [http://groups.google.com/group/django-developers django-developers] and the |
| 75 | [https://forum.djangoproject.com Django Forum] when your topic of interest is |
| 76 | raised. If you're not already familiar with [http://docs.djangoproject.com/en/dev/internals/contributing/ Django's contribution guidelines], now would be a good time to read them - even if |
| 77 | you're not applying to work on Django core directly, we'll still want the same |
| 78 | level of contribution. |
| 79 | |
| 80 | == How can I improve my chances of being accepted? == |
| 81 | |
| 82 | The best thing you can do to improve your chances to be accepted as a Django |
| 83 | GSoC student is to start contributing now. Read up on [https://docs.djangoproject.com/en/dev/internals/contributing/ Django’s contribution documentation] and make yourself known to the other contributors by your |
| 84 | contributions (ideally, related to the area of your proposal). That way, when |
| 85 | it comes time to evaluate student applications, you’ll be a **known individual** |
| 86 | and more likely to be able to get the attention you need to develop a proposal. |
| 87 | |
| 88 | We're looking for candidates who can demonstrate that they can engage in work |
| 89 | of a project scope on an independent basis. We're there to help but we can't |
| 90 | watch you every step of the way, so we need to see that motivation from you. |
| 91 | Being active before the submissions process is the best way to demonstrate |
| 92 | this. |
| 93 | |
| 94 | == Communication == |
| 95 | |
| 96 | All GSOC-related communication is handled via the [https://forum.djangoproject.com/c/internals/mentorship/10 Django Forum, in the Mentoring channel]. Any proposals for GSOC should be submitted there, as |
| 97 | well as discussion on the proposed projects and any updates that students post. |
| 98 | |
| 99 | Please be careful to keep content to the forum clear and purposeful; if you |
| 100 | have an idea, update, or criticism, please make sure you describe it in detail; |
| 101 | it can be tedious asking people to clarify any vague statements. |
| 102 | |
| 103 | == Ideas == |
| 104 | |
| 105 | Here are some suggestions for projects students may want to propose (please |
| 106 | feel free add to this list!). This isn't by any means the be-all and end-all of |
| 107 | ideas; please feel free to submit proposals for things not on this list. |
| 108 | Remember, we'd much prefer that you posted a draft proposal and your rough |
| 109 | timeline / success conditions to the the [https://forum.djangoproject.com/c/internals/mentorship/10 Django Forum, in the Mentoring channel] or [http://groups.google.com/group/django-developers django-developers list], |
| 110 | even if it's already on the list below; it will help you get feedback on |
| 111 | choosing the right part of a problem, as well as helping to see if there is any |
| 112 | interest before you start drafting a full proposal. |
| 113 | |
| 114 | When developing your proposal, try to scope ideas/proposals to size of your project (175hrs or 350hrs) -- you need to be ambitious, but not too ambitious. The GSoC does not |
| 115 | cover activities other than coding, so certain ideas ("Write a more detailed |
| 116 | tutorial" or "Create demonstration screencasts") are not suitable for inclusion |
| 117 | here. |
| 118 | |
| 119 | On the other side, though, be sure to be concrete in your proposal. We'll want |
| 120 | to know what your goals are, and how you plan to accomplish them. |
| 121 | |
| 122 | The project ideas below list key skill, but all assume a knowledge of Python, and familiarity with Django itself. |
| 123 | |
| 124 | In no particular order: |
| 125 | |
| 126 | == Auto-importing shell == |
| 127 | |
| 128 | || Difficulty || Medium |
| 129 | || Size || 175hrs |
| 130 | || Potential Mentors || TBC |
| 131 | || Key Skills || Management commands |
| 132 | |
| 133 | One of the most popular features of django-extensions is `shell_plus`, which is like `shell` but auto-imports your models for you. Adding this behaviour to core would be a great addition. |
| 134 | |
| 135 | A proposal should consider ways to define extra things to import, perhaps a documented path of subclassing the management command and overriding a method. |
| 136 | |
| 137 | Expected outcome would be a PR adding this to Django. |
| 138 | |
| 139 | |
| 140 | == Security: Bring CORS and CSP into core == |
| 141 | |
| 142 | || Difficulty || Medium |
| 143 | || Size || 350hrs |
| 144 | || Potential Mentors || TBC |
| 145 | || Key Skills || HTTP request-response cycle, middleware, decorators |
| 146 | |
| 147 | There are third-party apps providing support for [https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS Cross-Origin Resource Sharing (CORS)] `django-cors-headers` and [https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP Content Security Policy (CSP)] `django-csp`, but it would be good to have support built-in to core. |
| 148 | |
| 149 | Following the design of the CSRF/clickjacking protection, having safe defaults, and allowing straightforward per-path customisation, via e.g. decorators, would improve the security of all Django projects. |
| 150 | |
| 151 | Outcome would be a pair of PRs adding these into Django. |
| 152 | |
| 153 | == Migrations == |
| 154 | |
| 155 | Here are a couple project ideas for improving Django's migrations framework. |
| 156 | |
| 157 | === Auto-detection of custom migration operations === |
| 158 | |
| 159 | || Difficulty || Hard. |
| 160 | || Size || 350hrs |
| 161 | || Potential Mentors || Mariusz Felisiak |
| 162 | || Key Skills || Migrations Framework |
| 163 | |
| 164 | Allow auto-detection of custom migration operations. |
| 165 | |
| 166 | The auto-detector has its change-detection mostly hard-coded: [https://github.com/django/django/blob/main/django/db/migrations/autodetector.py#L104 autodetector.py#L104] |
| 167 | |
| 168 | It doesn't seem easy (or even possible with the current approach) to |
| 169 | allow third-party code to intervene. The list of handlers to generated the individual operations would need to be data-driven, so that custom steps could be added. |
| 170 | |
| 171 | Expected outcome here would be a PR allowing auto-detection of custom migration operations. |
| 172 | |
| 173 | == Improve the Database Cache Backend == |
| 174 | |
| 175 | || Difficulty || Medium. |
| 176 | || Size || 350hrs |
| 177 | || Potential Mentors|| TBC |
| 178 | || Key Skills || Cache Framework |
| 179 | |
| 180 | Setting up a shared cache backend is nearly always required, as many |
| 181 | third-party packages assume the cache works like this (unlike the default |
| 182 | locmemcache which is per process). DatabaseCache is the easiest such cache |
| 183 | backend, not requiring any extra infra and working on shared hosts without a |
| 184 | filesystem. But it could be better. |
| 185 | |
| 186 | Django-Mysql has had a much better DB cache backend implementation since 2015: https://adamj.eu/tech/2015/05/17/building-a-better-databasecache-for-django-on-mysql/ . This has never been adapted for the other supported databases but it should be fairly straightforward, mostly some translation of SQL to different dialects. |
| 187 | |
| 188 | Expected outcome would be a PR improvement database cache backend. |
| 189 | |
| 190 | As a stretch goal, it would also be nice to hook the database cache tables into |
| 191 | migrations somehow rather than the current hacky duck typing approach: |
| 192 | https://github.com/django/django/blob/64b3c413da011f55469165256261f406a277e822/django/core/cache/backends/db.py#L12-L28 ). |
| 193 | |
| 194 | |
| 195 | == Typed Django == |
| 196 | |
| 197 | There are several potential projects related to typing and the django-stubs project. |
| 198 | |
| 199 | For all three projects: |
| 200 | |
| 201 | || Difficulty || Hard. |
| 202 | || Size || 175hrs |
| 203 | || Potential Mentors || TBC |
| 204 | || Key Skills || Python typing and Django-stubs |
| 205 | |
| 206 | === Strict-mode support for django-stubs === |
| 207 | |
| 208 | The django-stubs implementation does not currently pass Mypy’s strict mode. |
| 209 | |
| 210 | Making this compliant would enable users to always use strict mode with them, improving type safety. Expected outcome would be a PR doing that. |
| 211 | |
| 212 | === Merging django-types back into django-stubs === |
| 213 | |
| 214 | There is a spin-off project from django-stubs called django-types. The original intention here was for it to be merged back into django-stubs, but that's never happened. |
| 215 | |
| 216 | django-types removes the need to use any mypy plugins, making it possible to use type checkers other than mypy, such as Pyrite, Pyre, etc. |
| 217 | |
| 218 | django-types is not actively maintained, however, and having competing stubs implementations means neither is as strong as could be. |
| 219 | |
| 220 | There is a small project in extracting the work from django-types and creating a PR for django-stubs allowing it to be merged back in, and effort to be concentrated on the single implementation. |
| 221 | |
| 222 | == Configurable Content Type Parsing == |
| 223 | |
| 224 | || Difficulty || Medium. |
| 225 | || Size || 350hrs |
| 226 | || Potential Mentors || TBC |
| 227 | || Key Skills || HTTP request-response cycle |
| 228 | |
| 229 | For Django 5.0 we're looking to modernize the `HTTPRequest` object, adding a content-type aware `request.data` property. This will parse `request.body` according to the content type. |
| 230 | |
| 231 | The initial phase — targeted for before GSoC — will add `request.data` and add support for JSON body handling, but the next phase is to make that fully pluggable with custom parsers. |
| 232 | |
| 233 | - Add a list of parsers to the request object, that can be customised — in a middleware for example — at any point prior to accessing `request.data`. |
| 234 | - Parsers should implement a `can_handle(content_type) -> Bool` method. The first parser returning True will be selected to parse the `request.body`. |
| 235 | |
| 236 | Expected outcome is a PR allowing configurable content type parsing. |
| 237 | |
| 238 | == Add Async Support to Django Debug Toolbar == |
| 239 | |
| 240 | || Difficulty || Medium. |
| 241 | || Size || 350hr |
| 242 | || Possible mentors || Tim Schilling |
| 243 | || Key Skills || asyncio, ASGI & Channels, and django-debug-toolbar |
| 244 | |
| 245 | Django Debug Toolbar (DDT) is one of the key packages in the Django ecosystem. |
| 246 | |
| 247 | https://github.com/jazzband/django-debug-toolbar |
| 248 | |
| 249 | DDT is not yet compatibile with Django Channels and async Django run unders ASGI. |
| 250 | Adding support for async to DDT would be a great contribution. |
| 251 | |
| 252 | Preliminary implementation ideas for this are available here: https://github.com/jazzband/django-debug-toolbar/pull/1432 |
| 253 | |
| 254 | Would require some knowledge of asyncio, Django Channels, ASGI, and how the Django Debug Toolbar works. |
| 255 | |
| 256 | Expected outcome would be a PR (or multiple PRs) moving the toolbar towards full compatibility with Django channels and async logic. |
| 257 | |
| 258 | == Or Create Your Own == |
| 259 | |
| 260 | We have around 900 accepted tickets on Django. Browse the issue tracker by |
| 261 | component — here's an |
| 262 | [https://code.djangoproject.com/query?status=assigned&status=new&component=contrib.staticfiles&col=id&col=summary&col=status&col=owner&col=type&col=component&col=version&desc=1&order=id example filter for contrib.staticfiles]. What's the bit of the framework that interests you? |
| 263 | What contribution do you want to make to it? |
| 264 | |
| 265 | Use the tickets as guides here. Remember the advice above, that your project |
| 266 | needs to be both on Django itself here, and achievable in the timescale of |
| 267 | GSoC. |
| 268 | |
| 269 | Could be scoped as a 175hr or a 350hr project, depending on your idea. |
| 270 | |
| 271 | Possible mentors: ''Natalia Bidart'', ''Mariusz Felisiak''. |
| 272 | |
| 273 | We're open to all good ideas! |