Changes between Initial Version and Version 1 of SummerOfCode2013

03/06/2013 04:59:18 PM (8 years ago)
Russell Keith-Magee

Initial draft


  • SummerOfCode2013

    v1 v1  
     2= Google's Summer of Code 2012 =
     4Django is once again a mentoring organisation for the [ 2012 Google Summer of Code]. (Read [ Google's page] for more information on how the program works.)
     6Django's GSoC program is being run by (TBA)
     8== Mentors ==
     10If you're interested in mentoring -- supervising a student in work on Django-related activities -- add your name, email, and the sort of projects you're interested in mentoring here:
     12 * Russell Keith-Magee (
     14== Students ==
     16Student application period opens April 22 and ends on May 3.
     18If you'd like to get started on your proposal early, we'll be looking for a few things. 
     20 * You'll need to have a concrete task in mind (some ideas are below) along with a solid idea of what will constitute "success" (you tell us). 
     21 * If your proposal is a single large feature, you'll need to present a detailed design specification. This proposal should be posted to [ django-developers], where it can be refined until it is accepted by the developer community.
     22 * 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.
     23 * 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 :)
     25Note that none of the ideas below are good enough to be submissions in their own right (so don't copy and paste)!  We'll want to know not just ''what'' you want to do but ''how'' you plan to pull it off.
     27Don't feel limited to the ideas below -- if you've got a cool project you want to work on, we'll probably be able to find you a mentor.  We plan on approving as many projects as we possibly can.
     29'''Note: we're looking for projects that add value to Django itself - ''not'' application/CMS projects that use Django.'''
     31You should also note that as far as proposals go, we don't make a distinction between a GSoC project and any other proposal for a new feature. When you contribute code, you will be expected to adhere to the same contribution guidelines as any other code contributor. This means you will be expected to provide extensive tests and documentation for any feature you add, you will be expected to participate in discussion on [ django-developers] when your topic of interest is raised. If you're not already familiar with [ Django's contribution guidelines], now would be a good time to read them.
     33== Communication ==
     35This year we're doing all GSOC-related communication via the [ django-developers mailing list]. Any proposals for GSOC should be submitted there, as well as discussion on the proposed projects and any updates that students post.
     37Please be careful to keep content to the list clear and purposeful; if you have an idea, update, or criticism, please make sure you describe it in detail; it can be tedious asking people to clarify any vague statements, or having vital information drip-fed.
     39== Ideas ==
     41Here are some suggestions for projects students may want to propose (please feel free add to this list!). This isn't by any means the be-all and end-all of ideas; please feel free to submit proposals for things not on this list. Remember, we'd much prefer that you posted a draft proposal and your rough timeline / success conditions to the [ django-developers list], even if it's already on the list below; it will help you get feedback on choosing the right part of a problem, as well as helping to see if there is any interest before you start drafting a full proposal.
     43When developing your proposal, try to scope ideas/proposals to the 4-month timeline -- simply proposing to fix a ticket or two will probably result in your proposal being rejected in favor of a more ambitious one.  The GSoC '''does not cover activities other than coding''', so certain ideas ("Write a more detailed tutorial" or "Create demonstration screencasts" or "[wiki:AddAPony Add a pony]") are not suitable for inclusion here.
     45On the other side, though, be sure to be concrete in your proposal. We'll want to know what your goals are, and how you plan to accomplish them.
     47In no particular order:
     49=== Best practices updates ===
     50* '''Complexity:''' Moderate
     52Over the years, as Django has evolved, the idea of what constitutes "best practice" has also evolved. However, some parts of Django haven't kept up with those best practices. For example, contrib.comments and contrib.databrowse aren't deployable apps in the same sense as contrib.admin. As a result, these apps can't be (easily) deployed multiple times, and they can't use URL namespacing.
     54In addition, some features of Django's core have grown and evolved, and need refactoring. For example, validation is now performed in several places, but don't operate by hooking into the core 'validate' command. In addition, many aspects of the core validate command should be farmed out to the things that are being validated (e.g., the max/min conditions on a field should be validated by the field, not by a third party validator).
     56In short, Django has been bad at eating it's own dogfood. The contents of contrib should be audited and updated to make sure it meets current best practices.
     58Issues to consider:
     59 * What components need to be updated, and why?
     60 * How to do this update while maintaining backwards compatibility?
     62See also:
     63 * #8579
     65=== Validation functionality revamping ===
     66* '''Complexity:''' Moderate
     68This idea has some overlap with the [#Bestpracticesupdates previous one].
     70Django currently has a validation framework: A static, monolithic  collection of checks implemented in Python code that is automatically executed  before the ''syncdb'' or ''runserver'' commands and whose functionality is available through the [ 'validate'] management command. It is given the chance to inspect the model definitions of installed apps and can flag errors to the developer during the development phase.
     72But there is the possibility to expand it to increase its usefulness. These are some ideas that have been proposed so far:
     74 * Add the concept of warnings, as opposed to the current hard errors. This would mean a refactoring of the code into a more generic framework so we can defer validation to individual fields or to the database backend, as required. Some scenarios where it would be of help to developers by pointing  some non-fatal but potential problems:
     75  * Some database backends have some reserved names for database columns (e.g. Oracle doesn't accept columns named ''date'' or ''number'')
     76  * Some fields names chosen by the developer can clash with names of  [ ORM query lookups].
     78 * Provide a mechanism so applications can hook and get their own validation code run at this point. See for example ticket #8579.
     79 * When a Django version is updated, some problems may be predictable by inspecting settings or models (e.g., looking for settings that have changed format, or have been deprecated)
     81See also:
     82 * #8579
     84=== Test framework cleanup ===
     85* '''Complexity:''' Low
     87Django has an extensive test framework for Python code, a suite of tools to make server-side testing easier, and a project policy that no new code is added without tests. This has been a significant contributor to the stability of Django as a project.
     89For the 1.4 release, we also included the basis of a client-side testing framework into Django (
     91However, this now means that Django has a very large and powerful test suite without much separation or control from a user's perspective, so the goal of this project would be to add new options and suite types to allow running of specific types of tests, be they only a certain class (e.g. unit-tests only) or excluding tests (such as the ones in contrib or third-party apps) from the main test run easily.
     93Issues to consider:
     94 * How would users declare which tests they want to run?
     95 * Which tests should be enabled by default, and how hard should this be to change?
     96 * How will it be app maintainers run their tests?
     97 * Should there be additional hooks to, for example, allow tests to be run against different database backends in sequence?
     99See also:
     100 * #13873 (more of a symptom of this problem)
     101 * More tickets need to be added here
     103=== Security Enhancements ===
     104 * '''Complexity:''' Medium
     106Django has developed many security features over time. The existing set of security features is pretty good, but there's lots of room for improvement. Much of the work in this project will be related to cleaning up existing code to make it more obviously secure, eliminate edge cases, and and improve fallback handling.
     108Some potential areas of work include:
     109 * Enhancing CSRF protection (#16859)
     110 * Centralizing randomized token issuance and validation
     111 * Integrating carljm's django-secure project (
     112 * Building an interactive admin dashboard to display and check installation security parameters
     113 * Targeted Code audit for a specific list of security errors
     115While an interest in security will make these tasks more interesting, most of them don't require you to be a security expert already. Your mentor will make sure your plan is correct before you code, and carefully review your work before it is committed to trunk. Most of these tasks will be significantly easier if you already have some familiarity with Django's codebase. A successful application will have a plan which selects related areas of work, provides details, and has a good estimation of complexity for the proposed tasks. Remember that (especially for security work) a good patch often has more lines of tests than code changes. An ideal applicant will be able to demonstrate the skill with Python and attention to detail necessary to make fundamental changes to Django without breaking existing code.
     117Ideas that will probably not be accepted:
     118 * Adding database or cookie encryption support (unless you can provide a secondary mentor who is a crypto expert)
     119 * Proposals that strongly couple sessions with CSRF or Auth
     120 * Proposals to include external libraries in Django
     122If you are interested in working on this project, please talk to us sooner rather than later! PaulM is usually available on IRC, and wants to help you write a really good application.
     124=== Improved error reporting ===
     125 * '''Complexity:''' Medium
     127The error messages raised by Django can sometimes be confusing or misleading. This is sometimes due to Django wrapping and re-raising errors when it shouldn't. Sometimes it's due to Django not displaying error information effectively. Sometimes it's simply a matter of not catching the right errors.
     129This should be fixed. Error messages are just as important to the development process as good documentation. This project would address the error reporting issues in Django to ensure that the errors reported by a Django project are as good as they can be.
     131Issues to consider:
     132 * Import errors discovered during application loading during can be masked under certain circumstances.
     133 * Errors in template tags and filters rarely produce helpful error messages.
     134 * Errors in ModelForm and ModelAdmin can raise errors that don't indicate the real problem
     136See also:
     137 * [wiki:BetterErrorMessages The Better Error Messages] proposal page
     138 * Ticket #3349
     140=== Improve annotation and aggregation ===
     141 * '''Complexity:''' Medium
     143The 2009 Summer of Code added the annotate() and aggregate() calls to Django's query arsenal. While these tools work well for simple arithmetic aggregates, they don't work well for date and string based queries. There are also use cases where you may want to annotate data onto a model that *isn't* an aggregate (for example, annotating the sum of two other aggregates).
     145This project would continue where the 2009 GSoC aggregation project left off. This would be an excellent project for anyone wishing to gain an intimate understanding of Django's Query infrastructure.
     147Issues to consider:
     148 * String concatenation and manipulation (e.g., annotate a model with the uppercase version of the first 5 characters of someone's name)
     149 * Grouping of results by date (e.g., show me a count of articles, grouped by day)
     150 * Allowing non-null defaults in aggregation (e.g., when a model has no related objects, use 0 not NULL)
     151 * Aggregates involving generic relations
     153See also:
     154 * [ Trac's list of ORM aggregation tickets]
     155 * The [source:django/trunk/django/db/ Django's QuerySet implementation]
     157=== Finishing off Form Templates ===
     158* '''Complexity:''' Hard
     160Two years ago, a GSOC project worked on replacing the internal Django code that renders forms with a templated system, allowing for much better flexibility and customisability of forms, fields, and related components in the forms framework. The current code can be found here:
     162The main issue with the branch last year was that the template renderer was not fast enough on large numbers of includes and extends, meaning that the new form templates, while modular, were slower than the current forms system. The major task with this project would be to address the speed issue. Note that this was attempted last year, and didn't work out so well - if you want to take on this project, we'll want to see a clear plan of how you attempt to address the issue and some proof that you're capable of pulling it off.
Back to Top