Re: my file uploads missing/deleted

2019-06-15 Thread Joe Reitman
; APP AND GENERATE YOUR OAUTH2 TOKEN. DISREGARD THE 'LINK YOUR ACCOUNT'. >>>> DJANGO STORAGES DOES THAT FOR YOU. >>>> >>>> 4. pip install django-imagekit and add it to your settings.py >>>> 'installed apps' -read the docs >

Re: my file uploads missing/deleted

2019-06-14 Thread omar ahmed
>>> 4. pip install django-imagekit and add it to your settings.py 'installed >>> apps' -read the docs <https://django-imagekit.readthedocs.io/en/latest/> >>> on this one >>> >>> Now you need to have an imagefield in your model and co

Re: my file uploads missing/deleted

2019-06-14 Thread Joe Reitman
unctionality. Call it >> something like 'logo upload'. Django best practices says an app does one >> thing and does it well. >> >> >> On Friday, June 7, 2019 at 6:32:21 PM UTC-5, omar ahmed wrote: >>> >>> hii .. >>> i deployed my fi

Re: my file uploads missing/deleted

2019-06-13 Thread omar ahmed
something like 'logo upload'. Django best practices says an app does one > thing and does it well. > > > On Friday, June 7, 2019 at 6:32:21 PM UTC-5, omar ahmed wrote: >> >> hii .. >> i deployed my first django app on Heroku https://arena3.herokuapp.com/

Re: my file uploads missing/deleted

2019-06-13 Thread Joe Reitman
June 7, 2019 at 6:32:21 PM UTC-5, omar ahmed wrote: > > hii .. > i deployed my first django app on Heroku https://arena3.herokuapp.com/ > but my media files ( like club logo ) disappear or deleted ... > i found this article on Heroku > https://help.heroku.com/K1PPS2WM/why-are-my

Re: my file uploads missing/deleted

2019-06-13 Thread James Farris
A quick google search took me here https://stackoverflow.com/questions/11914472/stringio-in-python3 On Thu, Jun 13, 2019 at 8:23 AM omar ahmed wrote: > and this was Traceback > Environment: > > > Request Method: GET > Request URL: https://arena3.herokuapp.com/8/clubpage/ > > Django Version: 2.

Re: my file uploads missing/deleted

2019-06-13 Thread James Farris
When you run the server does it give you any errors? On Thu, Jun 13, 2019 at 8:12 AM omar ahmed wrote: > i added django_dropbox_storage in installed apps in settings.py > what should i add else ? > thanks > On Thursday, June 13, 2019 at 4:43:23 PM UTC+2, James Farris wrote: >> >> That means it w

Re: my file uploads missing/deleted

2019-06-13 Thread omar ahmed
and this was Traceback Environment: Request Method: GET Request URL: https://arena3.herokuapp.com/8/clubpage/ Django Version: 2.2.1 Python Version: 3.6.8 Installed Applications: ['core.apps.CoreConfig', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.con

Re: my file uploads missing/deleted

2019-06-13 Thread omar ahmed
i added django_dropbox_storage in installed apps in settings.py what should i add else ? thanks On Thursday, June 13, 2019 at 4:43:23 PM UTC+2, James Farris wrote: > > That means it wasn’t installed or it wasn’t added to your settings.py file > in the installed apps section > > Sent from my mobil

Re: my file uploads missing/deleted

2019-06-13 Thread James Farris
That means it wasn’t installed or it wasn’t added to your settings.py file in the installed apps section Sent from my mobile device > On Jun 13, 2019, at 7:07 AM, omar ahmed wrote: > > i followed the steps > when i typed > python manage.py test [--settings=test_settings] > i found this error

Re: my file uploads missing/deleted

2019-06-13 Thread omar ahmed
i followed the steps when i typed python manage.py test [--settings=test_settings] i found this error ModuleNotFoundError: No module named '[--settings=test_settings]' and when i tried to open my site (club page that has image) i foun this error No module named 'StringIO' i searched at Google

Re: my file uploads missing/deleted

2019-06-12 Thread James Farris
This python package may be a better choice for you, since I assume you want all user generated content (images) to be stored in Dropbox. This has pretty good documentation. https://pypi.org/project/django-dropbox-storage/ If you use this package, remove the sample code I sent On Wed, Jun 12, 20

Re: my file uploads missing/deleted

2019-06-12 Thread omar ahmed
i added this function at the end of views.py file def connect_to_dropbox(): dbx = dropbox.Dropbox(‘your access token) dbx.users_get_current_account() and i put given access token from dropbox then what about call do you mean in any view function that will show page included images add co

Re: my file uploads missing/deleted

2019-06-12 Thread James Farris
You would add this code to the views.py file, which is where the business logic goes. https://docs.djangoproject.com/en/2.2/topics/http/views/ Likely would add a class with properties and methods or a definition (a function) like below: For example in your apps views.py file: def connect_to_dro

Re: my file uploads missing/deleted

2019-06-12 Thread omar ahmed
i opened the documentation for django-storages ... and i installed Dropbox in my environment and i created my app folder but i didn't complete docs . somethings not clear ... like : Link an account dbx = dropbox.Dropbox('YOUR_ACCESS_TOKEN') dbx.users_get_current_account() Try some API requests

Re: my file uploads missing/deleted

2019-06-12 Thread omar ahmed
can django-imagekit upload my images without (Dropbox or AWS s3 ) ? On Wednesday, June 12, 2019 at 4:34:23 PM UTC+2, Joe Reitman wrote: > > Omar, > > To upload images from the Admin panel, you will have to configure your > apps' admin.py file. I use the django-imagekit package to manipulate user

