Re: my file uploads missing/deleted

2019-06-15 Thread Joe Reitman
Did you create a processed image field in your model?

On Friday, June 14, 2019 at 7:50:41 AM UTC-5, omar ahmed wrote:
>
> ok i did all steps but it still doesn't work .. this is my settings.py 
> file :
> PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
> STATIC_URL = '/static/'
> STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static')
> STATICFILES_STORAGE = 
> 'whitenoise.storage.CompressedManifestStaticFilesStorage'
>
> DEFAULT_FILE_STORAGE = 'storages.backends.dropbox.DropBoxStorage'
> DROPBOX_OAUTH2_TOKEN = 
> 'hSRexFBHo-AAWVBZOhZJo6jrIP3NgMK0L_7aWHkb0mJs-z4IWO6b_EBk'
> DROPBOX_ROOT_PATH = '/arenaimages/'
>
> and this is admin.py :
> from django.contrib import admin
> from imagekit.admin import AdminThumbnail
> from .models import MapData
> # Register your models here.
>
> from .models import League, LeagueNews, Comment, Club, Match
> admin.site.register(League)
> admin.site.register(LeagueNews)
> admin.site.register(Comment)
>
> class ClubAdmin(admin.ModelAdmin):
> fields = ['league_names', 'name', 'year_of_establishment', 'logo', 'won', 
> 'draw', 'lost', 'total_points', 'goal_for', 'goal_against', 'goal_diff']
> logo = AdminThumbnail(image_field='image')
> readonly_fields = ('total_points', 'goal_diff',)
>
> admin.site.register(Club, ClubAdmin)
> admin.site.register(Match)
> thanks joe
>
> On Friday, June 14, 2019 at 12:31:31 PM UTC+2, Joe Reitman wrote:
>>
>> Yes. Generate an access token from your Dropbox App Console and put it in 
>> your settings.py. The token is used to authenticate your Django app with 
>> your Dropbox app.
>>
>> DROPBOX_ROOT_PATH is the folder in your Dropbox App where you want to 
>> store your photos. You need to define it with this variable in settings.py.
>>  Typically I call it 'images' like this:  
>> DROPBOX_ROOT_PATH = '/images/'
>>
>>
>> On Thursday, June 13, 2019 at 3:44:20 PM UTC-5, omar ahmed wrote:
>>>
>>> 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/10cb129c-3dc1-4a0e-ae7c-68a665c93dca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: my file uploads missing/deleted

2019-06-14 Thread omar ahmed
ok i did all steps but it still doesn't work .. this is my settings.py file 
:
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static')
STATICFILES_STORAGE = 
'whitenoise.storage.CompressedManifestStaticFilesStorage'

DEFAULT_FILE_STORAGE = 'storages.backends.dropbox.DropBoxStorage'
DROPBOX_OAUTH2_TOKEN = 
'hSRexFBHo-AAWVBZOhZJo6jrIP3NgMK0L_7aWHkb0mJs-z4IWO6b_EBk'
DROPBOX_ROOT_PATH = '/arenaimages/'

and this is admin.py :
from django.contrib import admin
from imagekit.admin import AdminThumbnail
from .models import MapData
# Register your models here.

from .models import League, LeagueNews, Comment, Club, Match
admin.site.register(League)
admin.site.register(LeagueNews)
admin.site.register(Comment)

class ClubAdmin(admin.ModelAdmin):
fields = ['league_names', 'name', 'year_of_establishment', 'logo', 'won', 
'draw', 'lost', 'total_points', 'goal_for', 'goal_against', 'goal_diff']
logo = AdminThumbnail(image_field='image')
readonly_fields = ('total_points', 'goal_diff',)

admin.site.register(Club, ClubAdmin)
admin.site.register(Match)
thanks joe

On Friday, June 14, 2019 at 12:31:31 PM UTC+2, Joe Reitman wrote:
>
> Yes. Generate an access token from your Dropbox App Console and put it in 
> your settings.py. The token is used to authenticate your Django app with 
> your Dropbox app.
>
> DROPBOX_ROOT_PATH is the folder in your Dropbox App where you want to 
> store your photos. You need to define it with this variable in settings.py.
>  Typically I call it 'images' like this:  
> DROPBOX_ROOT_PATH = '/images/'
>
>
> On Thursday, June 13, 2019 at 3:44:20 PM UTC-5, omar ahmed wrote:
>>
>> 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/cbb27d35-5fbf-492e-8953-e474306e43ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: my file uploads missing/deleted

2019-06-14 Thread Joe Reitman
Yes. Generate an access token from your Dropbox App Console and put it in 
your settings.py. The token is used to authenticate your Django app with 
your Dropbox app.

DROPBOX_ROOT_PATH is the folder in your Dropbox App where you want to store 
your photos. You need to define it with this variable in settings.py.
 Typically I call it 'images' like this:  
DROPBOX_ROOT_PATH = '/images/'


On Thursday, June 13, 2019 at 3:44:20 PM UTC-5, omar ahmed wrote:
>
> 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/422af022-76b5-418d-9e21-e32de851de1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: my file uploads missing/deleted

2019-06-13 Thread omar ahmed
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.


Re: my file uploads missing/deleted

