Open GoogleCodeExporter opened 9 years ago
Ditto. I've been doing this in my models.py:
try:
tagging.register(MyModel)
except tagging.AlreadyRegistered:
# Dev Note: Not sure the right way to register a model for tagging b/c it
# raises this error if registered more than once. We end up registering
# the first time during "manage.py syncdb" and then a second time when
# actually attempting to run the site.
pass
Original comment by tre...@gmail.com
on 25 Jun 2008 at 10:36
Same here. The workaround that trentm posted works fine for me.
Original comment by jonathan...@gmail.com
on 31 Jul 2008 at 6:12
Same again. Seems models.py is being run more than once. I don't understand why
the
developer would intentionally raise an Exception though. Why not just return
silently
if the model is already registered?
Original comment by litchfie...@gmail.com
on 29 Jan 2009 at 11:27
I having same problem in my application. I just checked code and as litchfield4
I
don't understand why raise a error too ... so I changed tagging code and I
propose a
simple patch here, to ignore if Model already in register instead raise a error.
Original comment by philipe.rp@gmail.com
on 28 Jul 2009 at 6:45
Attachments:
Also have this problem, would be nice to see a resolution or clarification in
the doc's.
Original comment by Stephen....@gmail.com
on 4 Oct 2010 at 1:57
Ditto, a silent passing would be nice if the model is already registered...
It's a pain to write try/except clauses for each registered model.
Original comment by janne.la...@silverbucket.fi
on 15 Feb 2011 at 7:36
This has bitten our company as well. It's a shame this issue was reported back
in 2008 and nothing has really been mentioned by the developers/maintainers.
cheers
James
Original comment by prolo...@shortcircuit.net.au
on 13 Jan 2015 at 3:17
Original issue reported on code.google.com by
till%bac...@gtempaccount.com
on 29 May 2008 at 11:22