Re: my file uploads missing/deleted

2019-06-12 Thread Joe Reitman
Omar, To upload images from the Admin panel, you will have to configure your apps' admin.py file. I use the django-imagekit package to manipulate user uploaded images. This package also provides the ability to upload images via the Admin panel with a couple lines of code. Here is my Admin.py co

Re: my file uploads missing/deleted

2019-06-11 Thread James Farris
You might try the docs from Dropbox https://www.dropbox.com/developers/documentation/python#overview You can checkout this project for ideas https://github.com/singingwolfboy/django-with-dropbox and here is documentation for django-storages https://django-storages.readthedocs.io/en/latest/backend

Re: my file uploads missing/deleted

2019-06-11 Thread omar ahmed
yes James you are right i need to upload images using the Django admin, ... how can i use Dropbox for this issue ? i need a good tutorial On Tuesday, June 11, 2019 at 6:14:10 PM UTC+2, James Farris wrote: > > He is saying these aren’t static files. It sounds like he uploads them > using the

Re: my file uploads missing/deleted

2019-06-11 Thread James Farris
He is saying these aren’t static files. It sounds like he uploads them using the Django admin, which of course is like an end user on a client uploading files to the media directory. Since that is the case it sounds like the Dropbox option is the best. Documentation was provided earlier. So be

Re: my file uploads missing/deleted

2019-06-11 Thread Joe Reitman
27;s easy to setup. >>>>>> >>>>>> On Saturday, June 8, 2019 at 8:23:17 AM UTC-5, omar ahmed wrote: >>>>>>> >>>>>>> ok joe how can i use Dropbox for this issue .. >>>>>>> >>>>>&

Re: my file uploads missing/deleted

2019-06-10 Thread omar ahmed
t;>> ok joe how can i use Dropbox for this issue .. >>>>>> >>>>>> On Saturday, June 8, 2019 at 2:59:20 AM UTC+2, Joe Reitman wrote: >>>>>>> >>>>>>> Omar, >>>>>>> >>>>>>> I use

Re: my file uploads missing/deleted

2019-06-10 Thread omar ahmed
leted ... >> i found this article on Heroku >> https://help.heroku.com/K1PPS2WM/why-are-my-file-uploads-missing-deleted >> >> that means The Heroku filesystem is ephermal and i should use aws but >> it's not free ? >> is there any solution ? >> how

Re: my file uploads missing/deleted

2019-06-10 Thread Joe Reitman
59:20 AM UTC+2, Joe Reitman wrote: >>>>>> >>>>>> Omar, >>>>>> >>>>>> I use Dropbox which is free up to 2GB. I installed django-storages >>>>>> library to make setting up Dropbox easy. >>>>>> >>

Re: my file uploads missing/deleted

2019-06-09 Thread sagar ninave
appear or deleted ... > i found this article on Heroku > https://help.heroku.com/K1PPS2WM/why-are-my-file-uploads-missing-deleted > that means The Heroku filesystem is ephermal and i should use aws but it's > not free ? > is there any solution ? > how can i use Heroku post

Re: my file uploads missing/deleted

2019-06-09 Thread omar ahmed
ary to make setting up Dropbox easy. >>>>> >>>>> On Friday, June 7, 2019 at 6:32:21 PM UTC-5, omar ahmed wrote: >>>>>> >>>>>> hii .. >>>>>> i deployed my first django app on Heroku >>>>>> https://arena3.he

Re: my file uploads missing/deleted

2019-06-09 Thread Joe Reitman
ges >>>> library to make setting up Dropbox easy. >>>> >>>> On Friday, June 7, 2019 at 6:32:21 PM UTC-5, omar ahmed wrote: >>>>> >>>>> hii .. >>>>> i deployed my first django app on Heroku https://arena3.herokuapp.com/

Re: my file uploads missing/deleted

2019-06-09 Thread omar ahmed
t;>>> i deployed my first django app on Heroku https://arena3.herokuapp.com/ >>>> but my media files ( like club logo ) disappear or deleted ... >>>> i found this article on Heroku >>>> https://help.heroku.com/K1PPS2WM/why-are-my-file-uploads-missing-de

Re: my file uploads missing/deleted

2019-06-08 Thread Joe Reitman
t;> >>> hii .. >>> i deployed my first django app on Heroku https://arena3.herokuapp.com/ >>> but my media files ( like club logo ) disappear or deleted ... >>> i found this article on Heroku >>> https://help.heroku.com/K1PPS2WM/why-are-my-file-uploads-m

Re: my file uploads missing/deleted

2019-06-08 Thread omar ahmed
9 at 6:32:21 PM UTC-5, omar ahmed wrote: >> >> hii .. >> i deployed my first django app on Heroku https://arena3.herokuapp.com/ >> but my media files ( like club logo ) disappear or deleted ... >> i found this article on Heroku >> https://help.heroku.com/K1PPS2WM/w

Re: my file uploads missing/deleted

2019-06-07 Thread Joe Reitman
( like club logo ) disappear or deleted ... > i found this article on Heroku > https://help.heroku.com/K1PPS2WM/why-are-my-file-uploads-missing-deleted > that means The Heroku filesystem is ephermal and i should use aws but it's > not free ? > is there any solution ?

my file uploads missing/deleted

2019-06-07 Thread omar ahmed
hii .. i deployed my first django app on Heroku https://arena3.herokuapp.com/ but my media files ( like club logo ) disappear or deleted ... i found this article on Heroku https://help.heroku.com/K1PPS2WM/why-are-my-file-uploads-missing-deleted that means The Heroku filesystem is ephermal and