forked from djblets/djblets
/
NEWS
632 lines (463 loc) · 23.5 KB
/
NEWS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
version 0.6.7 final (9-January-2011):
* djblets.datagrid:
* The datagrids now use a RequestContext when rendering cells, allowing
the columns or templates to access data from context processors.
* djblets.siteconfig:
* The form body of a siteconfig settings page can now be replaced.
It's now stored in the "form_content" block.
* SiteConfigurationManager no longer crashes if trying to clear
the cache for a SiteConfiguration that no longer exists.
* djblets.testing:
* The Selenium test suite has been updated to support Django 1.2's
multi-database support. Previously, fixtures would fail to load
if using the new settings.DATABASES variable.
* djblets.util:
* The @augment_method_from decorator wasn't properly calling up the
decorator chain, preventing some decorators from being invoked. This
has been fixed to ensure all decorators are called.
* djblets.webapi:
* Due to the @augment_method_from breakage listed above, webapi
decorators could fail to add their own checks, causing various
problems in field checking and authentication. This is now fixed.
* The Permission Denied (HTTP 403) errors being returned weren't
sufficient for clients that weren't authenticated. Now, an
unauthenticated client will instead see Not Logged In (HTTP 401)
errors.
* The HTTP_AUTHORIZATION header is now checked on all requests. When
provided by the client, it will be used for authentication. This
means that clients can now force a login from their very first
request on, instead of requiring a HTTP 401 Unauthorized being
sent out first.
This will also prevent multiple logins across different requests
from the same client, when the HTTP_AUTHORIZATION header is passed
on each request. This makes requests less heavy-weight and prevents
the last_login timestamp on the User from being updated on each
request.
As part of this change, any webapps manually using the
@webapi_login_required decorator without the new resource code
will no longer support HTTP Basic auth. However, this was never
a supported feature anyway, and was more there by accident.
* The 'api_format' parameter in requests is now treated specially
and doesn't trigger any invalid attribute errors during field
validation.
* WebAPIResource.delete now uses get_object instead of fetching
the object directly, which simplifies the function and guarantees
that the correct object is used (especially when a resource
overrides get_object).
* Redirects now preserve any special parameters ("callback",
"_method", "expand", and "api_format") passed to the request.
This works around problems in HTTP implementations that don't
allow the caller to know that redirects occurred (such as major
browsers), which would lead to this information being stripped and
the wrong results being returned.
* The "expand" parameter for expanding links in payloads is now
supported for POST and PUT requests.
version 0.6.6 final (22-November-2010):
* djblets.util:
* Fixed a compatibility problem with JSONField and Django 1.1. It
was assuming support for Django 1.2's multi-database support.
* Fixed multi-database support in Django 1.2 with JSONField, where
the default connection was always being used in one case.
version 0.6.5 final (20-November-2010):
* djblets.datagrid:
* MEDIA_SERIAL is now used for all the images in the datagrid
template. Patch by Ben Hollis.
* djblets.util:
* Added a @root_url decorator for use with get_absolute_url
implementations, which appends SITE-ROOT to any returned URLs.
* Added a CounterField for atomically updating counters.
CounterField can be used to atomically increment or decrement
an integer stored in the database, on individual models or
on many models at a time. It's intended to substitute for
potentially expensive or numerous SQL queries that retrieve
counts of objects.
* Updated the custom fields for Django 1.2 multi-database
compatibility.
* djblets.webapi:
* Fixed a bug in serializing 'long' values in XML.
* Resources now Vary on HTTP Accept, meaning that the browser won't
cache the wrong response type when accessing the same resource
with two different requested mimetypes.
* Reduced the SQL query count for resources.
* Fixed problems that could occur with URLs when serializing objects in
a list and when returning links.
version 0.6.4 final (14-September-2010):
* djblets.testing:
* An undefined variable error when using the Selenium test support
has been fixed.
* djblets.util:
* Added an augment_method_from decorator for augmenting existing
functions.
This allows a subclass to augment a parent class's function's
documentation and decorators. The existing decorators are
automatically inherited. Where this becomes useful is where you have
several classes that share common logic, but may need further
restrictions or new documentation.
The defined function is meant to have an empty body (or 'pass'),
but it can contain code wich will be executed after the parent
function. No returned values will be used, however.
* djblets.webapi:
* When serializing a dictionary in a webapi response into XML, we
now properly serialize keys that are integers. They are serialized
as <int value="...">.
* Fixed a circular dependency that occured between resources.py,
encoders.py, and core.py (depending on which was first imported).
* The User resource now accepts a '.' in the username.
* List-only resources now always have their get_list function called,
regardless of whether it had list_child_resources defined.
* Singleton resources (resources that exist as a single child item
with no object list) must now have the 'singleton' parameter set
to 'True'.
* HTTP Accept mimetypes and ?api_format= are now supported properly
for resources.
* Specifying api_format in POST requests now works.
* Resource classes instances can now be queried by class, using
the get_resource_from_class function.
* Resource classes can now be introspected:
* Functions can list which error classes the client can expect
to receive using the @webapi_response_errors decorator. It can
be queried using function.response_errors.
* The list of fields that can or must be specified for
HTTP GET/PUT/POST can now be queried. It can be queried using
function.required_fields and function.optional_fields.
* Usage of @webapi_login_required can now be checked by accessing
function.login_required.
* The list of fields on a resource should now be a dictionary,
which can include a description of the field.
* The custom links on a resource can now be explicitly listed
by overriding the get_related_links function.
version 0.6.3 final (4-July-2010):
* djblets.testing:
* Fixed Selenium unit testing to properly skip the tests when
the Selenium server was down.
* djblets.util:
* Added utility functions for HTTP Accept-based content negotation.
This adds new get_http_requested_mimetype and get_http_accept_lists
functions for doing content negotiation using the HTTP Accept request
header. This header allows clients to tell the server which mimetypes
it accepts or explicitly forbids, based on priorities, so that the
server can send the right data. This can allow a single URL to return
various forms of data based on the client (HTML, PDF, JSON, etc.).
The get_http_accept_lists() function parses the HTTP Accept request
header and returns sorted lists of acceptable mimetypes and
unacceptable mimetypes. These are sorted based on the priorities in
the header.
The get_http_requested_mimetype() function takes a HttpRequest and a
list of supported mimetypes for that URL and then, based on the
results of get_http_accept_lists() and the supported mimetypes,
determines what mimetype the server should be using. If nothing is
supported, it will return None, and the server is expected to return
a HttpResponseNotAcceptable.
* JavaScript:
* This adds some stuff to gravy to make sites work better on the
iPhone/iPad versions of Safari. A new $.proxyTouchEvents function
has been added, which causes touch screen events to be forwarded to
existing mouse event handlers. It's intended for basic use cases
where multi-touch events really don't need to be handled.
* $.browser has been updated with a 'mobileSafari' check, making it
easier to determine whether we're running on the iPhone/iPad.
* A workaround for jQuery bug #6446 has been implemented, which
basically fixes an issue with the result from $.offset() being
incorrect.
* Tooltips are disabled on iPhone/Pad, as they're really not at all
useful and their hover events manage to get in the way of other
events.
version 0.6.2 final (13-May-2010):
* djblets.log:
* Fix a compatibility error with Python 2.4 and 2.5.
version 0.6.1 final (12-May-2010):
* djblets.webapi:
* Fixed a regression with the webapi auth handlers. They weren't
accepting the right arguments.
version 0.6.0 final (11-May-2010):
* djblets.datagrid:
* Fixed rendering issues with columns in the datagrids.
Adding columns to a datagrid would cause odd rendering issues. This
was due to not including the 'last' flag (indicating the last
column, in order to position the Edit Columns column properly) in
the cache key. We now add the key, which allows the datagrid to
render properly when adding or removing columns.
* Fixed over-caching of columns.
There were a couple bugs where Djblets cached the rendered columns
too aggressively, causing links on cells to point to the wrong
addresses and columns to render incorrectly based on previous loads.
(Bug #1582)
* djblets.log:
* Switched the logging setup code to use a WatchedFileHandler,
which automatically reopens the log files for writing when they're
deleting (such as after log rotation).
* djblets.testing:
* Added the new djblets.testing module, which houses our old unit
testing helpers from djblets.util.testing.
* Added new Selenium test suite support for automated browser
testing.
* djblets.webapi:
* Added a new resource-based model for doing more RESTful APIs.
This introduces a new class for easily creating RESTful URL resources
that can handle standard HTTP methods and return meaningful data in a
nicely constructed hierarchy.
By using WebAPIResource, a site can offer a very clean set of URLs to
work with any object.
There's a lot to this object, but it's all covered in the extensive
documentation in webapi/resources.py.
version 0.5.9 final (28-March-2010):
* djblets.util:
* cache_memoize now converts all keys to plain strings, instead of
allowing unicode to be passed to the backend. Not all cache
backends allow for unicode keys.
* djblets.siteconfig:
* The same change for cache keys was made here as well.
* djblets:
* Added ez_setup.py to the source distribution.
* Added djblets.__version__ and djblets.__version_info__.
__version__ is a variable containing the results of
djblets.get_package_version(), and __version_info__ contains
the version parts in a tuple.
version 0.5.8 final (27-March-2010):
* djblets.datagrid:
* Made many more speed improvements in the datagrids.
This builds upon the previous set of improvements.
We now parse and cache the cell and header templates before any
rendering is done, instead of doing it once per cell.
We also cache cells by their displayed content, so that two cells
that would show the same rendered data will only render once.
This is especially useful for cells showing such things as
usernames.
This can easily take seconds off the load of a heavy datagrid.
* Objects in the datagrid with custom primary keys that aren't named
'id' now work.
* The Edit Columns icon is now a pencil instead of just "...', making
it easier to see it and figure out its purpose. (Bug #910)
* djblets.feedview:
* The feedparser library is now only imported when needed. This
reduces startup time for requests by as much as a quarter of a
second, as feedparser is a very large library and takes time to
import.
This should improve performance for any site that at all lists
djblets.feedview in INSTALLED_APPS, even for pages not making use
of feedview.
* djblets.siteconfig:
* The stale settings issue appears to be fixed in this release. It
needs more testing in large deployments, but we've identified a
couple cases that would cause this problem and have fixed them.
* The mail authentication information is now saved as plain strings
instead of unicode strings in order to fix a compatibility issue
with Python 2.6's HMAC library.
* The SiteConfiguration's settings field is now read-only in the
Django administration UI in Django 1.2.
* djblets.webapi:
* WebAPIErrors can now take HTTP status codes that will be sent to
the browser. These default to 400, though the built-in errors may
define different codes.
This change does break backwards-compatibility if a client calling
the API makes the assumption that every result with a payload will
be an HTTP 200 OK. Clients shouldn't make these assumptions, but
it's possible that they do.
* Added support for Basic HTTP Authentication.
Clients making a call when not logged in to a restricted URL will
now get an HTTP 401 Unauthorized, along with a WWW-Authentication
header specifying that Basic Auth is to be used.
Clients can use standard Basic Auth to pass credentials to any
URL requiring such authorization in order to log in. This removes
the need for special login URLs.
This makes APIs more accessible to applications like wget or
curl.
* Added an easy way to do pagination with the web API.
API calls returning lists of data can now paginate the results,
returning only a certain amount of data. The results and the
total number of items across all pages will be returned.
URLs are provided in the resulting JSON payload that point to the
previous or next queries. Callers can pass a 'start' parameter to
the URL to specify the first item's index (0-based), and
'max-results' to specify the maximum number of items it wants in
that request (which may be capped server-side).
version 0.5.7 final (14-February-2010):
* djblets.datagrid:
* Columns in datagrids can now augment the queryset before actually
querying the database. This allows them to prefetch information
instead of having to do a query per-row.
This also now by default globally caches the resulting data in
Column.render_data if displaying a foreign key. This means that if
several rows are all referencing the same User object, for instance,
there will be only one query for that object instead of one per row.
* djblets.log:
* Add a title to the Server Log page.
* djblets.util:
* Fixed image cropping with the new Django storage support.
Python Image Library was confused about the format to save the
resulting image in when cropping. We now pass in the appropriate
format in order to allow it to save. We also log any failures that
may come up. (Bug #1396)
* JavaScript:
* Allow the classes in modalBox to be customized on a per-instance
basis, allowing for more custom types of modalBoxes (such as a
specially stylized help box). Patch by Hussain Bohra.
* Added a new $.fn.scrollIntoView function. This will ensure that the
target element is visible on-screen.
version 0.5.6 final (15-November-2009):
* djblets.auth:
* RegistrationForm now takes in a request.
* Extra context can be passed to the template for the registration
form.
version 0.5.5 final (22-October-2009):
* JavaScript:
* Fix a bug on Internet Explorer when setting the white-space
property on an auto-size text area. (Bug #1349)
version 0.5.4 final (4-October-2009):
* djblets.datagrid:
* Compatibility updates for the Django 1.2 development branch.
* JavaScript:
* On Google Chrome, the text areas would grow by a line with every key
pressed. Patch by Cory McWilliams. (Bug #1145)
* On Safari 4, the text areas wouldn't auto-resize based on text.
* On Firefox, the text areas would shrink too much when deleting text.
version 0.5.3 final (17-September-2009):
* djblets.siteconfig:
* Updated to work with Django 1.1's admin UI stylesheets.
version 0.5.2 final (15-September-2009):
* General:
* Added copyright and MIT license headers to all files.
* JavaScript:
* inlineEditors now prevent the event from bubbling up when
clicking their target element. This means that a target element
inside of an <a href="..."> will no longer cause the page to
change when clicking the element. (Bug #1221)
* djblets.auth:
* Deleted the password recovery code. It was intended for use in
an old version of Django and has since been supplanted by
Django. We don't believe anyone is using it or should be
encouraged to use it.
* djblets.log:
* Added a Server Log view for administration UIs. This is used
to display the server log (using the Python logging defaults from
djblets.log). The log is filterable and sortable.
* Exceptions are now logged when using LoggingMiddleware. When an
exception occurs, the stack, username and URL are logged.
* djblets.util.misc:
* cache_memoize will now always ensure that cache keys will never
exceed the maximum key length. If the key is larger, an md5sum
of the key is used instead. Patch by Thilo-Alexander Ginkel.
version 0.5.1 final (2-August-2009):
* JavaScript:
* Added a clear() function to $.funcQueue(), which clears the
queue and prevents any further processing until it's next started.
* djblets.util.filesystem:
* Added the new djblets.util.filesystem for filesystem-related
functionality.
* This currently contains is_exe_in_path, which checks if an
executale exists in the system path. This will do intelligent
file extension determination. It expects an application name without
a file extension (such as "cvs") and will append the ".exe" on
Windows. This is an improvement over the method we used in Review
Board before where we blindly searched for "cvs" (which could in
theory exist yet not be an executable) on Windows, or "cvs.exe"
(which could in theory exist yet not be an executable) on Linux.
version 0.5 final (20-June-2009):
* Final release of Djblets 0.5.
This release was made to go alongside Review Board 1.0. While Djblets
works its way to its own 1.0, we will attempt to not break any existing
API. However, it is important to note that Djblets is not API frozen
at all yet.
We advise developers to continue to work against Djblets SVN/nightlies,
but to base production applications on 0.5.
version 0.5 rc2 (13-June-2009):
* General:
* Properly list the license as MIT, not GPL, in setup.py.
(Bug #1120)
* JavaScript:
* Prevent funcQueue.start() from being called when the queue is
already started.
* djblets.datagrid:
* Added speedups when sorting columns. We used to generate an SQL
query that pulled in all information in the order specified by
the columns, but this could be slow for large data sets. We now
do the minimal query, retrieving only the object IDs, and then
fetch data on those specific IDs in a second query. The end result
is a significant speedup in rendering datagrids when used with
large amounts of data.
* djblets.log:
* Fix logging when we're unable to write to the log file. We now
fall back on stderr. Patch by Paolo Borelli.
* djblets.util.fields:
* Fixed a typo in a variable name that caused problems in JSONField
when getting data in an unexpected format.
version 0.5 rc1 (3-May-2009):
* JavaScript:
* Clicking the edit icons for inlineEditors no longer causes the
page to scroll in some browsers. (Bug #1057)
* djblets.datagrids:
* Sped up the datagrids in some cases by always including related
objects (up to one depth level) in the query for the datagrid.
* djblets.siteconfig:
* Prepended the site's domain to the siteconfig cache key, making it
possible to use multiple siteconfig-based apps on the same server.
(Bug #986)
* Saving a SiteConfig didn't always cause other instances of that
SiteConfig on the server to reload, meaning that people would
sometimes have to restart the server to get settings to apply.
This is now fixed.
(Bug #734)
* Removed a redundant key for the timezone.
* djblets.util.templatetags.djblets_utils:
* The ageid filter now returns an empty string if passed 'None' as
the timestamp.
version 0.5 beta 1 (28-March-2009):
* JavaScript:
* Moved to using jQuery 1.3.2.
* Small performance improvements in tooltip and modalBox.
* The edit icons in an inlineEditor are now accessible, so they can
be activated by pressing the Enter key in Firefox. Patch by
Brad Taylor. (Bug #965)
* djblets.util.fields:
* JSONField and Base64Field now properly serialize to a JSON file,
so long as the patch at http://code.djangoproject.com/ticket/9522
is applied.
* Objects saved in the admin UI that have a Base64Field no longer
causes garbage in the field. The fields are now saved properly.
(Bug #918)
* djblets.gravatars:
* Added an "alt" attribute for the generated gravatar image, in order
to fix XHTML compliance.
* djblets.datagrids:
* Fixed some XHTML validation errors. Patch by Onkar Shinde.
(Bug #932)
version 0.5 alpha 3 (15-February-2009):
* JavaScript Bugs Fixed:
* Fixed some major performance issues in autoSizeTextArea.
* Fixed a bug with Safari and inlineEditor where Safari would
sometimes crash due to autoSizeTextArea. We now just disable
the autoSizeTextArea functionality.
* inlineEditor no longer allows startEdit to be called when editing
is already enabled.
* New Features:
* Added new set_etag, etag_if_none_match, etag_if_match functions
for working with ETags.
* Added a new jQuery.fn.html() method that works around IE's broken
innerHTML implementation. innerHTML in IE would strip whitespace,
which was bad when inserting into <pre> and <textarea> tags.
version 0.5 alpha 2 (3-February-2009):
* JavaScript:
* We now include and require jQuery 1.3.1 and jQueyr-ui 1.6rc5.
* Added support for starting an inlineEditor in the opened state,
and prevent animations when starting or forcing it to be open.
* Disabled keypress propagation for inlineEditor. This fixes a bug
in Review Board's diff viewer (bug #838).
* djblets.gravatars (new):
* Added basic support for gravatars. This provides a {% gravatars %}
template tag for displaying a gravatar based on a User object.
See http://www.gravatar.com/ for more information on Gravatars.
* djblets.util:
* Added a {% include_as_string %} tag for including a template
as a JavaScript string.
* Added the ability to generate media and AJAX serial numbers based
on the media files and template files. These can be appended to
the media and AJAX URLs which, in combination with aggressive
Expires headers, can drastically speed up load times of sites.
See djblets.util.context_processors and
djblets.util.misc.generate_cache_serials.
* djblets.webapi:
* Set the mime type for JSON responses to application/json,
except when responding to an upload, in which case text/plain
is used.
* Fixed a bug where WebAPIResponse._get_content was called too
frequently and in some cases generated a 500 error.