first - it is no longer SMUG_REPOSITORY in settings, it is now a
dictionary (?) called SMUG_REPOSITORIES (docs are old) (i'll submit a
patch later)
second, there is no mention of how to manually specify which filter you
would like (my old smug installation was pre- filter type days).
third, there is a bug somewhere, but smug seems to not do proper
traceback handling. any attempt at viewing a page now throws:
Exception Type: TypeError
Exception Value: show() takes at least 3 non-keyword arguments (2 given)
Exception Location:
/usr/lib/python2.6/site-packages/django/core/handlers/base.py in
get_response, line 86
Traceback:
File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in
get_response
92. response = middleware_method(request, e)
File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py"
in get_response
86. response = callback(request, *callback_args,
**callback_kwargs)
Exception Type: TypeError at /wiki/
Exception Value: show() takes at least 3 non-keyword arguments (2
given)
I still haven't been able to figure out where this is coming from. the
only show() i could find was in smug/views/show, and the only file
calling it was raw.py. however, adding a raise Exception to the raw.py
before it calls show() did not result in a different exception being
raised. just fyi.
--
Jonathan Wilson
I thought that had been fixed already--a patch would be great.
> second, there is no mention of how to manually specify which filter you
> would like (my old smug installation was pre- filter type days).
If we don't have .smug documentation, then we certainly need to add it.
We can at least start with some email messages I've sent to the list.
I'll have to look into this.
> third, there is a bug somewhere, but smug seems to not do proper
> traceback handling. any attempt at viewing a page now throws:
>
> Exception Type: TypeError
> Exception Value: show() takes at least 3 non-keyword arguments (2 given)
>
> Exception Location:
> /usr/lib/python2.6/site-packages/django/core/handlers/base.py in
> get_response, line 86
>
>
> Traceback:
> File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in
> get_response
> 92. response = middleware_method(request, e)
> File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py"
> in get_response
> 86. response = callback(request, *callback_args,
> **callback_kwargs)
>
> Exception Type: TypeError at /wiki/
> Exception Value: show() takes at least 3 non-keyword arguments (2
> given)
>
> I still haven't been able to figure out where this is coming from. the
> only show() i could find was in smug/views/show, and the only file
> calling it was raw.py. however, adding a raise Exception to the raw.py
> before it calls show() did not result in a different exception being
> raised. just fyi.
Hmm. I haven't run into this, so I'm wondering what could be different.
Could you send your urls.py?
--
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868
urlpatterns += smug.urls.urlpatterns
should now be:
urlpatterns += patterns('',
(r'^', include('smug.urls'), {'repo': 'content'}),
)
where 'content' is the key of the repo given in the dictionary of
SMUG_REPOSITORIES.
Jeff Anderson
Yeah, that worked. the docs should probably be updated for that too -
its currently:
If you want to use Smug for your whole site, change urls.py in your
project to include:
(r'', include('smug.urls'))
If you have some sublocation for it, then the line should look like:
(r'^(?P<basepath>where/smug/goes/)', include('smug.urls'))
I could probably fix that as well in the patch i'll send ya.
Also, is there now something different than what is in the docs for
using a custom template? I have (in my git repo) a templates folder,
with wiki.html inside for my wiki template.
ie, /path/to/bare/repo.git, a checkout of which has templates/wiki.html
my settings has
SMUG_TEMPLATE = 'wiki.html'
and TEMPLATE_DIRS has
'git:///templates'
(also tried /git/templates, which was what it used to be)
'smug.extras.load_template_source' is in the proper template_loaders as
well
however, smug doesn't find the template, and just displays the base
page. what's missing?
thanks.
--
Jonathan Wilson
smug://<reponame>/path/to/templates
> 'smug.extras.load_template_source' is in the proper template_loaders as
> well
>
That looks right.
it still isn't loading the template. since it also isn't interpreting
the <!-- title:
portion, i'm guessing i need to set the filter as
extendtemplate/present. however, the doc's do not currently say how.
so. how? :p
--
Jonathan Wilson
So, it does work if I add the rst rst2html bit from the docs (at least
that is there) and convert my files to rst. apparantly this is a good
opportunity to update my site to rst, heh
--
Jonathan Wilson
Also, it appears that the syntax for smugmenu has left the docs behind
as well. the docs say {{ smug_menu }}, it is {{ smugmenu }}, however,
that shows <smug.menu.SmugMenu object at 0x9ac890c>, and it isn't
registered as a valid block, so that doesn't work either. Would someone
mind telling me what the new syntax to call the menu is?
thanks.
--
Jonathan Wilson
K, thanks. Its up and running now (had to convert my whole site to rst,
but luckily my whole site isn't very big).
one thing i've noticed - the ssl middleware doesn't seem to work very
well - with secure cookies turned on, and the ssl middleware in
middleware, after a login, it redirects to http, and any attempt to go
to https redirects back to http. as far as the menu goes, it doesn't
update with the changing of login. if i click login from the menu, and
then log in, the menu says log in, and i am in fact not logged in. (i
check by trying to go to /admin). if i log in via another django app,
and then go to my smug url, the full smug menu is present. however, if
i then click on logout, i get logged out, but the refreshed menu still
shows me as being logged in.
this isn't really a concern for me since i almost always edit on the
command line, and since it appears that the text area doesn't correctly
do rst files (it drops all the extra new line characters, which rst
doesn't really like very much), but I thought I'd let you all know.
--
Jonathan Wilson
this was the only thing that I didn't have, or hadn't figured out. it
isn't anywhere in the docs, and I didn't feel like looking through the
source to find out how to do that. since convert from .rst to .html
using rst2html, i converted all my site from .html to .rst to get it to
work. it was in my to do list anyway, so its not that big of a deal.
--
Jonathan Wilson
Yeah, we definitely need to go through and update the docs. There are a
lot of errors like this, and it's a shame to have the documentation lie.
Hello,
I went to update the doc where this change would need to be made, and it
looks like your patch hasn't made it in. If you have it ready, I'll wait
until it's merged before doing mine to avoid conflicts for either one of
us.
I created a feature, and my docs will depend on those docs being done.
If you haven't already written the patch to update the docs, I'm more
than happy to do that part. I just didn't want to duplicate effort where
it would be avoided.
Jeff Anderson