i did first and second steps
but what about 
DROPBOX_OAUTH2_TOKEN = your token from dropbox
did you mean Generate access token ??
DROPBOX_ROOT_PATH = your root path to store media
did you mean link to Dropbox app folder ?
thanks
On Thursday, June 13, 2019 at 6:15:02 PM UTC+2, Joe Reitman wrote:
>
> Omar, 
>
> You should not be configuring views for Dropbox. DJANGO-STORAGES does all 
> the back end coding for you.
>
> Follow these steps from DJANGO-STORAGES documentation after removing the 
> code changes you made to views. I'm assuming your using pip.
>
> 1. pip install django-storages
> 2. pip install dropbox
> 3. In your settings.py set these variables
>     DEFAULT_FILE_STORAGE = 'storages.backends.dropbox.DropBoxStorage'
>     DROPBOX_OAUTH2_TOKEN = your token from dropbox
>     DROPBOX_ROOT_PATH = your root path to store media
> FROM THE DROPBOX DOCUMENTATION TUTORIAL YOU ONLY NEED TO REGISTER YOUR 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 <https://django-imagekit.readthedocs.io/en/latest/> 
> on this one
>
> Now you need to have an imagefield in your model and config your admin.py 
> as I explained earlier. 
> I highly recommend creating an app to do this functionality. 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 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 i should use aws but 
>> it's not free ?
>> is there any solution ?
>> how can i use Heroku postgres (addons) to upload my files permanently .. 
>> thanks in advance
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/729a3c5a-ad59-4386-8ac0-1772fa36c583%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to