Giter VIP home page Giter VIP logo

django-cms-redirects's People

Contributors

andrewschoen avatar megamark16 avatar mrj0 avatar nsh-ableton avatar rfeldbinder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

django-cms-redirects's Issues

Time for 1.0.4

Just hit a bug that has been fixed in this repo, but isn't in the latest version on pypi. Any chance of version 1.0.4 - it has been almost two and a half years since the last release ...

Empty "page" breaks search

If you don't specify a "page" when creating a new redirect, the search filter in django admin will throw an error.

Here's the traceback:

Traceback (most recent call last):

File "/some/path//lib/python2.6/site-packages/django/core/handlers/base.py", line 100, in get_response
response = callback(request, _callback_args, *_callback_kwargs)

File "/some/path//lib/python2.6/site-packages/django/contrib/admin/options.py", line 288, in wrapper
return self.admin_site.admin_view(view)(_args, *_kwargs)

File "/some/path//lib/python2.6/site-packages/django/utils/decorators.py", line 76, in _wrapped_view
response = view_func(request, _args, *_kwargs)

File "/some/path//lib/python2.6/site-packages/django/views/decorators/cache.py", line 78, in _wrapped_view_func
response = view_func(request, _args, *_kwargs)

File "/some/path//lib/python2.6/site-packages/django/contrib/admin/sites.py", line 190, in inner
return view(request, _args, *_kwargs)

File "/some/path//lib/python2.6/site-packages/django/utils/decorators.py", line 21, in _wrapper
return decorator(bound_func)(_args, *_kwargs)

File "/some/path//lib/python2.6/site-packages/django/utils/decorators.py", line 76, in _wrapped_view
response = view_func(request, _args, *_kwargs)

File "/some/path//lib/python2.6/site-packages/django/utils/decorators.py", line 17, in bound_func
return func(self, _args2, *_kwargs2)

File "/some/path//lib/python2.6/site-packages/django/contrib/admin/options.py", line 1026, in changelist_view
self.date_hierarchy, self.search_fields, self.list_select_related, self.list_per_page, self.list_editable, self)

File "/some/path//lib/python2.6/site-packages/django/contrib/admin/views/main.py", line 64, in init
self.query_set = self.get_query_set()

File "/some/path//lib/python2.6/site-packages/django/contrib/admin/views/main.py", line 244, in get_query_set
qs = qs.filter(reduce(operator.or_, or_queries))

File "/some/path//lib/python2.6/site-packages/django/db/models/query.py", line 561, in filter
return self._filter_or_exclude(False, _args, *_kwargs)

File "/some/path//lib/python2.6/site-packages/django/db/models/query.py", line 579, in _filter_or_exclude
clone.query.add_q(Q(_args, *_kwargs))

File "/some/path//lib/python2.6/site-packages/django/db/models/sql/query.py", line 1167, in add_q
self.add_q(child, used_aliases, force_having=force_having)

File "/some/path//lib/python2.6/site-packages/django/db/models/sql/query.py", line 1170, in add_q
can_reuse=used_aliases, force_having=force_having)

File "/some/path//lib/python2.6/site-packages/django/db/models/sql/query.py", line 1105, in add_filter
connector)

File "/some/path//lib/python2.6/site-packages/django/db/models/sql/where.py", line 67, in add
value = obj.prepare(lookup_type, value)

File "/some/path//lib/python2.6/site-packages/django/db/models/sql/where.py", line 316, in prepare
return self.field.get_prep_lookup(lookup_type, value)

File "/some/path//lib/python2.6/site-packages/django/db/models/fields/related.py", line 139, in get_prep_lookup
raise TypeError("Related Field has invalid lookup: %s" % lookup_type)

TypeError: Related Field has invalid lookup: icontains

Redirect add fails

Hi! I have a little problem with cms-redirect.

Installed cms-redirects from pip, added in INSTALLED_APPS, done manage.py migrate, but now getting strange error, while trying to add new redirect:

(1452, 'Cannot add or update a child row: a foreign key constraint fails (appname.cms_redirects_cmsredirect, CONSTRAINT site_id_refs_id_59d206086c6310a1 FOREIGN KEY (site_id) REFERENCES django_site (id))')

Check for valid paths

I accidentally added a redirect without the initial slash, and it added fine but didn't work, causing some confusion.

Would it be possible to validate that paths start with a slash, and destinations either start with a slash or look like a valid URL, and show a form error if not?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.