New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/event upload image #294
Changes from 55 commits
779de2d
6370ef2
7f38da9
585559a
2de8430
cc5e89a
b554a5a
e364e34
3cd5f53
9100b61
44e3959
058e4fa
35dd94d
5e84f4b
5fadcd2
64bb94e
3f4a6eb
26ab391
2c48e0b
5a69ad1
253fbfe
223d9eb
24f1238
23a3370
4a564a4
2cf277b
8d57810
b60f072
a0bc8b5
5c4a4cf
f33b495
b5f9250
b259334
0ecef90
cd7823e
8a8a3ff
06c2c5e
8623667
e148c2f
1e7d167
33571af
6b428a2
a99cc30
a91a57a
f31a796
4a27e52
7218c80
a19d484
baef690
5463b9b
5a12423
5cd61fa
0421816
c80e241
db9e200
3bf1200
800a8a9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,10 @@ PSQL_ENVIRONMENT = False | |
MEDIA_DIRECTORY = 'media' | ||
PICTURE_EXTENSION = '.png' | ||
AVATAR_SIZE = (120, 120) | ||
"""For security reasons, set the upload path to a local absolute path. | ||
Or for testing environment - just specify a folder name | ||
that will be created under /app/""" | ||
UPLOAD_DIRECTORY = 'event_images' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @yammesicka this is the comment in the config example to explain to users it's preferable to use a local directory. |
||
|
||
|
||
# DEFAULT WEBSITE LANGUAGE | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,6 +103,7 @@ class Event(Base): | |
invitees = Column(String) | ||
privacy = Column(String, default=PrivacyKinds.Public.name, nullable=False) | ||
emotion = Column(String, nullable=True) | ||
image = Column(String, nullable=True) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think it's actually a String, unless you converted it to some textual format as base64. In any other case, it's probably Binary or something like that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's str as it is just the file name (similar to what was done on upload profile image) |
||
availability = Column(Boolean, default=True, nullable=False) | ||
|
||
owner_id = Column(Integer, ForeignKey("users.id")) | ||
|
@@ -497,6 +498,7 @@ class InternationalDays(Base): | |
|
||
# insert language data | ||
|
||
|
||
# Credit to adrihanu https://stackoverflow.com/users/9127249/adrihanu | ||
# https://stackoverflow.com/questions/17461251 | ||
def insert_data(target, session: Session, **kw): | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,4 +130,3 @@ msgstr "" | |
|
||
#~ msgid "Agenda" | ||
#~ msgstr "" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,4 +130,3 @@ msgstr "בדיקת תרגום בפייתון" | |
|
||
#~ msgid "Agenda" | ||
#~ msgstr "" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,4 +47,4 @@ | |
├── test_categories.py | ||
├── test_email.py | ||
├── test_event.py | ||
└── test_profile.py | ||
└── test_profile.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer # before each line - docstring are reserved for general documentation