Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removing most things from dashboard.

  • Loading branch information...
commit 20422b4dfa389a62792d36d2c1ce6ea23d26f078 1 parent f42ce2f
Dave Dash davedash authored
Showing with 31 additions and 30 deletions.
  1. +31 −30 apps/dashboard/views.py
61 apps/dashboard/views.py
View
@@ -25,24 +25,24 @@ def dashboard(request):
Version(LATEST_BETAS[prod]).simplified)
search_form = ReporterSearchForm()
- # Frequent terms
- term_params = {
- 'product': prod.id,
- 'version': version,
- }
+ # # Frequent terms
+ # term_params = {
+ # 'product': prod.id,
+ # 'version': version,
+ # }
- # opinions queryset for demographics
- latest_opinions = Opinion.objects.browse(**term_params)
- latest_beta = Opinion.objects.filter(version=version, product=prod.id)
+ # # opinions queryset for demographics
+ # latest_opinions = Opinion.objects.browse(**term_params)
+ # latest_beta = Opinion.objects.filter(version=version, product=prod.id)
- # Sites clusters
- sites = SiteSummary.objects.filter(version__exact=version).filter(
- positive__exact=None).filter(
- platform__exact=None)[:settings.TRENDS_COUNT]
- sites = SiteSummary.objects.all()
+ # # Sites clusters
+ # sites = SiteSummary.objects.filter(version__exact=version).filter(
+ # positive__exact=None).filter(
+ # platform__exact=None)[:settings.TRENDS_COUNT]
+ # sites = SiteSummary.objects.all()
- # Get the desktop site's absolute URL for use in the settings tab
- desktop_site = Site.objects.get(id=settings.DESKTOP_SITE_ID)
+ # # Get the desktop site's absolute URL for use in the settings tab
+ # desktop_site = Site.objects.get(id=settings.DESKTOP_SITE_ID)
try:
c = Client()
@@ -62,21 +62,22 @@ def dashboard(request):
total = latest_beta.count()
chart_data = None
- data = {'opinions': latest_opinions.all()[:settings.MESSAGES_COUNT],
- 'opinion_count': total,
- 'product': prod,
- 'products': PROD_CHOICES,
- 'sentiments': get_sentiment(metas.get('type', [])),
- 'locales': metas.get('locale'),
- 'platforms': metas.get('platform'),
- 'sites': sites,
- 'version': version,
- 'versions': VERSION_CHOICES[prod],
- 'chart_data_json': json.dumps(chart_data),
- 'defaults': get_defaults(search_form),
- 'search_form': search_form,
- 'desktop_url': 'http://' + desktop_site.domain,
- }
+ data = {
+ # 'opinions': latest_opinions.all()[:settings.MESSAGES_COUNT],
+ 'opinion_count': total,
+ 'product': prod,
+ # 'products': PROD_CHOICES,
+ # 'sentiments': get_sentiment(metas.get('type', [])),
+ # 'locales': metas.get('locale'),
+ # 'platforms': metas.get('platform'),
+ # 'sites': sites,
+ # 'version': version,
+ # 'versions': VERSION_CHOICES[prod],
+ # 'chart_data_json': json.dumps(chart_data),
+ # 'defaults': get_defaults(search_form),
+ 'search_form': search_form,
+ # 'desktop_url': 'http://' + desktop_site.domain,
+ }
if not request.mobile_site:
template = 'dashboard/beta.html'
Please sign in to comment.
Something went wrong with that request. Please try again.