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 <omark...@gmail.com <javascript:>> 
> 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 <omark...@gmail.com> 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 <omark...@gmail.com> 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 <omark...@gmail.com> 
>>>>>> 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
>>>>>>>  
>>>>>>> <https://groups.google.com/d/msgid/django-users/3d50f417-cceb-4141-9b6d-9d2f5d0feee4%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>> 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
>>>>>  
>>>>> <https://groups.google.com/d/msgid/django-users/e8763fdb-d559-4d5b-9274-a59c7c0e9198%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> 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 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/4f99e57d-ec92-4336-abda-37f671e188c6%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/django-users/4f99e57d-ec92-4336-abda-37f671e188c6%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> 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 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 <javascript:>.
> To post to this group, send email to django...@googlegroups.com 
> <javascript:>.
> 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/499f5ed2-b5ff-4474-8690-47c826b6fb91%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-users/499f5ed2-b5ff-4474-8690-47c826b6fb91%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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/f9228995-b4da-4592-9996-c449ac442715%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to