2019-06-13 Thread Joe Reitman
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/7fa4e41b-1f34-47e6-a481-c8026910cdcb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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.2.1
> Python Version: 3.6.8
> Installed Applications:
> ['core.apps.CoreConfig',
>  'django.contrib.admin',
>  'django.contrib.auth',
>  'django.contrib.contenttypes',
>  'django.contrib.sessions',
>  'django.contrib.messages',
>  'django.contrib.staticfiles',
>  'django_social_share',
>  'django_dropbox_storage']
> Installed Middleware:
> ('whitenoise.middleware.WhiteNoiseMiddleware',
>  'django.middleware.security.SecurityMiddleware',
>  'whitenoise.middleware.WhiteNoiseMiddleware',
>  'django.contrib.sessions.middleware.SessionMiddleware',
>  'django.middleware.common.CommonMiddleware',
>  'django.middleware.csrf.CsrfViewMiddleware',
>  'django.contrib.auth.middleware.AuthenticationMiddleware',
>  'django.contrib.messages.middleware.MessageMiddleware',
>  'django.middleware.clickjacking.XFrameOptionsMiddleware')
>
>
> Template error:
> In template /app/templates/base.html, error at line 10
>No module named 'StringIO'
>1 : {% load static %}
>2 :
>3 :
>4 : 
>5 : https://fonts.googleapis.com/css?family=Bitter;
> rel="stylesheet">
>6 : https://fonts.googleapis.com/css?family=Merriweather;
> rel="stylesheet">
>7 : 
>8 : 
>9 : {% block title %}{% endblock %}
>10 : https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css;
> integr ity="sha384-ggOyR0i
> XCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
> crossorigin="anonymous">
>11 : 
>12 : 
>13 : 
>14 : 
>15 :
>16 :
>17 :
>18 :   {% if user.is_authenticated %}
>19 :logged in as {{ user.username }}
>20 :  {% endif %}
>
>
> Traceback:
>
> File
> "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py"
> in _resolve_lookup
>   829. current = current[bit]
>
> During handling of the above exception ('ImageFieldFile' object is not
> subscriptable), another exception occurred:
>
> File
> "/app/.heroku/python/lib/python3.6/site-packages/django_dropbox_storage/storage.py"
> in 
>   6. from cStringIO import StringIO
>
> During handling of the above exception (No module named 'cStringIO'),
> another exception occurred:
>
> File
> "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/exception.py"
> in inner
>   34. response = get_response(request)
>
> File
> "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py"
> in _get_response
>   115. response = self.process_exception_by_middleware(e,
> request)
>
> File
> "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py"
> in _get_response
>   113. response = wrapped_callback(request,
> *callback_args, **callback_kwargs)
>
> File "/app/core/views.py" in clubpage
>   86. return render(request, 'core/clubpage.html', {'club':club,
> 'news':news})
>
> File "/app/.heroku/python/lib/python3.6/site-packages/django/shortcuts.py"
> in render
>   36. content = loader.render_to_string(template_name, context,
> request, using=using)
>
> File
> "/app/.heroku/python/lib/python3.6/site-packages/django/template/loader.py"
> in render_to_string
>   62. return template.render(context, request)
>
> File
> "/app/.heroku/python/lib/python3.6/site-packages/django/template/backends/django.py"
> in render
>   61. return self.template.render(context)
>
> File
> "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py"
> in render
>   171. return self._render(context)
>
> File
> "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py"
> in _render
>   163. return self.nodelist.render(context)
>
> File
> "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py"
> in render
>   937. bit = node.render_annotated(context)
>
> File
> "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py"
> in render_annotated
>   904. return self.render(context)
>
> File
> "/app/.heroku/python/lib/python3.6/site-packages/django/template/loader_tags.py"
> in render
>   150. return compiled_parent._render(context)
>
> File
> "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py"
> in _render
>   163. return self.nodelist.render(context)
>
> File
> "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py"
> in render
>   937. bit = node.render_annotated(context)
>
> File
> "/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py"
> in render_annotated
>   904. return self.render(context)
>
> File
> 

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 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
>> 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 but no similar issues
>>
>> On Thursday, June 13, 2019 at 1:03:10 AM UTC+2, James Farris wrote:
>>>
>>> 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, 2019 at 3:53 PM omar ahmed  wrote:
>>>
 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
 connect_to_dropbox()
 and what about

 for entry in dbx.files_list_folder('').entries:
 print(entry.name)



 On Thursday, June 13, 2019 at 12:38:11 AM UTC+2, James Farris wrote:
>
> 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_dropbox():
> dbx = dropbox.Dropbox(‘your access token)
> dbx.users_get_current_account()
>
> # this stuff likely would go in a separate function
> for entry in dbx.files_list_folder(‘’).entries:
> print(entry.name)
>
>
> At some point in your code you would call the function:
> connect_to_dropbox()
>
> On Wed, Jun 12, 2019 at 3:10 PM omar ahmed  wrote:
>
>> 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
>>
>> for entry in dbx.files_list_folder('').entries:
>> print(entry.name)
>>
>> where should i write these commands ?
>> thanks
>>
>> On Wednesday, June 12, 2019 at 1:13:11 AM UTC+2, James Farris wrote:
>>>
>>> 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/backends/dropbox.html
>>>
>>>
>>>
>>> On Tue, Jun 11, 2019 at 2:17 PM omar ahmed 
>>> wrote:
>>>
 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 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 being that it seems like 
> he
> read through the documentation, my question is where is he stuck in 
> the
> Dropbox implementation?

 --
 You received this message because you are subscribed to a topic in
 the Google Groups "Django users" group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/django-users/8O8BS7DhF30/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to
 django...@googlegroups.com.
 To post to this group, send email to django...@googlegroups.com.
 Visit 

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.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django_social_share',
 'django_dropbox_storage']
Installed Middleware:
('whitenoise.middleware.WhiteNoiseMiddleware',
 'django.middleware.security.SecurityMiddleware',
 'whitenoise.middleware.WhiteNoiseMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware')


Template error:
In template /app/templates/base.html, error at line 10
   No module named 'StringIO'
   1 : {% load static %}
   2 : 
   3 : 
   4 : 
   5 : https://fonts.googleapis.com/css?family=Bitter; 
rel="stylesheet">
   6 : https://fonts.googleapis.com/css?family=Merriweather; 
rel="stylesheet">
   7 : 
   8 : 
   9 : {% block title %}{% endblock %}
   10 : https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css; 
integr ity="sha384-ggOyR0i 
XCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" 
crossorigin="anonymous">
   11 : 
   12 : 
   13 : 
   14 : 
   15 : 
   16 :
   17 :  
   18 :   {% if user.is_authenticated %}
   19 :logged in as {{ user.username }}
   20 :  {% endif %}


Traceback:

File 
"/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py" 
in _resolve_lookup
  829. current = current[bit]

During handling of the above exception ('ImageFieldFile' object is not 
subscriptable), another exception occurred:

File 
"/app/.heroku/python/lib/python3.6/site-packages/django_dropbox_storage/storage.py"
 
in 
  6. from cStringIO import StringIO

During handling of the above exception (No module named 'cStringIO'), 
another exception occurred:

File 
"/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/exception.py"
 
in inner
  34. response = get_response(request)

File 
"/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py" 
in _get_response
  115. response = self.process_exception_by_middleware(e, 
request)

File 
"/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py" 
in _get_response
  113. response = wrapped_callback(request, *callback_args, 
**callback_kwargs)

File "/app/core/views.py" in clubpage
  86. return render(request, 'core/clubpage.html', {'club':club, 
'news':news})

File "/app/.heroku/python/lib/python3.6/site-packages/django/shortcuts.py" 
in render
  36. content = loader.render_to_string(template_name, context, 
request, using=using)

File 
"/app/.heroku/python/lib/python3.6/site-packages/django/template/loader.py" 
in render_to_string
  62. return template.render(context, request)

File 
"/app/.heroku/python/lib/python3.6/site-packages/django/template/backends/django.py"
 
in render
  61. return self.template.render(context)

File 
"/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py" 
in render
  171. return self._render(context)

File 
"/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py" 
in _render
  163. return self.nodelist.render(context)

File 
"/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py" 
in render
  937. bit = node.render_annotated(context)

File 
"/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py" 
in render_annotated
  904. return self.render(context)

File 
"/app/.heroku/python/lib/python3.6/site-packages/django/template/loader_tags.py"
 
in render
  150. return compiled_parent._render(context)

File 
"/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py" 
in _render
  163. return self.nodelist.render(context)

File 
"/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py" 
in render
  937. bit = node.render_annotated(context)

File 
"/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py" 
in render_annotated
  904. return self.render(context)

File 
"/app/.heroku/python/lib/python3.6/site-packages/django/template/loader_tags.py"
 
in render
  62. result = block.nodelist.render(context)

File 
"/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py" 
in render
  937. bit = node.render_annotated(context)

File 
"/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py" 
in render_annotated
  

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 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 
> 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 but no similar issues
>
> On Thursday, June 13, 2019 at 1:03:10 AM UTC+2, James Farris wrote:
>>
>> 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, 2019 at 3:53 PM omar ahmed  wrote:
>>
>>> 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  
>>> connect_to_dropbox()
>>> and what about 
>>>
>>> for entry in dbx.files_list_folder('').entries:
>>> print(entry.name)
>>>
>>>
>>>
>>> On Thursday, June 13, 2019 at 12:38:11 AM UTC+2, James Farris wrote:

 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_dropbox():
 dbx = dropbox.Dropbox(‘your access token)
 dbx.users_get_current_account()

 # this stuff likely would go in a separate function
 for entry in dbx.files_list_folder(‘’).entries:
 print(entry.name)


 At some point in your code you would call the function:
 connect_to_dropbox()

 On Wed, Jun 12, 2019 at 3:10 PM omar ahmed  wrote:

> 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
>
> for entry in dbx.files_list_folder('').entries:
> print(entry.name)
>
> where should i write these commands ?
> thanks
>
> On Wednesday, June 12, 2019 at 1:13:11 AM UTC+2, James Farris wrote:
>>
>> 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/backends/dropbox.html
>>
>>
>>
>> On Tue, Jun 11, 2019 at 2:17 PM omar ahmed  
>> wrote:
>>
>>> 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 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 being that it seems like 
 he 
 read through the documentation, my question is where is he stuck in 
 the 
 Dropbox implementation?
>>>
>>> -- 
>>> You received this message because you are subscribed to a topic in 
>>> the Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/django-users/8O8BS7DhF30/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to 
>>> django...@googlegroups.com.
>>> To post to this group, send email to django...@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/3d50f417-cceb-4141-9b6d-9d2f5d0feee4%40googlegroups.com

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 
> 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 but no similar issues
> 
>> On Thursday, June 13, 2019 at 1:03:10 AM UTC+2, James Farris wrote:
>> 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, 2019 at 3:53 PM omar ahmed  wrote:
>>> 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  
>>> connect_to_dropbox()
>>> and what about 
>>> for entry in dbx.files_list_folder('').entries:
>>> print(entry.name)
>>> 
>>> 
>>> 
 On Thursday, June 13, 2019 at 12:38:11 AM UTC+2, James Farris wrote:
 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_dropbox():
 dbx = dropbox.Dropbox(‘your access token)
 dbx.users_get_current_account()
 
 # this stuff likely would go in a separate function
 for entry in dbx.files_list_folder(‘’).entries:
 print(entry.name)
 
 
 At some point in your code you would call the function:
 connect_to_dropbox()
 
> On Wed, Jun 12, 2019 at 3:10 PM omar ahmed  wrote:
> 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
> 
> for entry in dbx.files_list_folder('').entries:
> print(entry.name)
> where should i write these commands ?
> thanks
> 
> 
>> On Wednesday, June 12, 2019 at 1:13:11 AM UTC+2, James Farris wrote:
>> 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/backends/dropbox.html
>> 
>> 
>> 
>>> On Tue, Jun 11, 2019 at 2:17 PM omar ahmed  wrote:
>>> 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 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 being that it seems like he 
 read through the documentation, my question is where is he stuck in 
 the Dropbox implementation?
> 
>>> -- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/django-users/8O8BS7DhF30/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> django...@googlegroups.com.
>>> To post to this group, send email to django...@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/3d50f417-cceb-4141-9b6d-9d2f5d0feee4%40googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to a topic in the 
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit 

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 but no similar issues

On Thursday, June 13, 2019 at 1:03:10 AM UTC+2, James Farris wrote:
>
> 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, 2019 at 3:53 PM omar ahmed  > wrote:
>
>> 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  
>> connect_to_dropbox()
>> and what about 
>>
>> for entry in dbx.files_list_folder('').entries:
>> print(entry.name)
>>
>>
>>
>> On Thursday, June 13, 2019 at 12:38:11 AM UTC+2, James Farris wrote:
>>>
>>> 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_dropbox():
>>> dbx = dropbox.Dropbox(‘your access token)
>>> dbx.users_get_current_account()
>>>
>>> # this stuff likely would go in a separate function
>>> for entry in dbx.files_list_folder(‘’).entries:
>>> print(entry.name)
>>>
>>>
>>> At some point in your code you would call the function:
>>> connect_to_dropbox()
>>>
>>> On Wed, Jun 12, 2019 at 3:10 PM omar ahmed  wrote:
>>>
 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

 for entry in dbx.files_list_folder('').entries:
 print(entry.name)

 where should i write these commands ?
 thanks

 On Wednesday, June 12, 2019 at 1:13:11 AM UTC+2, James Farris wrote:
>
> 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/backends/dropbox.html
>
>
>
> On Tue, Jun 11, 2019 at 2:17 PM omar ahmed  wrote:
>
>> 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 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 being that it seems like 
>>> he 
>>> read through the documentation, my question is where is he stuck in the 
>>> Dropbox implementation?
>>
>> -- 
>> You received this message because you are subscribed to a topic in 
>> the Google Groups "Django users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/django-users/8O8BS7DhF30/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> django...@googlegroups.com.
>> To post to this group, send email to django...@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/3d50f417-cceb-4141-9b6d-9d2f5d0feee4%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
 You received this message because you are subscribed to a topic in the 
 Google Groups "Django users" group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/django-users/8O8BS7DhF30/unsubscribe.
 To unsubscribe from this group and 

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, 2019 at 3:53 PM omar ahmed  wrote:

> 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
> connect_to_dropbox()
> and what about
>
> for entry in dbx.files_list_folder('').entries:
> print(entry.name)
>
>
>
> On Thursday, June 13, 2019 at 12:38:11 AM UTC+2, James Farris wrote:
>>
>> 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_dropbox():
>> dbx = dropbox.Dropbox(‘your access token)
>> dbx.users_get_current_account()
>>
>> # this stuff likely would go in a separate function
>> for entry in dbx.files_list_folder(‘’).entries:
>> print(entry.name)
>>
>>
>> At some point in your code you would call the function:
>> connect_to_dropbox()
>>
>> On Wed, Jun 12, 2019 at 3:10 PM omar ahmed  wrote:
>>
>>> 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
>>>
>>> for entry in dbx.files_list_folder('').entries:
>>> print(entry.name)
>>>
>>> where should i write these commands ?
>>> thanks
>>>
>>> On Wednesday, June 12, 2019 at 1:13:11 AM UTC+2, James Farris wrote:

 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/backends/dropbox.html



 On Tue, Jun 11, 2019 at 2:17 PM omar ahmed  wrote:

> 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 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 being that it seems like he read
>> through the documentation, my question is where is he stuck in the 
>> Dropbox
>> implementation?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/8O8BS7DhF30/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> django...@googlegroups.com.
> To post to this group, send email to django...@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/3d50f417-cceb-4141-9b6d-9d2f5d0feee4%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
 --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/django-users/8O8BS7DhF30/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> django...@googlegroups.com.
>>> To post to this group, send email to django...@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/e8763fdb-d559-4d5b-9274-a59c7c0e9198%40googlegroups.com
>>> 
>>> .
>>> For more options, visit 

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  
connect_to_dropbox()
and what about 

for entry in dbx.files_list_folder('').entries:
print(entry.name)



On Thursday, June 13, 2019 at 12:38:11 AM UTC+2, James Farris wrote:
>
> 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_dropbox():
> dbx = dropbox.Dropbox(‘your access token)
> dbx.users_get_current_account()
>
> # this stuff likely would go in a separate function
> for entry in dbx.files_list_folder(‘’).entries:
> print(entry.name)
>
>
> At some point in your code you would call the function:
> connect_to_dropbox()
>
> On Wed, Jun 12, 2019 at 3:10 PM omar ahmed  > wrote:
>
>> 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
>>
>> for entry in dbx.files_list_folder('').entries:
>> print(entry.name)
>>
>> where should i write these commands ?
>> thanks
>>
>> On Wednesday, June 12, 2019 at 1:13:11 AM UTC+2, James Farris wrote:
>>>
>>> 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/backends/dropbox.html
>>>
>>>
>>>
>>> On Tue, Jun 11, 2019 at 2:17 PM omar ahmed  wrote:
>>>
 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 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 being that it seems like he read 
