-
Notifications
You must be signed in to change notification settings - Fork 1
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/minio file upload #125
Conversation
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.
Looks good to me! Tested thoroughly on dev.
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.
General question, why are we calling it "manage files" while it could be called "temporary file storage"?
And are we describing somewhere why one might need it?
def generate_password(len: int) -> str: | ||
return "".join( | ||
secrets.choice(string.octdigits + string.ascii_uppercase + string.ascii_lowercase + string.digits) | ||
for i in range(len) | ||
) |
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.
Why aren't you using django's password generator? I believe, that this way is most probably insecure and exploitable
except IntegrityError: | ||
self.stdout.write(self.style.WARNING("User with the given username or email already exists.")) | ||
|
||
self.stdout.write(self.style.SUCCESS(f"Successfully created {i} users")) |
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.
If IntegrityError
is raised, then there should be less successful creations of users
|
||
|
||
@register.filter | ||
def dict_key(dictionary, key): |
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.
A couple of words about what is that would have helped understand its purpose. I feel like I get it, but still
Description
Ok, this is a big one. Sorry about that.
The main goal was to enable users to upload files in a simple manner. We decided that minio does the job.
After this PR, you can upload files with Minio using the S3-API and the UI.
How to test? Right now, this is up and running on serve-dev, so please go there and test it in different ways.
What have i done?
In addition: To help with the locust tests, i've made 5 django admin commands that populate the database with temp users, projects and apps. This should probably be a separate PR, but i included it so i could test it on dev simultaneously with the file manage part.
Let me know what you think!
Checklist
If you're unsure about any of the items below, don't hesitate to ask. We're here to help!
This is simply a reminder of what we are going to look for before merging your code.