Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
m3_webInterface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
m3
m3_webInterface
Commits
fe43e886
Commit
fe43e886
authored
Nov 26, 2017
by
Mario Chirinos Colunga
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
7446a45e
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
89 additions
and
5 deletions
+89
-5
.updateDB.py.swp
catalog/management/commands/.updateDB.py.swp
+0
-0
updateDB.py
catalog/management/commands/updateDB.py
+2
-0
updateDB.pyc
catalog/management/commands/updateDB.pyc
+0
-0
0006_auto_20171126_0109.py
catalog/migrations/0006_auto_20171126_0109.py
+20
-0
0006_auto_20171126_0109.pyc
catalog/migrations/0006_auto_20171126_0109.pyc
+0
-0
models.py
catalog/models.py
+1
-1
models.pyc
catalog/models.pyc
+0
-0
audioList.html
catalog/templates/audioList.html
+1
-1
audioPlay.html
catalog/templates/audioPlay.html
+54
-0
index.html
catalog/templates/index.html
+1
-1
urls.py
catalog/urls.py
+2
-1
urls.pyc
catalog/urls.pyc
+0
-0
views.py
catalog/views.py
+8
-1
views.pyc
catalog/views.pyc
+0
-0
No files found.
catalog/management/commands/.updateDB.py.swp
0 → 100644
View file @
fe43e886
File added
catalog/management/commands/updateDB.py
View file @
fe43e886
...
...
@@ -53,6 +53,8 @@ class Command(BaseCommand):
# else:
# date = d['date']
# newsDate = datetime.datetime.strptime(date, "%Y-%m-%d")
# print d['date']
# print d['title']
newsDate
=
dateutil
.
parser
.
parse
(
d
[
'date'
])
...
...
catalog/management/commands/updateDB.pyc
View file @
fe43e886
No preview for this file type
catalog/migrations/0006_auto_20171126_0109.py
0 → 100644
View file @
fe43e886
# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-26 01:09
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'catalog'
,
'0005_auto_20170819_2050'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'publisher'
,
name
=
'crawler'
,
field
=
models
.
CharField
(
default
=
b
''
,
max_length
=
64
),
),
]
catalog/migrations/0006_auto_20171126_0109.pyc
0 → 100644
View file @
fe43e886
File added
catalog/models.py
View file @
fe43e886
...
...
@@ -7,7 +7,7 @@ from django.contrib.postgres.indexes import GinIndex
class
Publisher
(
models
.
Model
):
name
=
models
.
CharField
(
max_length
=
128
)
shortName
=
models
.
CharField
(
max_length
=
32
,
default
=
""
)
crawler
=
models
.
CharField
(
max_length
=
32
,
default
=
""
)
crawler
=
models
.
CharField
(
max_length
=
64
,
default
=
""
)
type
=
models
.
CharField
(
max_length
=
32
,
default
=
''
)
url
=
models
.
URLField
(
default
=
""
)
...
...
catalog/models.pyc
View file @
fe43e886
No preview for this file type
catalog/templates/audioList.html
View file @
fe43e886
...
...
@@ -37,7 +37,7 @@
<tbody>
{% for p in publishers %}
<tr
class=
"odd gradeX"
>
<td>
{{p.name}}
</td>
<td>
<a
href=
"{% url 'audio'%}{{p.shortName}}"
>
{{p.name}}
</a>
</td>
<td>
{{p.shortName}}
</td>
<td><a
href=
"{{p.url}}"
target=
"blank"
>
{{p.url}}
</a></td>
<td>
{{p.date}}
</td>
...
...
catalog/templates/audioPlay.html
0 → 100644
View file @
fe43e886
{% extends "base_generic.html" %}
{% load humanize %}
{% block dash-title %}
<b>
{{publisher.name}}
</b>
{% endblock %}
{% block dash %}
<!-- /.row -->
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
{{publisher.name}}
</div>
<!-- /.panel-heading -->
<div
class=
"panel-body"
>
<div
id=
"cal1"
>
holas
</div>
<!-- /.table-responsive -->
</div>
<!-- /.panel-body -->
</div>
<!-- /.panel -->
</div>
<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
{% endblock %}
{% block scripts %}
<script>
$
(
document
).
ready
(
function
()
{
$
(
'#dataTables-example'
).
DataTable
({
responsive
:
true
,
"language"
:
{
"url"
:
"/static/languages/Spanish.json"
}
});
});
</script>
{% endblock %}
catalog/templates/index.html
View file @
fe43e886
...
...
@@ -140,7 +140,7 @@
</div>
</div>
</div>
<a
href=
"{% url 'audio
-list'%}?{{ request.GET.urlencode }
}"
>
<a
href=
"{% url 'audio
'%
}"
>
<div
class=
"panel-footer"
>
<span
class=
"pull-left"
>
Ver lista
</span>
<span
class=
"pull-right"
><i
class=
"fa fa-arrow-circle-right"
></i></span>
...
...
catalog/urls.py
View file @
fe43e886
...
...
@@ -12,7 +12,8 @@ urlpatterns = [
url
(
r'^ws/news/$'
,
views
.
wsNewsList
,
name
=
'ws-news-list'
),
url
(
r'^ws/graphs/$'
,
views
.
wsGraphs
,
name
=
'ws-graphs'
),
url
(
r'^ws/download/$'
,
views
.
wsDownloadNews
,
name
=
'ws-download-news'
),
url
(
r'^audio/$'
,
views
.
audioList
,
name
=
'audio-list'
),
url
(
r'^audio/$'
,
views
.
audioList
,
name
=
'audio'
),
url
(
r'^audio/(?P<publisher>\w+)$'
,
views
.
audioPublisher
,
name
=
'audio'
),
]
catalog/urls.pyc
View file @
fe43e886
No preview for this file type
catalog/views.py
View file @
fe43e886
...
...
@@ -238,5 +238,12 @@ def audioList(request):
publishers
=
Publisher
.
objects
.
all
()
.
filter
(
type
=
"audio"
)
return
render
(
request
,
'audioList.html'
,{
"form"
:
form
,
"publishers"
:
publishers
})
#-------------------------------------------------------------------------------
def
audioPublisher
(
request
,
publisher
):
form
=
SearchForm
(
request
.
GET
)
info
=
dict
()
if
Publisher
.
objects
.
all
()
.
filter
(
shortName
=
publisher
)
.
count
()
>
0
:
p
=
Publisher
.
objects
.
all
()
.
filter
(
shortName
=
publisher
)[
0
]
return
render
(
request
,
'audioPlay.html'
,{
"form"
:
form
,
"publisher"
:
p
})
catalog/views.pyc
View file @
fe43e886
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment