You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
662 B
22 lines
662 B
# -*- coding: utf-8 -*-
|
|
from django.http import HttpResponse
|
|
from models import Company
|
|
from functions.custom_views import ExpoListView
|
|
import json
|
|
|
|
class CompanyView(ExpoListView):
|
|
model = Company
|
|
template_name = 'company_catalog.html'
|
|
|
|
class CompanyExposition(CompanyView):
|
|
template_name = 'test_list.html'
|
|
|
|
def get_queryset(self):
|
|
|
|
params = self.get_params()
|
|
for param in params:
|
|
if param.get('type') == 'event':
|
|
company = Company.objects.safe_get(url=param.get('url'))
|
|
#query = exp.users
|
|
self.params = params
|
|
return company.exposition_companies.all() |