Merge remote-tracking branch 'origin/master' into twitter_api
This commit is contained in:
+2
-3
@@ -1,9 +1,8 @@
|
||||
venv
|
||||
*.pyc
|
||||
staticfiles
|
||||
media
|
||||
media/feed-icons
|
||||
.env
|
||||
*.sqlite3
|
||||
*.sqlite
|
||||
app_be/db/
|
||||
waecm-2021-group-04.egg-info
|
||||
app_be/migrations
|
||||
|
||||
+8
-6
@@ -1,19 +1,21 @@
|
||||
FROM python:3.8-slim
|
||||
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y build-essential gcc
|
||||
|
||||
RUN python -m venv /opt/venv
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
|
||||
RUN python -m pip install --upgrade pip
|
||||
RUN apt-get update; \
|
||||
apt-get install -y build-essential gcc; \
|
||||
python -m venv /opt/venv; \
|
||||
python -m pip install --upgrade pip;
|
||||
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
|
||||
RUN mkdir /code
|
||||
|
||||
WORKDIR /code
|
||||
|
||||
COPY setup.py /code/
|
||||
COPY requirements.txt /code/
|
||||
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
COPY . /code/
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
@@ -6,14 +6,10 @@ class User(models.Model):
|
||||
pass
|
||||
|
||||
|
||||
class Icon(models.Model):
|
||||
image = models.ImageField(upload_to='feed_icons')
|
||||
|
||||
|
||||
class Feed(models.Model):
|
||||
url = models.TextField(blank=False, null=False, validators=[URLValidator(['http', 'https'])])
|
||||
active = models.BooleanField()
|
||||
icon = models.FileField(upload_to='feed-icons', blank=True, null=True,
|
||||
icon = models.FileField(upload_to='feed-icons', blank=True, null=False, default='default-icon.svg',
|
||||
validators=[FileExtensionValidator(['png', 'svg'])])
|
||||
keywords = models.TextField(blank=False, null=False)
|
||||
match_all_keywords = models.BooleanField(blank=True, default=False)
|
||||
@@ -25,7 +21,7 @@ class FeedEntry(models.Model):
|
||||
|
||||
|
||||
class Tweet(models.Model):
|
||||
icon = models.ForeignKey(Icon, on_delete=models.CASCADE, null=True)
|
||||
feed = models.ForeignKey(Feed, null=True, on_delete=models.SET_NULL)
|
||||
text = models.CharField(max_length=137)
|
||||
date_time = models.DateTimeField()
|
||||
url = models.CharField(max_length=100)
|
||||
|
||||
Reference in New Issue
Block a user