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_
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'
DEFAU
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
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 drop
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.
When you run the server does it give you any errors?
On Thu, Jun 13, 2019 at 8:12 AM omar ahmed wrote:
> i added django_dropbox_storage in installed apps in settings.py
> what should i add else ?
> thanks
> On Thursday, June 13, 2019 at 4:43:23 PM UTC+2, James Farris wrote:
>>
>> That means it w
and this was Traceback
Environment:
Request Method: GET
Request URL: https://arena3.herokuapp.com/8/clubpage/
Django Version: 2.2.1
Python Version: 3.6.8
Installed Applications:
['core.apps.CoreConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.con
i added django_dropbox_storage in installed apps in settings.py
what should i add else ?
thanks
On Thursday, June 13, 2019 at 4:43:23 PM UTC+2, James Farris wrote:
>
> That means it wasn’t installed or it wasn’t added to your settings.py file
> in the installed apps section
>
> Sent from my mobil
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
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
This python package may be a better choice for you, since I assume you want
all user generated content (images) to be stored in Dropbox.
This has pretty good documentation.
https://pypi.org/project/django-dropbox-storage/
If you use this package, remove the sample code I sent
On Wed, Jun 12, 20
i added this function at the end of views.py file
def connect_to_dropbox():
dbx = dropbox.Dropbox(‘your access token)
dbx.users_get_current_account()
and i put given access token from dropbox
then what about call
do you mean in any view function that will show page included images add
co
You would add this code to the views.py file, which is where the business
logic goes.
https://docs.djangoproject.com/en/2.2/topics/http/views/
Likely would add a class with properties and methods or a definition (a
function) like below:
For example in your apps views.py file:
def connect_to_dro
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
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
Omar,
To upload images from the Admin panel, you will have to configure your
apps' admin.py file. I use the django-imagekit package to manipulate user
uploaded images. This package also provides the ability to upload images
via the Admin panel with a couple lines of code. Here is my Admin.py co
You might try the docs from Dropbox
https://www.dropbox.com/developers/documentation/python#overview
You can checkout this project for ideas
https://github.com/singingwolfboy/django-with-dropbox
and here is documentation for django-storages
https://django-storages.readthedocs.io/en/latest/backend
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
He is saying these aren’t static files. It sounds like he uploads them using
the Django admin, which of course is like an end user on a client uploading
files to the media directory.
Since that is the case it sounds like the Dropbox option is the best.
Documentation was provided earlier. So be
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
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
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-connecti
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
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 d
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 (
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 up
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/drop
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 A
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
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
31 matches
Mail list logo