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
72672389
Commit
72672389
authored
Jun 16, 2023
by
Mario Chirinos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
migrations delete
parent
a6b9ba4a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
3 additions
and
203 deletions
+3
-203
0001_initial.py
catalog/migrations/0001_initial.py
+0
-32
0002_topic.py
catalog/migrations/0002_topic.py
+0
-27
0003_auto_20180214_1549.py
catalog/migrations/0003_auto_20180214_1549.py
+0
-40
0004_search.py
catalog/migrations/0004_search.py
+0
-29
0005_profile.py
catalog/migrations/0005_profile.py
+0
-26
0006_audiotime.py
catalog/migrations/0006_audiotime.py
+0
-25
0007_audiotime_enddate.py
catalog/migrations/0007_audiotime_enddate.py
+0
-22
views.py
catalog/views.py
+3
-2
No files found.
catalog/migrations/0001_initial.py
deleted
100644 → 0
View file @
a6b9ba4a
# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-14 15:48
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
initial
=
True
dependencies
=
[
]
operations
=
[
migrations
.
CreateModel
(
name
=
'Publisher'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'name'
,
models
.
CharField
(
max_length
=
128
)),
(
'shortName'
,
models
.
CharField
(
default
=
''
,
max_length
=
32
)),
(
'crawler'
,
models
.
CharField
(
default
=
''
,
max_length
=
64
)),
(
'type'
,
models
.
CharField
(
default
=
''
,
max_length
=
32
)),
(
'url'
,
models
.
URLField
(
default
=
''
)),
],
options
=
{
'verbose_name'
:
'Medio'
,
'verbose_name_plural'
:
'Medios'
,
'ordering'
:
(
'name'
,),
},
),
]
catalog/migrations/0002_topic.py
deleted
100644 → 0
View file @
a6b9ba4a
# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-14 15:49
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'catalog'
,
'0001_initial'
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'Topic'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'name'
,
models
.
CharField
(
max_length
=
256
,
verbose_name
=
'Tema'
)),
],
options
=
{
'verbose_name'
:
'Tema'
,
'verbose_name_plural'
:
'Temas'
,
'ordering'
:
(
'name'
,),
},
),
]
catalog/migrations/0003_auto_20180214_1549.py
deleted
100644 → 0
View file @
a6b9ba4a
# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-14 15:49
from
__future__
import
unicode_literals
import
django.contrib.postgres.indexes
import
django.contrib.postgres.search
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'catalog'
,
'0002_topic'
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'News'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'title'
,
models
.
CharField
(
max_length
=
512
)),
(
'date'
,
models
.
DateTimeField
(
verbose_name
=
'Publication Date'
)),
(
'text'
,
models
.
TextField
(
blank
=
True
,
default
=
''
,
verbose_name
=
'News Text'
)),
(
'url'
,
models
.
URLField
(
max_length
=
512
,
verbose_name
=
'URL'
)),
(
'search_vector'
,
django
.
contrib
.
postgres
.
search
.
SearchVectorField
(
null
=
True
)),
(
'publisher'
,
models
.
ForeignKey
(
default
=
''
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'catalog.Publisher'
)),
(
'topic'
,
models
.
ManyToManyField
(
blank
=
True
,
to
=
'catalog.Topic'
,
verbose_name
=
'Topic(s)'
)),
],
options
=
{
'verbose_name'
:
'Noticia'
,
'verbose_name_plural'
:
'Noticias'
,
'ordering'
:
(
'date'
,),
},
),
migrations
.
AddIndex
(
model_name
=
'news'
,
index
=
django
.
contrib
.
postgres
.
indexes
.
GinIndex
(
fields
=
[
'search_vector'
],
name
=
'catalog_new_search__62ed1c_gin'
),
),
]
catalog/migrations/0004_search.py
deleted
100644 → 0
View file @
a6b9ba4a
# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-14 15:49
from
__future__
import
unicode_literals
from
django.conf
import
settings
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
migrations
.
swappable_dependency
(
settings
.
AUTH_USER_MODEL
),
(
'catalog'
,
'0003_auto_20180214_1549'
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'Search'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'startDate'
,
models
.
DateTimeField
(
verbose_name
=
'Start Date'
)),
(
'endDate'
,
models
.
DateTimeField
(
verbose_name
=
'End Date'
)),
(
'text'
,
models
.
CharField
(
blank
=
True
,
max_length
=
128
)),
(
'publishers'
,
models
.
ManyToManyField
(
blank
=
True
,
to
=
'catalog.Publisher'
)),
(
'user'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
settings
.
AUTH_USER_MODEL
)),
],
),
]
catalog/migrations/0005_profile.py
deleted
100644 → 0
View file @
a6b9ba4a
# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-14 15:50
from
__future__
import
unicode_literals
from
django.conf
import
settings
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
migrations
.
swappable_dependency
(
settings
.
AUTH_USER_MODEL
),
(
'catalog'
,
'0004_search'
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'Profile'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'subscriptions'
,
models
.
ManyToManyField
(
to
=
'catalog.Publisher'
)),
(
'user'
,
models
.
OneToOneField
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
settings
.
AUTH_USER_MODEL
)),
],
),
]
catalog/migrations/0006_audiotime.py
deleted
100644 → 0
View file @
a6b9ba4a
# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-14 15:50
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'catalog'
,
'0005_profile'
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'audioTime'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'startDate'
,
models
.
DateTimeField
(
verbose_name
=
'Start Date'
)),
(
'minutes'
,
models
.
BigIntegerField
(
default
=
0
)),
(
'publisher'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'catalog.Publisher'
)),
],
),
]
catalog/migrations/0007_audiotime_enddate.py
deleted
100644 → 0
View file @
a6b9ba4a
# -*- coding: utf-8 -*-
# Generated by Django 1.11.18 on 2019-01-24 19:37
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
import
django.utils.timezone
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'catalog'
,
'0006_audiotime'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'audiotime'
,
name
=
'endDate'
,
field
=
models
.
DateTimeField
(
default
=
django
.
utils
.
timezone
.
now
,
verbose_name
=
'End Date'
),
preserve_default
=
False
,
),
]
catalog/views.py
View file @
72672389
...
...
@@ -50,6 +50,7 @@ from stop_words import get_stop_words
#from django.contrib.postgres.lookups import Unaccent
AUDIOPATH
=
"/home/geoint/M3_NFS/recordings/"
from
django.contrib.postgres.search
import
SearchQuery
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
...
...
@@ -114,8 +115,8 @@ def getNewsByRequest(request, values=None):
if
"text"
in
request
.
GET
and
request
.
GET
[
'text'
]
!=
"None"
and
request
.
GET
[
'text'
]
!=
""
:
# myQuery &= Q(text__search=request.GET['text'])
#
myQuery &= Q(search_vector=request.GET['text'])
myQuery
&=
Q
.
filter
(
search
=
request
.
GET
[
'text'
])
myQuery
&=
Q
(
search_vector
=
request
.
GET
[
'text'
])
# myQuery &= Q
(search=request.GET['text'])
print
(
myQuery
)
...
...
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