I've updated test.sagenb.org with the latest version. Please test the
daylights out of it, or point out any more regressions. If you are so
inclined, please glance at the latest commits at
http://code.google.com/r/jasongrout-flask-sagenb/source/list
or install it yourself by following the instructions at:
http://code.google.com/r/jasongrout-flask-sagenb/
There is one last point that needs to be addressed. The sharing
worksheets thing needs to update some information a single time from the
list of shared worksheets (i.e., it needs to record the shared sheets in
the User object of each person that the sheet is shared with). Is there
an easy way to run a function the first time a notebook without this
information is opened to migrate that information?
Thanks,
Jason
Can you try it again? I think I fixed it.
Thanks,
Jason
It's great. It did expose a bug, though. When I look at your worksheet
and then do "save and quit" it tries to send me to your home page
instead of mine, so I get a message like:
User 'jason.grout' does not have permission to view the home page of
'kcrisman'.
Thanks,
Jason
I'm working on it. Mike or Rado: any idea where this redirection is
happening? I thought it was in the worksheet command decorators, but
I'm having a hard time seeing exactly where a redirection is happening.
>
> I have another weird bug on the test.sagenb.org now, which I didn't
> get before. When I type in (say) 2+2, and do Shift-Enter, it behaves
> like "Enter" (I get a new line in the cell), and nothing evaluates.
> Just the green bar. Even using the 'evaluate' link has this
> problem. You know what browser I have ;0
I think you have javascript problems with that browser ;). Safari 5.1.1
behaves just fine for me. Weird. What happens with Firefox?
I just pushed another bugfix and some more fixes to the new twisted 11
that test.sagenb.org is running. The culmination is that twist.py is
now *deleted* and everything is moved out to other files.
>
> On a possibly unrelated note, sagenb.org has over 300 users right
> now. Big spike. Which I got by evaluating things on that server, and
> didn't get that problem above :)
Interesting. How do you know it has over 300 users? I see from the
server admin script that it has 269 worksheets (I think that means
simultaneous active worksheets).
Jason
works for me (on safari too). Could be just a temporary server overload.
>
> +++
>
> Also, I'm not sure about the new names for the editing things.
>
> Worksheet View Plain View Text
>
> I'm not sure which of these is which. I mean, I figured it out by
> trying, but it's not at all obvious to someone used to the previous
> version. The "Worksheet View" will be confusing - maybe "default", or
> whatever it was before? And the other two are particularly weird
> because clicking on "Text" yields something that says "View plain
> text", which is two different uses of "plain", I would say.
>
> - kcrisman
>
>
> "Worksheet View" "Plain View" "Text" to
> "Default View" "Edit Raw Text" "Text"
>
> How about this? It should also take up the same amount of space that it
> took earlier :P
I say we revert the text to what it has been and have this discussion
after we get this first flask notebook release out the door. Again, the
focus for right now is actually getting a bug/regression-free (as much
as we can) functionally-equivalent flask notebook into Sage.
>
> I shared a worksheet with you and then edited the worksheet and shared
> it again with you and jason. If you are able to see the edited version
> then let me know :)
I can see it, and it says you edited it at the top. So apparently it works.
Thanks,
Jason
I've reverted the new version of JMOL until we first accomplish the goal
of getting a regression-free replacement flask notebook into Sage. Then
the JMOL and MathJax patches get top priority.
So the relevant question is: does the current test.sagenb.org not do
something that the current notebook in sage 4.7.1 does do?
Thanks,
Jason
Okay, I've reverted the text to what is in the old notebook (except I
left the Undo->Revisions change since there didn't seem to be any
problem with it). I've updated test.sagenb.org with this change.
Again, let's have the renaming design discussion after we get the flask
notebook released.
Thanks,
Jason
I fixed this, just FYI. The problem was that the worksheet owner and
the current user was being confused in the javascript. See
http://code.google.com/r/jasongrout-flask-sagenb/source/detail?r=5dbf782794f4f3eb18ea1837b27964d8b41028f4
Thanks,
Jason
I think I've fixed this. Can you test it?
FYI, the commit is:
http://code.google.com/r/jasongrout-flask-sagenb/source/detail?r=b25111ba199ef827560a01b547edde60b32cb946
Thanks,
Jason
I tried to doctest the notebook files and got a number of
UndefinedErrors from using gettext in the template files. Does anyone
know what is going on here?
File
"/Users/grout/projects/sagenb-googlecode/sagenb/notebook/notebook.py",
line 1638:
sage: nb.html(W.filename(), 'admin')
Exception raised:
Traceback (most recent call last):
File "/Users/grout/sage/local/bin/ncadoctest.py", line 1231, in
run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/Users/grout/sage/local/bin/sagedoctest.py", line 38, in
run_one_example
OrigDocTestRunner.run_one_example(self, test, example,
filename, compileflags)
File "/Users/grout/sage/local/bin/ncadoctest.py", line 1172, in
run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_44[4]>", line 1, in <module>
nb.html(W.filename(), 'admin')###line 1638:
sage: nb.html(W.filename(), 'admin')
File
"/Users/grout/projects/sagenb-googlecode/sagenb/notebook/notebook.py",
line 1666, in html
username = username)
File
"/Users/grout/projects/sagenb-googlecode/sagenb/notebook/template.py",
line 154, in template
r = tmpl.render(**context)
File
"/Users/grout/sage/local/lib/python2.6/site-packages/Jinja2-2.5.5-py2.6.egg/jinja2/environment.py",
line 891, in render
return self.environment.handle_exception(exc_info, True)
File
"/Users/grout/projects/sagenb-googlecode/sagenb/data/sage/html/notebook/worksheet_page.html",
line 1, in top-level template code
{% extends "html/notebook/base.html" %}
File
"/Users/grout/projects/sagenb-googlecode/sagenb/data/sage/html/notebook/base.html",
line 11, in top-level template code
{% set system_names = worksheet.notebook().system_names() %}
File
"/Users/grout/projects/sagenb-googlecode/sagenb/data/sage/html/base_authenticated.html",
line 1, in top-level template code
{% extends "html/base.html" %}
File
"/Users/grout/projects/sagenb-googlecode/sagenb/data/sage/html/base.html",
line 26, in top-level template code
{% block body %}
File
"/Users/grout/projects/sagenb-googlecode/sagenb/data/sage/html/base.html",
line 28, in block "body"
{% block header %}
File
"/Users/grout/projects/sagenb-googlecode/sagenb/data/sage/html/base.html",
line 32, in block "header"
<img align="top" src="/images/sagenb.png" alt="Sage" /><span>{{
gettext('The Sage Notebook') }}</span>
UndefinedError: 'gettext' is undefined
Thanks,
Jason
Ah. I knew I saw this problem somewhere, but couldn't find it.
Mike (Hansen), do you know what is going on?
Thanks,
Jason
In template.py, the context passed to the template rendering function
looks like:
default_context = {'sitename': gettext('Sage Notebook'),
'sage_version': SAGE_VERSION,
'JSMATH': JSMATH,
#'gettext': lambda x: x,
'JEDITABLE_TINYMCE': JEDITABLE_TINYMCE,
'conf': notebook.conf() if notebook else None}
Notice that gettext is commented out! It's weird that this doesn't
cause a problem in the actual running of a notebook. If I change that
gettext line to:
'gettext': gettext,
then all of the gettext errors go away.
So my new question is: how come templates seem to work fine in the
actual notebook if that gettext line is commented out?
Thanks,
Jason
Okay, I think everything that people brought up here has been fixed and
uploaded to test.sagenb.org. I've posted a message to sage-devel asking
for wider testing. Let's continue this conversation over on sage-devel.
Thanks,
Jason
http://code.google.com/r/rkirov-flask/source/detail?r=87c1e74824ea1041a85e4a27b31e611597a19628
Yes, thanks. I talked with him via google chat and got the same
message. I'm glad you posted it here in the open.
Thanks,
Jason