> through the documentation, my question is where is he stuck in the 
> Dropbox 
> implementation?

 -- 
 You received this message because you are subscribed to a topic in the 
 Google Groups "Django users" group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/django-users/8O8BS7DhF30/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 django...@googlegroups.com.
 To post to this group, send email to django...@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/3d50f417-cceb-4141-9b6d-9d2f5d0feee4%40googlegroups.com
  
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/django-users/8O8BS7DhF30/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> django...@googlegroups.com .
>> To post to this group, send email to django...@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/e8763fdb-d559-4d5b-9274-a59c7c0e9198%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
> *James Farris*
> Web Application Developer | Web and Digital Solutions
> External Relations & Advancement Marketing Communications
> University Development and Alumni Relations | UC Berkeley
> 510-664-4512 | jfa...@berkeley.edu 
>
>
>

-- 
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, 

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_dropbox():
dbx = dropbox.Dropbox(‘your access token)
dbx.users_get_current_account()

# this stuff likely would go in a separate function
for entry in dbx.files_list_folder(‘’).entries:
print(entry.name)


At some point in your code you would call the function:
connect_to_dropbox()

On Wed, Jun 12, 2019 at 3:10 PM omar ahmed  wrote:

> 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
>
> for entry in dbx.files_list_folder('').entries:
> print(entry.name)
>
> where should i write these commands ?
> thanks
>
> On Wednesday, June 12, 2019 at 1:13:11 AM UTC+2, James Farris wrote:
>>
>> 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/backends/dropbox.html
>>
>>
>>
>> On Tue, Jun 11, 2019 at 2:17 PM omar ahmed  wrote:
>>
>>> 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 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 being that it seems like he read
 through the documentation, my question is where is he stuck in the Dropbox
 implementation?
>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/django-users/8O8BS7DhF30/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> django...@googlegroups.com.
>>> To post to this group, send email to django...@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/3d50f417-cceb-4141-9b6d-9d2f5d0feee4%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/8O8BS7DhF30/unsubscribe.
> To unsubscribe from this group and all its topics, 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/e8763fdb-d559-4d5b-9274-a59c7c0e9198%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
*James Farris*
Web Application Developer | Web and Digital Solutions
External Relations & Advancement Marketing Communications
University Development and Alumni Relations | UC Berkeley
510-664-4512 | jfar...@berkeley.edu

-- 
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/CAMdMWAXKSRpKu6BA%2BzZSETp6sd6yN3WL7NnYVm%2BCxYKgN3ogBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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

for entry in dbx.files_list_folder('').entries:
print(entry.name)

where should i write these commands ?
thanks

On Wednesday, June 12, 2019 at 1:13:11 AM UTC+2, James Farris wrote:
>
> 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/backends/dropbox.html
>
>
>
> On Tue, Jun 11, 2019 at 2:17 PM omar ahmed  > wrote:
>
>> 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 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 being that it seems like he read 
>>> through the documentation, my question is where is he stuck in the Dropbox 
>>> implementation?
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/django-users/8O8BS7DhF30/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> django...@googlegroups.com .
>> To post to this group, send email to django...@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/3d50f417-cceb-4141-9b6d-9d2f5d0feee4%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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/e8763fdb-d559-4d5b-9274-a59c7c0e9198%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 
> 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 code. 
>
> from django.contrib import admin
> from imagekit.admin import AdminThumbnail
> from .models import MapData
>
>
> class PhotoAdmin(admin.ModelAdmin):
>
>  list_display = ('__str__', 'admin_thumbnail')
>  admin_thumbnail = AdminThumbnail(image_field='image')
>
>
> admin.site.register(MapData, PhotoAdmin) 
>
>
>
> It displays thumbnails of all the images stored in my database and 
> presents them in a list view in the Admin panel alongside the other model 
> data.
>
> On Tuesday, June 11, 2019 at 4:16:43 PM UTC-5, omar ahmed wrote:
>>
>> 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 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 being that it seems like he read 
>>> through the documentation, my question is where is he stuck in the Dropbox 
>>> implementation?
>>
>>

-- 
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/247e5719-c312-4803-a3a0-ec77b6f79141%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 code. 

from django.contrib import admin
from imagekit.admin import AdminThumbnail
from .models import MapData


class PhotoAdmin(admin.ModelAdmin):

 list_display = ('__str__', 'admin_thumbnail')
 admin_thumbnail = AdminThumbnail(image_field='image')


admin.site.register(MapData, PhotoAdmin) 



It displays thumbnails of all the images stored in my database and presents 
them in a list view in the Admin panel alongside the other model data.

On Tuesday, June 11, 2019 at 4:16:43 PM UTC-5, omar ahmed wrote:
>
> 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 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 being that it seems like he read 
>> through the documentation, my question is where is he stuck in the Dropbox 
>> implementation?
>
>

-- 
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/7e689c03-572f-46e5-ae4d-247141653a55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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/backends/dropbox.html



On Tue, Jun 11, 2019 at 2:17 PM omar ahmed  wrote:

> 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 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 being that it seems like he read
>> through the documentation, my question is where is he stuck in the Dropbox
>> implementation?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/8O8BS7DhF30/unsubscribe.
> To unsubscribe from this group and all its topics, 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/3d50f417-cceb-4141-9b6d-9d2f5d0feee4%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAMdMWAWR1zurFJbU-yPnojEJ_iLLLgXbE1VvthRQNHxzgS21Ow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 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 being that it seems like he read 
> through the documentation, my question is where is he stuck in the Dropbox 
> implementation?

-- 
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/3d50f417-cceb-4141-9b6d-9d2f5d0feee4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 being that it seems like he read through 
the documentation, my question is where is he stuck in the Dropbox 
implementation?

-- 
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/c19daa24-8b3c-43de-816f-b1c37f85450e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: my file uploads missing/deleted

2019-06-11 Thread Joe Reitman
Omar,

You need to put the image in your 'static' files directory. 





On Monday, June 10, 2019 at 2:37:58 PM UTC-5, omar ahmed wrote:
>
> almost i did all of these instructions 
> collectstatic - DEBUG = True  - install and use whitenoise in my app 
> the problem is heroku is ephemeral ( that's mean image clubs appear and 
> after one hour it disappear )
> i want to use something like Dropbox (permenant) but i don't know how to  
> make it my media folder 
>
>
> On Monday, June 10, 2019 at 10:57:23 AM UTC+2, Joe Reitman wrote:
>>
>> A couple of things to check.
>> > width="100">
>> 1. Is the photo located in directory above?
>> 2. Did you run collectstatic?
>> 3. In your settings.py are STATIC_ROOT, STATIC_URLS and STATICFILES_DIRS 
>> configured
>> 4. In your template you have setup like this example:
>>
>> {% load static %}
>>
>>
>> Also, it looks like you have DEBUG set to True. When DEBUG is set to 
>> True, Django will use it's development static file server to serve static 
>> files. However, setting DEBUG true in production is not recommended. 
>>
>> Note that when you set DEBUG to False, the Django static file server is 
>> disabled. Hence the need to host static files on a CDN *or* using a 
>> static file server like Whitenoise. You can serve static files within your 
>> Django app using Whitenoise <http://whitenoise.evans.io/en/stable/> and 
>> is recommended by Heroku 
>> <https://devcenter.heroku.com/articles/django-assets#whitenoise>. The 
>> other option is to serve static files from external sources.
>>
>> If you only have one photo, you can do what I suggested using codepen.io 
>> or surge.sh or almost any other remote storage that allows you to 
>> 'hotlink' <https://simple.wikipedia.org/wiki/Hotlinking> image files.
>>
>>
>> On Sunday, June 9, 2019 at 9:17:42 PM UTC-5, omar ahmed wrote:
>>>
>>> this is explanation for my problem 
>>> my site is for football news My Media Files are uploaded to the app but 
>>> then disappear  like clubs logo here 
>>> https://arena3.herokuapp.com/8/clubpage/
>>> when i created any club logo appear but after minutes disappear 
>>> i don't mean files uploaded by the users ( but by me in admin dashboard)
>>>
>>> On Sunday, June 9, 2019 at 11:16:19 PM UTC+2, Joe Reitman wrote:
>>>>
>>>> Omar,
>>>>
>>>> Looking at your original request I misunderstood what you wanted to do. 
>>>> I thought you wanted to configure media files which are uploaded by the 
>>>> user. 
>>>>
>>>> For static files you have many free options to store them and put the 
>>>> links in your img tags. If you have a codepen.io account, you can 
>>>> upload your images to codepen and use the links generated by codepen. 
>>>> Another option is to install surge.sh and upload images to a surge static 
>>>> site and then use the links to the images. If that makes sense.
>>>>
>>>> I have used both options to store my static files in various projects. 
>>>> These options are good for testing and development.
>>>>
>>>> On Sunday, June 9, 2019 at 9:07:01 AM UTC-5, omar ahmed wrote:
>>>>>
>>>>> i installed Dropbox for django environment 
>>>>> but how to link an account and adjust settings 
>>>>> tutorial is not clear
>>>>> thanks
>>>>>
>>>>> On Saturday, June 8, 2019 at 8:23:08 PM UTC+2, Joe Reitman wrote:
>>>>>>
>>>>>> Follow the django-storages documentation. 
>>>>>> https://django-storages.readthedocs.io/en/latest/backends/dropbox.html
>>>>>>
>>>>>> It'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 ..
>>>>>>>
>>>>>>> On Saturday, June 8, 2019 at 2: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.  
>>>>>>>>
>>>>>>>> On Friday, June 7, 2019 at 6:32:21 PM UTC-5, omar ahmed wrote:
>>>>>>>>>
>>>>>>>&

Re: my file uploads missing/deleted

2019-06-10 Thread omar ahmed
almost i did all of these instructions 
collectstatic - DEBUG = True  - install and use whitenoise in my app 
the problem is heroku is ephemeral ( that's mean image clubs appear and 
after one hour it disappear )
i want to use something like Dropbox (permenant) but i don't know how to  
make it my media folder 


On Monday, June 10, 2019 at 10:57:23 AM UTC+2, Joe Reitman wrote:
>
> A couple of things to check.
>  width="100">
> 1. Is the photo located in directory above?
> 2. Did you run collectstatic?
> 3. In your settings.py are STATIC_ROOT, STATIC_URLS and STATICFILES_DIRS 
> configured
> 4. In your template you have setup like this example:
>
> {% load static %}
>
>
> Also, it looks like you have DEBUG set to True. When DEBUG is set to True, 
> Django will use it's development static file server to serve static files. 
> However, setting DEBUG true in production is not recommended. 
>
> Note that when you set DEBUG to False, the Django static file server is 
> disabled. Hence the need to host static files on a CDN *or* using a 
> static file server like Whitenoise. You can serve static files within your 
> Django app using Whitenoise <http://whitenoise.evans.io/en/stable/> and 
> is recommended by Heroku 
> <https://devcenter.heroku.com/articles/django-assets#whitenoise>. The 
> other option is to serve static files from external sources.
>
> If you only have one photo, you can do what I suggested using codepen.io 
> or surge.sh or almost any other remote storage that allows you to 
> 'hotlink' <https://simple.wikipedia.org/wiki/Hotlinking> image files.
>
>
> On Sunday, June 9, 2019 at 9:17:42 PM UTC-5, omar ahmed wrote:
>>
>> this is explanation for my problem 
>> my site is for football news My Media Files are uploaded to the app but 
>> then disappear  like clubs logo here 
>> https://arena3.herokuapp.com/8/clubpage/
>> when i created any club logo appear but after minutes disappear 
>> i don't mean files uploaded by the users ( but by me in admin dashboard)
>>
>> On Sunday, June 9, 2019 at 11:16:19 PM UTC+2, Joe Reitman wrote:
>>>
>>> Omar,
>>>
>>> Looking at your original request I misunderstood what you wanted to do. 
>>> I thought you wanted to configure media files which are uploaded by the 
>>> user. 
>>>
>>> For static files you have many free options to store them and put the 
>>> links in your img tags. If you have a codepen.io account, you can 
>>> upload your images to codepen and use the links generated by codepen. 
>>> Another option is to install surge.sh and upload images to a surge static 
>>> site and then use the links to the images. If that makes sense.
>>>
>>> I have used both options to store my static files in various projects. 
>>> These options are good for testing and development.
>>>
>>> On Sunday, June 9, 2019 at 9:07:01 AM UTC-5, omar ahmed wrote:
>>>>
>>>> i installed Dropbox for django environment 
>>>> but how to link an account and adjust settings 
>>>> tutorial is not clear
>>>> thanks
>>>>
>>>> On Saturday, June 8, 2019 at 8:23:08 PM UTC+2, Joe Reitman wrote:
>>>>>
>>>>> Follow the django-storages documentation. 
>>>>> https://django-storages.readthedocs.io/en/latest/backends/dropbox.html
>>>>>
>>>>> It'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 ..
>>>>>>
>>>>>> On Saturday, June 8, 2019 at 2: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.  
>>>>>>>
>>>>>>> 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/709f4de2-4d78-48aa-8986-e76d9d15856e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: my file uploads missing/deleted

2019-06-10 Thread omar ahmed
hiii Sagar ..
what is your Error ?
i followed this tutorial 
https://medium.com/@BennettGarner/deploying-django-to-heroku-procfile-static-root-other-pitfalls-e7ab8b2ba33b
if you want to connect heroku postgres continue with this 
https://medium.com/@BennettGarner/deploying-django-to-heroku-connecting-heroku-postgres-fcc960d290d1
start by the first article and don't forget to use suitable version of 
python 
if you have errors just type 
heroku logs -tail
good luck

On Monday, June 10, 2019 at 7:18:08 AM UTC+2, sagar ninave wrote:
>
> omar ahmad i want to know how you have deployed your site on herokuapp, 
> because i am getting application error
>
> On Sat, Jun 8, 2019 at 5:02 AM 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...@googlegroups.com .
>> To post to this group, send email to django...@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/62dc15f9-3e2f-4681-b29c-873b8dd040b8%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/62dc15f9-3e2f-4681-b29c-873b8dd040b8%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> -- 
>
> <https://about.me/sagarninave?promo=email_sig_source=product_medium=email_sig_campaign=gmail_api_content=thumb>
>  
> sagar ninave
> about.me/sagarninave 
> <https://about.me/sagarninave?promo=email_sig_source=product_medium=email_sig_campaign=gmail_api_content=thumb>
>  
>

-- 
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/159062ae-afed-44d2-86f7-7b1f3a2e7d71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: my file uploads missing/deleted

2019-06-10 Thread Joe Reitman
A couple of things to check.

1. Is the photo located in directory above?
2. Did you run collectstatic?
3. In your settings.py are STATIC_ROOT, STATIC_URLS and STATICFILES_DIRS 
configured
4. In your template you have setup like this example:

{% load static %}


Also, it looks like you have DEBUG set to True. When DEBUG is set to True, 
Django will use it's development static file server to serve static files. 
However, setting DEBUG true in production is not recommended. 

Note that when you set DEBUG to False, the Django static file server is 
disabled. Hence the need to host static files on a CDN *or* using a static 
file server like Whitenoise. You can serve static files within your Django 
app using Whitenoise <http://whitenoise.evans.io/en/stable/> and is 
recommended by Heroku 
<https://devcenter.heroku.com/articles/django-assets#whitenoise>. The other 
option is to serve static files from external sources.

If you only have one photo, you can do what I suggested using codepen.io or 
surge.sh or almost any other remote storage that allows you to 'hotlink' 
<https://simple.wikipedia.org/wiki/Hotlinking> image files.


On Sunday, June 9, 2019 at 9:17:42 PM UTC-5, omar ahmed wrote:
>
> this is explanation for my problem 
> my site is for football news My Media Files are uploaded to the app but 
> then disappear  like clubs logo here 
> https://arena3.herokuapp.com/8/clubpage/
> when i created any club logo appear but after minutes disappear 
> i don't mean files uploaded by the users ( but by me in admin dashboard)
>
> On Sunday, June 9, 2019 at 11:16:19 PM UTC+2, Joe Reitman wrote:
>>
>> Omar,
>>
>> Looking at your original request I misunderstood what you wanted to do. I 
>> thought you wanted to configure media files which are uploaded by the user. 
>>
>> For static files you have many free options to store them and put the 
>> links in your img tags. If you have a codepen.io account, you can upload 
>> your images to codepen and use the links generated by codepen. Another 
>> option is to install surge.sh and upload images to a surge static site and 
>> then use the links to the images. If that makes sense.
>>
>> I have used both options to store my static files in various projects. 
>> These options are good for testing and development.
>>
>> On Sunday, June 9, 2019 at 9:07:01 AM UTC-5, omar ahmed wrote:
>>>
>>> i installed Dropbox for django environment 
>>> but how to link an account and adjust settings 
>>> tutorial is not clear
>>> thanks
>>>
>>> On Saturday, June 8, 2019 at 8:23:08 PM UTC+2, Joe Reitman wrote:
>>>>
>>>> Follow the django-storages documentation. 
>>>> https://django-storages.readthedocs.io/en/latest/backends/dropbox.html
>>>>
>>>> It'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 ..
>>>>>
>>>>> On Saturday, June 8, 2019 at 2: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.  
>>>>>>
>>>>>> 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/3a80b1a0-921f-4879-9384-cf07cfe71934%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: my file uploads missing/deleted

