rename qcombine.FakeModel to qcombine.GenericModel

This commit is contained in:
bkfox 2016-06-21 20:37:26 +02:00
parent 47991dfa3d
commit bae670e883
4 changed files with 5 additions and 5 deletions

View File

@ -126,7 +126,7 @@ class Manager(type):
return qs return qs
class FakeModel(Routable,metaclass=Manager): class GenericModel(Routable,metaclass=Manager):
""" """
This class is used to register a route for multiple models to a website. This class is used to register a route for multiple models to a website.
A QCombine is created with qs for all given models when objects A QCombine is created with qs for all given models when objects

View File

@ -189,7 +189,7 @@ class SearchRoute(Route):
@classmethod @classmethod
def get_queryset(cl, model, request, **kwargs): def get_queryset(cl, model, request, **kwargs):
q = request.GET.get('q') or '' q = request.GET.get('q') or ''
if issubclass(model, qcombine.FakeModel): if issubclass(model, qcombine.GenericModel):
models = model.models models = model.models
return qcombine.QCombine( return qcombine.QCombine(
*(cl.__search(model, q) for model in models) *(cl.__search(model, q) for model in models)

View File

@ -33,7 +33,7 @@
- calendar - calendar
- article list with the focus - article list with the focus
-> set html attribute based on values that are public -> set html attribute based on values that are public
- tags: allow tags_url route QCombine - rename qcombine.FakeModel -> GenericModel?
- website: - website:
- diffusions: - diffusions:
@ -47,7 +47,7 @@
- load complete week for a schedule? - load complete week for a schedule?
- finish that fucking website - finish that fucking website
- list of played diffusions and tracks when non-stop; - list of played diffusions and tracks when non-stop;
- search field -- section - search input in a section

View File

@ -129,7 +129,7 @@ class Sound (cms.RelatedPost):
) )
class Publications (qcombine.FakeModel): class Publications (qcombine.GenericModel):
""" """
Combine views Combine views
""" """