Commit 120b5ef1 authored by okhin's avatar okhin 🚴

Merge branch 'master' into 'feat_52'

# Conflicts:
#   bt/admin.py
#   nnmon/urls.py
parents 937ea70a e67ab765
......@@ -14,6 +14,8 @@ uwsgi.
You need to install some development package to activate al the needed python
modules.
On Debian or Ubuntu, this will be done with the following command:
sudo apt-get install libxml2-dev libxslt-dev build-essential python-dev libsqlite3-dev libjpeg-dev zlib1g-dev libapache2-mod-uwsgi libapache2-mod-wsgi uwsgi-plugin-python libfreetype6-dev uwsgi
## Create a virtualenv
......@@ -28,7 +30,7 @@ application from there.
You need to git clone the repository:
git clone http:/git.laquadrature.net/la-quadrature-du-net/respect-my-net.git respect-my-net
git clone gitlab@git.laquadrature.net/la-quadrature-du-net/respect-my-net.git respect-my-net
## Install the module dependencies
......@@ -54,8 +56,8 @@ To run server, just do:
## Set-up uwsgi
You need to create an application for uwsgi. Create a file in
/etc/uwsgi/apps-available with the fllowing content. Adapat to your needs and
read the documentation:
`/etc/uwsgi/apps-available` with the following content. Adapt to your needs
and read the documentation:
[uwsgi]
plugins = python
......@@ -79,7 +81,7 @@ repository), chdir is the same path. Home, is the path of the virtualenv created
above.
Now you need to activate the apps by creating a symoblic link into
/etc/uwsgi/apps-enabled, and to restart uwsgi.
`/etc/uwsgi/apps-enabled`, and to restart uwsgi.
cd /etc/uwsgi/apps-enabled
ln -s ../apps-available/nnmond.conf
......@@ -94,7 +96,7 @@ need to actvivate the uwsgi module:
service apache2 restart
And now you need to create a VirtualHost in
/etc/apache2/sites-availabe/nnmon.conf
`/etc/apache2/sites-availabe/nnmon.conf`
<virtualhost *:80>
ServerName rmn.example.com
......@@ -114,4 +116,3 @@ production use, you should use a TLS VirtualHost.
a2ensite nnmon
service apache2 reload
from django.contrib import admin
from django.contrib.admin import AdminSite
from bt import models
class CommentInline(admin.TabularInline):
......@@ -8,7 +6,7 @@ class CommentInline(admin.TabularInline):
max_num = 1
class ViolationAdmin(admin.ModelAdmin):
list_display = ('state', 'country', 'operator', 'contract', 'resource_name', 'media', 'activationid', 'old')
list_display = ('state', 'country', 'operator', 'contract', 'resource_name', 'media', 'activationid', 'old', 'creation_date')
list_filter = ('state', 'operator_ref', 'contract', 'resource_name', 'media', 'country', 'old')
inlines = [CommentInline, ]
admin.site.register(models.Violation, ViolationAdmin)
......@@ -35,9 +33,4 @@ class OperatorAdmin(admin.ModelAdmin):
list_display = ("__unicode__", "reported_violations")
search_fields = ('name', )
pass
admin.site.register(models.Operator, OperatorAdmin)
class ManagerSite(AdminSite):
site_header = 'Manager Site'
manager_site = ManagerSite(name='manager')
admin.site.register(models.Operator, OperatorAdmin)
\ No newline at end of file
from django import forms
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ugettext as _
from haystack.forms import SearchForm
from haystack.query import SearchQuerySet
from bt.models import Violation, COUNTRIES, RESOURCES, TYPES, MEDIA
......
nnmon/static/img/noise.png

22.5 KB | W: | H:

nnmon/static/img/noise.png

22.5 KB | W: | H:

nnmon/static/img/noise.png
nnmon/static/img/noise.png
nnmon/static/img/noise.png
nnmon/static/img/noise.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
......@@ -135,7 +135,7 @@ $("#btn_dismiss").click(function(event) {
<input type="email" id="email-{{ violation.pk }}" class="form-control" name="email" placeholder="Email"/>
<input type="hidden" id="id-{{ violation.pk }}" value="{{ violation.pk }}" />
<div class="btn-group" role="group" aria-label="confirm-deny">
<button class="btn btn-success">{% trans "OK" %}</ button>
<button class="btn btn-success">{% trans "OK" %}</button>
<button data-toggle="collapse" data-target="#info-{{ violation.pk}}" aria-expanded="false" aria-controls="info-{{ volation.pk }}" type="button" class="btn btn-danger" >{% trans "Cancel" %}</button>
</div>
</div>
......@@ -226,7 +226,6 @@ $("#btn_dismiss").click(function(event) {
<p>{% trans "Those are cases that might be similar to yours, please feel free to add your input on those cases instead of adding yours if they overlap." %}</p>
<dl id="modal-list">
</dl>
</table>
</div>
<div class="modal-footer">
<button type="button" id="btn_dismiss" class="btn btn-default" data-dismiss="modal">{% trans "Dismiss" %}</button>
......
......@@ -2,11 +2,10 @@ from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView, RedirectView
from django.conf import settings
from django.contrib import admin
from bt import views as bt
from bt.feeds import RssSiteNewsFeed, AtomSiteNewsFeed
from bt.api import APIResource, OperatorResource
from bt.admin import manager_site
api_resource = APIResource()
operator_api_resource = OperatorResource()
......@@ -85,9 +84,6 @@ urlpatterns = patterns('',
bt.ViolationSearchView.as_view(template_name='search/search.html')),
# Language switch
url(r'^i18n/', include('django.conf.urls.i18n')),
# Manager admin site
url(r'^manager/', manager_site.urls),
)
if settings.DEV_SERVER == True:
......@@ -95,4 +91,4 @@ if settings.DEV_SERVER == True:
(r'^site_media/(?P<path>.*)$',
'django.views.static.serve',
{'document_root': settings.MEDIA_PATH}),
)
)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment