dongpoliu / django-template-utils

Automatically exported from code.google.com/p/django-template-utils
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

generic_markup error: update() takes exactly one argument (0 given) #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
   - Any attempt to use the generic_formatter. Settings.py contains >
MARKUP_FILTER = ('markdown', {})

      - in a template with 
        {% load generic_markup %}
        {{ object.body|apply_markup }}
            or
        {{ object.body|apply_markup:"markdown" }}

      - or a custom save method
        def save(self):
                from template_utils.markup import MarkupFormatter, formatter
                self.summary = formatter(self.summary_markdown)
                self.body = formatter(self.body_markdown)
                super(Entry, self).save()

What is the expected output? 
   - Formatted text

What do you see instead?
   - This error page
-----------------------------
Traceback (most recent call last):
File "/home/b3njamin/django/django_src/django/core/handlers/base.py" in
get_response
  77. response = callback(request, *callback_args, **callback_kwargs)
File
"/home/b3njamin/django/django_src/django/contrib/admin/views/decorators.py"
in _checklogin
  55. return view_func(request, *args, **kwargs)
File "/home/b3njamin/django/django_src/django/views/decorators/cache.py" in
_wrapped_view_func
  39. response = view_func(request, *args, **kwargs)
File "/home/b3njamin/django/django_src/django/contrib/admin/views/main.py"
in change_stage
  329. new_object = manipulator.save(new_data)
File "/home/b3njamin/django/django_src/django/db/models/manipulators.py" in
save
  108. new_object.save()
File "/home/b3njamin/django/django_prj/ben_prj/apps/blog/models.py" in save
  117. self.summary = formatter(self.summary_markdown)
File "/home/b3njamin/lib-py/template_utils/markup.py" in __call__
  179. filter_kwargs.update(**kwargs)

  TypeError at /admin/blog/entry/1/
  update() takes exactly one argument (0 given)
-----------------------------

What version of the product are you using? 
   - Revision 73

Please provide any additional information below.
   - I was using the method suggested at
"http://code.djangoproject.com/wiki/UsingMarkup"
     everything worked fine then.

Original issue reported on code.google.com by benjamin...@gmail.com on 16 Apr 2007 at 7:21

GoogleCodeExporter commented 9 years ago
Using the same value for MARKUP_FILTER I'm unable to reproduce this; I get text 
formatted with Markdown as 
expected.

Original comment by ubernost...@gmail.com on 17 Apr 2007 at 1:41

GoogleCodeExporter commented 9 years ago
I have been trying for over a week to get this to work. Do you have any trouble
shooting ideas. I have tried markdown and textile filters, with and without 
extra
parameters. The only time that I am not given this error page is when thee
MARKUP_FILTER = (None, {}).

Any help is appreciated,
   Ben

Original comment by benjamin...@gmail.com on 25 Apr 2007 at 6:02