2019-06-09 Thread sagar ninave
omar ahmad i want to know how you have deployed your site on herokuapp,
because i am getting application error

On Sat, Jun 8, 2019 at 5:02 AM 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/62dc15f9-3e2f-4681-b29c-873b8dd040b8%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/62dc15f9-3e2f-4681-b29c-873b8dd040b8%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
<https://about.me/sagarninave?promo=email_sig_source=product_medium=email_sig_campaign=gmail_api_content=thumb>
sagar ninave
about.me/sagarninave
<https://about.me/sagarninave?promo=email_sig_source=product_medium=email_sig_campaign=gmail_api_content=thumb>

-- 
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/CAA6pdZ-EhhL9mUAOL1pLbP%2BngqSHhAWK9p4RPJcJ_wpH0ZZDoA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: my file uploads missing/deleted

2019-06-09 Thread omar ahmed
this is explanation for my problem 
my site is for football news My Media Files are uploaded to the app but 
then disappear  like clubs logo here 
https://arena3.herokuapp.com/8/clubpage/
when i created any club logo appear but after minutes disappear 
i don't mean files uploaded by the users ( but by me in admin dashboard)

On Sunday, June 9, 2019 at 11:16:19 PM UTC+2, Joe Reitman wrote:
>
> Omar,
>
> Looking at your original request I misunderstood what you wanted to do. I 
> thought you wanted to configure media files which are uploaded by the user. 
>
> For static files you have many free options to store them and put the 
> links in your img tags. If you have a codepen.io account, you can upload 
> your images to codepen and use the links generated by codepen. Another 
> option is to install surge.sh and upload images to a surge static site and 
> then use the links to the images. If that makes sense.
>
> I have used both options to store my static files in various projects. 
> These options are good for testing and development.
>
> On Sunday, June 9, 2019 at 9:07:01 AM UTC-5, omar ahmed wrote:
>>
>> i installed Dropbox for django environment 
>> but how to link an account and adjust settings 
>> tutorial is not clear
>> thanks
>>
>> On Saturday, June 8, 2019 at 8:23:08 PM UTC+2, Joe Reitman wrote:
>>>
>>> Follow the django-storages documentation. 
>>> https://django-storages.readthedocs.io/en/latest/backends/dropbox.html
>>>
>>> It'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 ..
>>>>
>>>> On Saturday, June 8, 2019 at 2: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.  
>>>>>
>>>>> 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/f84b72eb-ffb1-45ff-9310-687fb08ca96f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: my file uploads missing/deleted

2019-06-09 Thread Joe Reitman
Omar,

Looking at your original request I misunderstood what you wanted to do. I 
thought you wanted to configure media files which are uploaded by the user. 

For static files you have many free options to store them and put the links 
in your img tags. If you have a codepen.io account, you can upload your 
images to codepen and use the links generated by codepen. Another option is 
to install surge.sh and upload images to a surge static site and then use 
the links to the images. If that makes sense.

I have used both options to store my static files in various projects. 
These options are good for testing and development.

On Sunday, June 9, 2019 at 9:07:01 AM UTC-5, omar ahmed wrote:
>
> i installed Dropbox for django environment 
> but how to link an account and adjust settings 
> tutorial is not clear
> thanks
>
> On Saturday, June 8, 2019 at 8:23:08 PM UTC+2, Joe Reitman wrote:
>>
>> Follow the django-storages documentation. 
>> https://django-storages.readthedocs.io/en/latest/backends/dropbox.html
>>
>> It'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 ..
>>>
>>> On Saturday, June 8, 2019 at 2: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.  
>>>>
>>>> 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/ef83e64e-5f7e-4ead-baa7-81f075f0ef64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: my file uploads missing/deleted

2019-06-09 Thread omar ahmed
i installed Dropbox for django environment 
but how to link an account and adjust settings 
tutorial is not clear
thanks

On Saturday, June 8, 2019 at 8:23:08 PM UTC+2, Joe Reitman wrote:
>
> Follow the django-storages documentation. 
> https://django-storages.readthedocs.io/en/latest/backends/dropbox.html
>
> It'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 ..
>>
>> On Saturday, June 8, 2019 at 2: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.  
>>>
>>> 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/bc0e6575-28a7-4a11-b89d-028d3fdc2ead%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: my file uploads missing/deleted

2019-06-08 Thread Joe Reitman
Follow the django-storages documentation. 
https://django-storages.readthedocs.io/en/latest/backends/dropbox.html

It'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 ..
>
> On Saturday, June 8, 2019 at 2: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.  
>>
>> 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/f24cf69a-96e3-4d8f-b32b-3c5ec7bd604d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: my file uploads missing/deleted

2019-06-08 Thread omar ahmed
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 Dropbox which is free up to 2GB. I installed django-storages 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/
>> 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/b0f9c35d-c9f2-4cc3-9b8a-049127f22d10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: my file uploads missing/deleted

2019-06-07 Thread Joe Reitman
Omar,

I use Dropbox which is free up to 2GB. I installed django-storages 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/
> 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/4dce3eff-858e-4988-b01f-64e2d0479aa7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 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/62dc15f9-3e2f-4681-b29c-873b8dd040b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.