agusmakmun / django-log-viewer

Django Log Viewer allows you to read & download log files in the admin page
https://pypi.org/project/django-log-viewer/
MIT License
74 stars 30 forks source link

Add: URL for download log file #13

Closed kwangsooshin closed 4 years ago

kwangsooshin commented 4 years ago

resolved #8

  1. Add URL for download all log file (log_viewer/download.zip)
  2. Add URL for download each log file (log_viewer/download/{file_name})
  3. code refactoring
    • class TemplateView(_TemplateView) -> to reuse view code
    • move get_log_files function -> to reuse function code
agusmakmun commented 4 years ago

@kwangsooshin thank for the new PR. does it download for all logs? can you change it please to "download per-file" and add button download into template.

kwangsooshin commented 4 years ago

@kwangsooshin thank for the new PR. does it download for all logs? can you change it please to "download per-file" and add button download into template.

@agusmakmun I can make links for download each log file. But I don't know to add button download into template. So, Can you add a download button?

agusmakmun commented 4 years ago

@kwangsooshin for sure. you just need to add the download links. then I will render it at the template.

kwangsooshin commented 4 years ago

@agusmakmun It is completed. Add URL for downloading each log file. It is worked by: download/{file_name}

kwangsooshin commented 4 years ago

wait for a moment plz

kwangsooshin commented 4 years ago

It is done!

agusmakmun commented 4 years ago

Here we go, now you can use it @kwangsooshin :tada: :tada: :tada:

pip install django-log-viewer --upgrade