forked from twisted/nevow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChangeLog
743 lines (506 loc) · 26.5 KB
/
ChangeLog
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
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
2006-06-12 Glyph Lefkowitz <[email protected]>
* Nevow 0.9.0: see NEWS.txt for details.
2006-04-07 Jp Calderone <[email protected]>
* Nevow 0.8.0 released
2006-03-30 Tommi Virtanen <[email protected]>
* nevow/static.py: Fix handling of range requests on static files.
2006-03-30 Jp Calderone <[email protected]>
* formless/freeform-defaults.css, formless/annotate.py: Style and
feedback improvements.
2006-03-29 Jp Calderone <[email protected]>
* examples/formbuilder/: Apply Cory Dodt's patch to make this
example work again.
2006-03-27 Jp Calderone <[email protected]>
* nevow/athena.py: Add getInitialArguments method which will be
invoked during rendering and may return a list or tuple of objects
which will be be passed to the client-side Widget's __init__ method.
2006-03-24 Allen Short <[email protected]>
* Upgrade MochiKit to 1.2
2006-03-17 Tristan Seligmann <[email protected]>
* Remove usage of twisted.python.components.Interface from formless.
Convert TypedInterface to zope.interface.
2006-03-17 Jp Calderone <[email protected]>
* nevow/json.py: Improve (hopefully correct this time ;) unicode
support.
2006-03-08 Valentino Volonghi <[email protected]>
* Remove usage of twisted.python.components.Interface from nevow.
Remove compyCompat.
2006-02-28 Jp Calderone <[email protected]>
* nevow/athena.py: Make the "Connection: Close" header of Athena
transport responses optional (toggleable by a flag on LivePage) to
allow TCP connection setup overhead to be avoided.
2006-02-15 Tristan Seligmann <[email protected]>
* nevow/athena.js, nevow/athena.py: Pass JavaScript call-stack
information back to the server and include it in logged tracebacks
(Firefox only).
2006-02-14 Jp Calderone <[email protected]>
* nevow/util.py: Delete a bunch of code duplicated from Twisted.
2006-02-06 Glyph Lefkowitz <[email protected]>
* nevow/athena.py, nevow/athena.js: Pop up an obnoxious widget when
an Athena connection is lost.
2006-02-06 Jp Calderone <[email protected]>
* nevow/runtime.js: Add Platform.getPage, a wrapper around the
browser-provided HTTP request function.
2006-02-01 Tristan Seligmann <[email protected]>
* nevow/athena.js: Add support for <athena:handler> element, a
declarative mechanism for attaching event handlers to nodes.
2006-02-01 Tristan Seligmann <[email protected]>
* bin/nit: Test collector/runner for Athena widgets.
2006-02-01 Jp Calderone <[email protected]>
* nevow/defer.js: Deferred implementation to replace MochiKit
Deferreds.
2006-01-21 Valentino Volonghi <[email protected]>
* nevow/rend.py, formless/webform.py: Support Deferreds returned
from bind_ methods.
2006-01-21 Valentino Volonghi <[email protected]>
* nevow/flat/flatstan.py: Fix macros inside of other specials.
2006-01-19 Jp Calderone <[email protected]>
* nevow/athena.js: Added Divmod.Class.methods() for defining
multiple methods at once.
2006-01-19 Jp Calderone <[email protected]>
* nevow/athena.py, nevow/athena.js: Support the addition of
LiveFragment instances to a page after the initial render pass.
2006-01-15 Jp Calderone <[email protected]>
* nevow/athena.js: Introduced new form of Divmod.Class.method() for
adding methods to JavaScript classes. Added a child-window based
log viewer.
2006-01-08 Valentino Volonghi <[email protected]>
* examples/hello/hellohtml.py: Removed htmlfile usage
* nevow/loaders.py: Deprecated htmlfile/htmlstr
2006-01-08 Glyph Lefkowitz <[email protected]>
* nevow/test/, formless/test/: Removed all usage of trial's
deferredResult() and util.wait() functions.
2006-01-04 Glyph Lefkowitz <[email protected]>
* nevow/athena.py: Added fragment and widget nesting. On the
server side, this documents and provides a supported way of
setting the magical required "page" attribute. On the client
side, this provides a convenient hook for multiple widgets within
a page to communicate with each other.
2005-12-26 Jp Calderone <[email protected]>
* nevow/athena.py: Added athena.js and MochiKit.js to the dictionary
returned by allJavascriptModules(), allowing them to be referenced
using the JS import mechanism, in turn allowing them both to be
served from a single site-wide URL, rather than once per page.
2005-12-22 Jp Calderone <[email protected]>
* nevow/athena.py: Remove Python 2.4 dependencies.
2005-12-21 Jp Calderone <[email protected]>
* Nevow 0.7.0 released
2005-12-18 Jp Calderone <[email protected]>
* nevow/athena.py: Server-side processing of .js files to allow for
an import directive. Imported JavaScript modules are inserted into
the page during the render process in dependency order.
* nevow/widget.js: Athena Widgets class and support code definitions
moved here.
2005-12-13 Matt Goodall <[email protected]>
* nevow/athena.js: Improved IE compatibility.
2005-12-05 Jp Calderone <[email protected]>
* nevow/athena.js: Added Divmod.Class object which provides a
class-based object model for JavaScript programs. Added
Nevow.Athena.Widget, a base class for "Live Widgets" - JavaScript
classes which can control a particular section of a LivePage and can
communicate with corresponding LiveFragment instances on the server.
* nevow/athena.py: Added a callRemote method to LiveFragment - this
allows the server to invoke methods on particular Widgets on the
client.
2005-12-03 Jp Calderone <[email protected]>
* nevow/rend.py: Fixed a bug in xmlfile caching which could lead to
a corrupt loader cache.
2005-11-29 Jp Calderone <[email protected]>
* nevow/appserver.py: Removed "support" (which consisted of logging
an error message and continuing) for returning objects which do not
provide IResource.
2005-11-26 Jp Calderone <[email protected]>
* nevow/athena.py, nevow/athena.js: Use POST for the LivePage
transport, rather than GET.
* nevow/json.py: Fix a bug in JSON support for floating points.
2005-11-25 Jp Calderone <[email protected]>
* nevow/athena.js: Go live by default.
2005-11-22 Glyph Lefkowitz <[email protected]>
* nevow/guard.py: Removed __session_just_startd__.
2005-11-15 Jp Calderone <[email protected]>
* nevow/athena.py: Added LiveFragment - base class for Fragments
which may cooperatively share a single LivePage connection.
2005-11-09 Jp Calderone <[email protected]>
* Athena JavaScript API unified into a pseudo-namespace hierarchy.
2005-11-07 Jp Calderone <[email protected]>
* JSON serializer now quotes dict/object keys.
2005-11-02 Jp Calderone <[email protected]>
* Nevow 0.6.0 released
2005-09-21 Jp Calderone <[email protected]>
* nevow/athena.py: New implementation of LivePage with a
data-centric API: generation of JavaScript on the server is highly
discouraged, instead an API for passing around simple or complex
data structures is provided.
2005-08-01 Matt Goodall <[email protected]>
egg-ify the distribution. "python setup.py bdist_egg" will now build
a .egg in dist for Python 2.3 and Python 2.4.
2005-07-14 Donovan Preston <[email protected]>
* It's no longer necessary to specify addSlash = True on
the root resource. nevow.appserver.NevowSite automatically
sets it on the first argument you pass to it (the root
resource).
2005-07-12 Donovan Preston <[email protected]>
* Usability improvements for formless at the expense of
purity of abstraction. Since the only thing anybody uses
formless for is rendering web forms, make it a little easier
to do common things. For example:
- _nevow_carryover_ does not get appended to URLs unless absolutely
necessary (because you return a value from an autocallable)
- TypedInterface is being deprecated in favor of using
IConfigurable directly, and an IConfigurable implementation
on Fragment/Page that is easy to use. To expose a "foo" method
on a page which takes a "bar" string and a "baz" integer, do this:
def bind_foo(self, ctx):
return [('bar', String()), ('baz', Integer())]
Previously, you would have had to create a TypedInterface,
declare foo and the types of the arguments in the class body,
declare that foo is autocallable, and declare that your Page
class __implements__ the interface. Now, just implement
bind_foo to return an IBinding or a list which can be munged
into one.
- It is possible to return a Page from an autocallable to have
that page displayed directly after posting the autocallable.
The URL that is used is freeform_hand, which means that the
Page goes into your "hand" in the session. The hand can only
hold one value, the most recent return result of an autocallable.
This isn't very back-button friendly but it makes it super
easy to put together a multi-step wizard interface.
See examples/tests/testformless.py and the /testformless on
the example server to see how to do this.
- It is possible to return a URL instance from an autocallable
to have the user redirected to that page after posting the
form successfully. This replaces and deprecates the old,
whacko method of setting IRedirectAfterPost on the Request.
See examples/tests/testformless.py and the /formless_redirector
on the example server to see how to do this.
* There is now livetest coverage of the formless examples,
including posting forms and checking erroneous conditions.
2005-07-06 Donovan Preston <[email protected]>
* Major non-backwards-compatible improvements to livepage. Changes
are designed to avoid an uncollectable garbage problem which was
inherent in the previous design.
The livepage javascript glue now includes a global object named
"server". This object has a "handle" method which takes at least
one argument, a string indicating the name of the handler to
invoke on the server. When called by client-side javascript,
LivePage.locateHandler is invoked. locateHandler should return
a callable which will be called with a context indicating
which client is invoking the method, and any additional arguments
which were passed to server.handle, as strings.
The default implementation of LivePage.locateHandler looks for
a correspondingly named "handle_*" method. Using livepage is
now as simple as subclassing LivePage and providing handle_*
methods:
class Foo(LivePage):
def handle_bar(self, ctx, something):
print "something!", something
And calling server.handle in javascript:
<a onclick="server.handle('bar', 'here is something')">Click me</a>
The previous behavior of registering closures or other callables
as event handlers and then embedding them in the page is still
available using the IClientHandle.transient method. These one-
shot handlers are only invokable by the client once before being
garbage collected on the server. This makes it possible to
implement temporary dialog boxes and the like.
2005-04-09 Tommi Virtanen <[email protected]>
* Allow remembering ILogger to specify an alternate access logging
method.
2005-04-06 Matt Goodall <[email protected]>
* Added optional context argument to Page's renderString and
renderSynchronously methods. This provides a site-like context that is
useful when rendering multiple pages that need common remembered data.
2005-3-23 Donovan Preston <[email protected]>
* Releasing 0.4.1
2005-3-22 Donovan Preston <[email protected]>
* Releasing 0.4
2005-02-22 Matt Goodall <[email protected]>
* Added a "data" renderer (rend.data) that replaces the tag's content
with the current data. i.e. <p n:data="name" n:render="data">Foo Bar</p>.
2005-02-17 Matt Goodall <[email protected]>
* Added i18n - a gettext-like mechanism for marking translatable content
in an application's Python modules by wrapping a string in _(). Standard
Python gettext tools can be used to generate translation files.
Translation happens during rendering and depends on a list of languages
found in the context. By default, the browser's preferred languages are
used. The default behaviour can be overridden by remembering the languages
as inevow.ILanguages in the context; allowing the language to be selected
from user preferences, for example.
2005-02-08 Matt Goodall <[email protected]>
* Extended the IDocFactory interface's load method to accept an optional
context.
The current loaders do not use the context but future loaders may, i.e. one
that loads a localised template based on some language in the context.
2005-01-01 Donovan Preston <[email protected]>
* Rewrote LivePage quoting code to be much more correct; added many unit
tests. Some older livepage code must be changed to use the
livepage.literal object instead of passing normal strings to handler or
the LivePage client APIs.
* Added nevow.livepage module, LivePage, and ILivePage. The name liveevil
is deprecated.
2004-12-23 Phil Frost <[email protected]>
* Added support for formless to return unicode objects. annotate.String
and subclasses (Text, Password, etc.) take a 'unicode' parameter to
enable unicode, like so:
| annotate.String(unicode=True)
The coerced value will then be a unicode object.
2004-12-16 Matt Goodall <[email protected]>
* Added ObjectContainer - a data directive accessor for retrieving an
attribute of an object. If the current data in the context (the IData) is an
object you can register ObjectContainer as the IContainer adapter for the
object's class and Nevow will automatically look inside the object to fetch
the attribute.
Note: ObjectContainer is *not* registered as the adapter for all object
types. You must explicitly register the adapter for application classes as
needed.
2004-12-08 Matt Goodall <[email protected]>
* Applied the foom/mesozoic patch to make Page.remember work correctly and
without the hack. You can now use the method reliably to remember objects at
Page construction time or any other time before the PageContext is created.
The remembered objects can be found from the context in the usual way.
class MyPage(rend.Page):
def __init__(self, original):
# Make original available as ISomething(ctx) for later.
self.remember(original, ISomething)
rend.Page.__init__(self, original)
* Added a similar remember method for NevowSite (and made a SiteContext
object the ultimate parent). You can know remember objects on the site and
have them available anywhere there's a context. A typical use case is making
some object store available to the site. This was often achieved using a
wrapper resource but now it's as easy as:
store = makeStore()
site = NevowSite(rootResource)
site.remember(store, IStore)
2004-12-08 Matt Goodall <[email protected]>
* Renamed URL.fromRequest to URL.fromContext. URL.fromRequest was a little
confusing - the URL it returned only included the segments that had been
consumed so far by the locateChild process and not the whole URL as the name
might suggest. Eventually, fromRequest will change to return a full URL but,
for now, its use is deprecated.
* Renamed URL.parent to URL.parentdir. URL.parent() was logically equivalent
to '..' and so removed more segments than expected. URL.parent's use is now
deprecated and in a future release will be changed to remove exactly one
segment.
* Improve URL.click to normalise any segments of '.' or '..'. Browsers
normalise the URL so, according to the docstring, click should too.
2004-12-04 Donovan Preston <[email protected]>
* Added macros! This is the same patch as the one I attached to my
"Macros in Nevow" mail, with the addition of an IMacroFactory,
a MacroFactory implementation on rend.Page, and macro directive
support. Macros are like render functions that take only the
context (no data parameter) and run only once during the lifetime
of a template loader. Here is an example of the difference between
a macro and a renderer:
>>> class Bumper(object):
... num = 0
... def bump(self):
... self.num += 1
... return self.num
...
>>> staysTheSame = Bumper()
>>> changes = Bumper()
>>> from nevow import flat, tags, loaders
>>> document = loaders.stan([tags.invisible(macro=lambda ctx: staysTheSame.bump()), tags.invisible(render=lambda ctx, data: changes.bump())])
>>> flat.flatten(document)
'11'
>>> flat.flatten(document)
'12'
>>> flat.flatten(document)
'13'
2004-12-01 Donovan Preston <[email protected]>
* Added __iter__ to nevow.stan.slot to prevent infinite loops by
trying to do "for x in slot('foo'): print x".
* Added an IGettable adapter for nevow.stan.slot. It is now possible
to specify a slot as the data for a node, so the following example
would work:
from nevow import rend, tags
def fillEm(ctx, data):
ctx.fillSlots('value', [1, 2])
return ctx.tag
tags.html(render=fillEm)[
tags.ul(data=tags.slot('value'), render=rend.sequence)[
tags.li(pattern='item')[
str ]]]
2004-09-26 Donovan Preston <[email protected]>
* Added nevow.inevow.IQ interface, an interface for querying the
stan DOM. Eventually, this interface will contain APIs for doing
traditional DOM introspection, such as iterating children,
examining tag names, and examining attributes. For now, it contains
only the patternGenerator, onePattern, and allPatterns APIs. These
APIs have been deprecated from Context.
The main benefit of this is the ability to do:
IQ(loaders.xmlfile(...)).patternGenerator(...)
which would be nice for creating "pattern library" files containing
common skin idioms which can then be copied and used throughout
the app.
2004-09-25 Donovan Preston <[email protected]>
* Chatola received a major facelift, bringing it from cool demo
up to almost a full fledged web-based chat server. The helper API
LiveEvil.call(...) was added, which deprecates
LiveEvil.sendScript(callJS(...))
2004-09-23 Tommi Virtanen <[email protected]>
* Make guard.SessionWrapper store its URL location in all requests it
passes to its children. This allows the children know where to post
the __login__ and __logout__ forms, even deep inside the resource
tree (fixes issue59).
* Guard now works as a non-root resource, with help from the above
change. Semantics of __login__ clarified in unit tests; if your guard
is at /foo, posting to /foo/__login__ redirects to /foo, and posting
to /foo/__login__/ redirects to /foo/. The two unit tests that failed
earlier now pass (with that change in their __login__ URLs).
* If URL-based sessions are used, login no longer loses session
information due to redirect to / (fixes issue56).
2004-09-20 Matt Goodall <[email protected]>
* Added URL.secure() method to make switching between http and
https easier.
2004-09-08 Donovan Preston <[email protected]>
* Nevow now includes a very simple proof-of-concept WSGI Application
implementation, and can be used with no Twisted dependency. Nevow can
also be used to write CGIs, either using a simple CGI WSGI gateway
(which supports URL traversal), or by using Page.renderString (which does not).
* Two new context interfaces, ICurrentSegments and IRemainingSegments,
replace the need to examine the Request prepath and postpath attributes
directly.
* ISerializable is deprecated, and has been replaced with a simple
Flattener registry. nevow.flat.registerFlattener and
nevow.flat.getFlattener have been added to support this.
2004-09-06 Donovan Preston <[email protected]>
* BACKWARDS INCOMPATIBLE CHANGE. Page.configurable_ *always* returns
self, and a new Page.configurable_original *always* returns
self.original. If you were relying on Page.configurable_'s
introspection behavior and are now getting errors about adapting
to IConfigurable, change your renderForms() calls to:
renderForms('original')
This causes Page.configurable_original to be invoked and
introspected for form rendering.
2004-08-23 Donovan Preston <[email protected]>
* LivePage uses a simpler implementation strategy which requires
the browser to make one request per output event. As a result,
LivePage now works on Mozilla, Safari, and Internet Explorer Windows.
2004-08-05 Donovan Preston <[email protected]>
* Implemented support for IFoo(ctx) synonym syntax. It does the
same thing as ctx.locate(IFoo)
* Removed Resource Generators, a feature of NevowSite that nobody
used and wasn't really useful.
* Changed all inevow.IResource apis to take a Context object
where they used to take the request. Remembering objects in
PageContexts is now much easier, and fewer hacks are required to
build the context chain. The context chain now looks like:
SiteContext->RequestContext->PageContext(s)->WovenContext(s)
2004-7-28 Donovan Preston <[email protected]>
* Parameterize data_* methods in the same way as render_* methods.
Patch by k3mper.
For example, <div nevow:data="foo bar,baz" /> will cause
data_foo(self, bar, baz) to be called with the strings "bar" and
"baz". This data method should return a callable taking ctx, data.
The return value of this callable will be remembered as IData at
this point in the context stack.
* Added list-slicing support to ListContainer. You may now use
list slicing syntax in a data directive in addition to a simple
index. For example:
def data_aList(self, ctx, data):
return ["Buckle", "My", "Shoe"]
<div nevow:data="aList">
<span nevow:data="1:-1" nevow:render="string" />
</div>
Will render as <div><span>My</span></div>
2004-7-20 Matt Goodall <[email protected]>
* Modified sax loader to retain doctypes, comments and xmlns attributes.
It's now possible to build XHTML valid pages :).
xmlns attributes are always kept but there are options to ignore the doctype
and comment (at the request of foom, not sure why yet). Right now, the default
is to retain doctypes and comments but you can use the ignoreDocType and
ignoreComment args to the xml loaders and flatsax parse functions. This bit
may change.
* Add a URL -> IResource adapter that performs a HTTP redirect. URLs can then
be returned from locateChild().
2004-06-07 Donovan Preston <[email protected]>
* Added nevow.canvas, an experimental module similar to LivePage
which provides a Python server-side API for drawing arbitrary lines,
curves, and text in the browser. The implementation is socket-based
and asynchronous, so the server can issue drawing commands to the
client at any time.
The idea is to provide a server-side API to the Python programmer
and shield them from implementation details, but the current
implementation uses a pre-compiled Flash movie (which never changes;
we are not generating Flash bytecodes). An implementation using SVG
or Safari's Canvas (nevow.canvas was written before the Safari Canvas
announcement) would be possible.
2004-05-26 Donovan Preston <[email protected]>
* Add URLOverlay.keep, an API which lets you specify which query args
will be carried on from the current page render into the new URL.
2004-05-24 Matt Goodall <[email protected]>
* Extracted Fragment from Page. Hopefully, it will make it more obvious
that embedding an object with data_ and render_ methods in a stan tree is
possible without using something as "heavy" as Page which is really meant
to be a web resource.
2004-05-23 Donovan Preston <[email protected]>
* Added some useful APIs to LiveEvil for manipulating the client-side
page:
- flt(stan): Flatten some stan, quoting apostrophes as
as appropriate for embedding in javascript
- set(what, to): Set the contents of the client-side node
with the id 'what' to the stan 'to'.
- append(where, what): Append the stan 'what' to the client-
side node with the id 'where'
- alert(what): Show an alert to the user with the text "what"
2004-05-19 Jonathan Simms <[email protected]>
* 0.2 released.
2004-05-14 Donovan Preston <[email protected]>
* nevow.url.URLPath is renamed nevow.url.URL
* URL objects are now lazier about casting things to strings; they will
keep track of path segments in a list and defer to the nevow rendering
machinery to do the conversion; This means you can do things like
here.child(deferred) or here.child(function)
* URL objects have a better api for manipulating query arguments
- add(key, value=None) adds a new query arg at the end; the value may
be None if only a query key needs to be added
- replace(key, value) removes all occurrences of 'key' and inserts a
new (key, value) at the same location as the previous first
occurrence of key
- clear() clears all args
2004-05-06 Donovan Preston <[email protected]>
* Merged freeform-patterned branch, a large formless/freeform refactor.
It is now possible to influence the rendering of forms by providing
"patterns" to renderForms.
* Formless is now a top-level package. Freeform has been renamed
formless.webform. It should be possible to use formless outside
the context of nevow for doing things such as validating network
input based on method argument type annotations.
* TypedInterface, autocallable, and all the Typed subclasses are now
in the formless.annotate module.
2004-04-30 Donovan Preston <[email protected]>
* Created nevow.blocks, a module containing helpful code for working
around display: inline-block bugs in Mozilla.
2004-04-27 Donovan Preston <[email protected]>
* IRenderer.__call__ was renamed IRenderer.rend to be more explicit.
2004-04-21 Donovan Preston <[email protected]>
* Implemented nevow.flat.flatten and nevow.flat.precompile, functions
useful for using stan outside of the context of Page classes. Useful
for generating some XML or even raw text; use it any time you want
to convert a tree data structure into a contiguous string!
import random
import string
from nevow import flat
def letters(howMany):
for i in range(howMany):
yield ' ', string.letters[i], '\n'
def outline():
for i in range(5):
yield i, '\n'
yield letters(random.choice(range(7)))
yield '\n'
print flat.flatten(outline())
2004-04-20 Donovan Preston <[email protected]>
* guard sessions are no longer required to use formless.
2004-04-19 Donovan Preston <[email protected]>
* Implemented lazy context factories. It is now possible to register
an adapter against various *Context classes and an interface. They
will be invoked if *Context.locate(interface) is called.
Implemented a lazy ISession adapter against RequestContext, making
it possible to do ctx.locate(ISession), which is nice.
2004-04-16 Donovan Preston <[email protected]>
* Added nevow.entities module, a module containing literals for all of
the valid XHTML entities. For example:
def render_nbsp(self, ctx, data):
from nevow import entities
return entities.nbsp