Django tests appear to be getting substantially slower

2019-06-15 Thread Mark Jones
I was fixing up a Django app https://github.com/mark0978/django-softdelete and 
setting up tox to make sure it worked with all the listed versions because 
of issues opened on the original repo.  While I was running tox locally I 
noticed that with every version of Django, the tests ran slower, and from 
1.8 -> 2.2 the test time was nearly doubled.  This was true for every 
version of python tested from 2.7 - 3.7.

If you want to check this on your machine, just grab the repo and run tox.  
I'm including the minimal tox output to show this phenomenon.

py27-A installed: DEPRECATION: Python 2.7 will reach the end of its life on 
January 1st, 2020. Please upgrade your Python as Python 2.7 won't be 
maintained after that date. A future version of pip will drop support for 
Python 2.7.,Django==1.8.19,-e 
git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete
--
Ran 14 tests in 2.821s

py27-B installed: DEPRECATION: Python 2.7 will reach the end of its life on 
January 1st, 2020. Please upgrade your Python as Python 2.7 won't be 
maintained after that date. A future version of pip will drop support for 
Python 2.7.,Django==1.9.13,-e 
git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete
--
Ran 14 tests in 3.036s

py27-C installed: DEPRECATION: Python 2.7 will reach the end of its life on 
January 1st, 2020. Please upgrade your Python as Python 2.7 won't be 
maintained after that date. A future version of pip will drop support for 
Python 2.7.,Django==1.10.8,-e 
git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete
--
Ran 14 tests in 3.198s

py27-D installed: DEPRECATION: Python 2.7 will reach the end of its life on 
January 1st, 2020. Please upgrade your Python as Python 2.7 won't be 
maintained after that date. A future version of pip will drop support for 
Python 2.7.,Django==1.11.21,-e 
git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete,pytz==2019.1
--
Ran 14 tests in 3.609s

py34-A installed: DEPRECATION: Python 3.4 support has been deprecated. pip 
19.1 will be the last one supporting it. Please upgrade your Python as 
Python 3.4 won't be maintained after March 2019 (cf PEP 
429).,Django==1.8.19,-e 
git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete
--
Ran 14 tests in 2.733s

py34-B installed: DEPRECATION: Python 3.4 support has been deprecated. pip 
19.1 will be the last one supporting it. Please upgrade your Python as 
Python 3.4 won't be maintained after March 2019 (cf PEP 
429).,Django==1.9.13,-e 
git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete
--
Ran 14 tests in 3.066s

py34-C installed: DEPRECATION: Python 3.4 support has been deprecated. pip 
19.1 will be the last one supporting it. Please upgrade your Python as 
Python 3.4 won't be maintained after March 2019 (cf PEP 
429).,Django==1.10.8,-e 
git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete
--
Ran 14 tests in 3.232s

py34-D installed: DEPRECATION: Python 3.4 support has been deprecated. pip 
19.1 will be the last one supporting it. Please upgrade your Python as 
Python 3.4 won't be maintained after March 2019 (cf PEP 
429).,Django==1.11.21,-e 
git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete,pytz==2019.1
--
Ran 14 tests in 3.564s

py34-E installed: DEPRECATION: Python 3.4 support has been deprecated. pip 
19.1 will be the last one supporting it. Please upgrade your Python as 
Python 3.4 won't be maintained after March 2019 (cf PEP 
429).,Django==2.0.13,-e 
git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete,pytz==2019.1
--
Ran 14 tests in 5.515s

py35-A installed: Django==1.8.19,-e 
git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete
--
Ran 14 tests in 2.603s

py35-B installed: Django==1.9.13,-e 
git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713c

Re: Django tests appear to be getting substantially slower

2019-06-15 Thread Simon Charette
Hi Mark,

It's hard to tell exactly what's going on without more details but assuming 
you are running tests
against SQLite the 2.1 to 2.2 slowdown is likely caused by the fact 
database constraints are
now checked of each TestCase[0].

Cheers,
Simon

[0] https://docs.djangoproject.com/en/2.2/releases/2.2/#tests


Le samedi 15 juin 2019 07:26:35 UTC-4, Mark Jones a écrit :
>
> I was fixing up a Django app https://github.com/mark0978/django-softdelete 
> and 
> setting up tox to make sure it worked with all the listed versions because 
> of issues opened on the original repo.  While I was running tox locally I 
> noticed that with every version of Django, the tests ran slower, and from 
> 1.8 -> 2.2 the test time was nearly doubled.  This was true for every 
> version of python tested from 2.7 - 3.7.
>
> If you want to check this on your machine, just grab the repo and run 
> tox.  I'm including the minimal tox output to show this phenomenon.
>
> py27-A installed: DEPRECATION: Python 2.7 will reach the end of its life 
> on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be 
> maintained after that date. A future version of pip will drop support for 
> Python 2.7.,Django==1.8.19,-e 
> git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete
> --
> Ran 14 tests in 2.821s
>
> py27-B installed: DEPRECATION: Python 2.7 will reach the end of its life 
> on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be 
> maintained after that date. A future version of pip will drop support for 
> Python 2.7.,Django==1.9.13,-e 
> git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete
> --
> Ran 14 tests in 3.036s
>
> py27-C installed: DEPRECATION: Python 2.7 will reach the end of its life 
> on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be 
> maintained after that date. A future version of pip will drop support for 
> Python 2.7.,Django==1.10.8,-e 
> git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete
> --
> Ran 14 tests in 3.198s
>
> py27-D installed: DEPRECATION: Python 2.7 will reach the end of its life 
> on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be 
> maintained after that date. A future version of pip will drop support for 
> Python 2.7.,Django==1.11.21,-e 
> git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete,pytz==2019.1
> --
> Ran 14 tests in 3.609s
>
> py34-A installed: DEPRECATION: Python 3.4 support has been deprecated. pip 
> 19.1 will be the last one supporting it. Please upgrade your Python as 
> Python 3.4 won't be maintained after March 2019 (cf PEP 
> 429).,Django==1.8.19,-e 
> git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete
> --
> Ran 14 tests in 2.733s
>
> py34-B installed: DEPRECATION: Python 3.4 support has been deprecated. pip 
> 19.1 will be the last one supporting it. Please upgrade your Python as 
> Python 3.4 won't be maintained after March 2019 (cf PEP 
> 429).,Django==1.9.13,-e 
> git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete
> --
> Ran 14 tests in 3.066s
>
> py34-C installed: DEPRECATION: Python 3.4 support has been deprecated. pip 
> 19.1 will be the last one supporting it. Please upgrade your Python as 
> Python 3.4 won't be maintained after March 2019 (cf PEP 
> 429).,Django==1.10.8,-e 
> git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete
> --
> Ran 14 tests in 3.232s
>
> py34-D installed: DEPRECATION: Python 3.4 support has been deprecated. pip 
> 19.1 will be the last one supporting it. Please upgrade your Python as 
> Python 3.4 won't be maintained after March 2019 (cf PEP 
> 429).,Django==1.11.21,-e 
> git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete,pytz==2019.1
> --
> Ran 14 tests in 3.564s
>
> py34-E installed: DEPRECATION: Python 3.4 support has been deprecated. pip 
> 19.1 will be the last one supporting it. Please upgrade your Python as 
> Python 3.4 won't be maintained after March 2019 (cf PEP 
> 429).,Django==2.0.13,-e 
> git+...@github.com:mark0978/django-softdelete.git@72b46b0

Re: Django tests appear to be getting substantially slower

2019-06-15 Thread Mark Jones
Maybe that's the case, I didn't build the python2.7 or 3.7, but I used
pyenv to install 3.4, 3.5, and 3.6 and they are all using the same version
of SQLite.  And with each version of python, the tests slow down as the
version of django increases.  Could this still be the SQLite v2.1->v2.2?

Django isn't getting slower as the version of python increases, it's
getting slower as the version of Django increases.

On Sat, Jun 15, 2019 at 7:20 AM Simon Charette  wrote:

> Hi Mark,
>
> It's hard to tell exactly what's going on without more details but
> assuming you are running tests
> against SQLite the 2.1 to 2.2 slowdown is likely caused by the fact
> database constraints are
> now checked of each TestCase[0].
>
> Cheers,
> Simon
>
> [0] https://docs.djangoproject.com/en/2.2/releases/2.2/#tests
>
>
> Le samedi 15 juin 2019 07:26:35 UTC-4, Mark Jones a écrit :
>>
>> I was fixing up a Django app
>> https://github.com/mark0978/django-softdelete and setting up tox to make
>> sure it worked with all the listed versions because of issues opened on the
>> original repo.  While I was running tox locally I noticed that with every
>> version of Django, the tests ran slower, and from 1.8 -> 2.2 the test time
>> was nearly doubled.  This was true for every version of python tested from
>> 2.7 - 3.7.
>>
>> If you want to check this on your machine, just grab the repo and run
>> tox.  I'm including the minimal tox output to show this phenomenon.
>>
>> py27-A installed: DEPRECATION: Python 2.7 will reach the end of its life
>> on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be
>> maintained after that date. A future version of pip will drop support for
>> Python 2.7.,Django==1.8.19,-e git+...@github.com:
>> mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d
>> #egg=django_softdelete
>> --
>> Ran 14 tests in 2.821s
>>
>> py27-B installed: DEPRECATION: Python 2.7 will reach the end of its life
>> on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be
>> maintained after that date. A future version of pip will drop support for
>> Python 2.7.,Django==1.9.13,-e git+...@github.com:
>> mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d
>> #egg=django_softdelete
>> --
>> Ran 14 tests in 3.036s
>>
>> py27-C installed: DEPRECATION: Python 2.7 will reach the end of its life
>> on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be
>> maintained after that date. A future version of pip will drop support for
>> Python 2.7.,Django==1.10.8,-e git+...@github.com:
>> mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d
>> #egg=django_softdelete
>> --
>> Ran 14 tests in 3.198s
>>
>> py27-D installed: DEPRECATION: Python 2.7 will reach the end of its life
>> on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be
>> maintained after that date. A future version of pip will drop support for
>> Python 2.7.,Django==1.11.21,-e git+...@github.com:
>> mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d
>> #egg=django_softdelete,pytz==2019.1
>> --
>> Ran 14 tests in 3.609s
>>
>> py34-A installed: DEPRECATION: Python 3.4 support has been deprecated.
>> pip 19.1 will be the last one supporting it. Please upgrade your Python as
>> Python 3.4 won't be maintained after March 2019 (cf PEP
>> 429).,Django==1.8.19,-e git+...@github.com:
>> mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d
>> #egg=django_softdelete
>> --
>> Ran 14 tests in 2.733s
>>
>> py34-B installed: DEPRECATION: Python 3.4 support has been deprecated.
>> pip 19.1 will be the last one supporting it. Please upgrade your Python as
>> Python 3.4 won't be maintained after March 2019 (cf PEP
>> 429).,Django==1.9.13,-e git+...@github.com:
>> mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d
>> #egg=django_softdelete
>> --
>> Ran 14 tests in 3.066s
>>
>> py34-C installed: DEPRECATION: Python 3.4 support has been deprecated.
>> pip 19.1 will be the last one supporting it. Please upgrade your Python as
>> Python 3.4 won't be maintained after March 2019 (cf PEP
>> 429).,Django==1.10.8,-e git+...@github.com:
>> mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d
>> #egg=django_softdelete
>> --
>> Ran 14 tests in 3.232s
>>
>> py34-D installed: DEPRECATION: Python 3.4 support has been deprecated.
>> pip 19.1 will be the last one supporting it. Please upgrade your Python as
>> Python 3.4 won't be maintained after March 2019 (

Re: Django tests appear to be getting substantially slower

2019-06-15 Thread Simon Charette
I meant Django 2.0 -> 2.1. As long as you are using Django 2.2 with SQLite 
3.20+
the slowdown I mentioned should be effective.

Simon

Le samedi 15 juin 2019 08:32:56 UTC-4, Mark Jones a écrit :
>
> Maybe that's the case, I didn't build the python2.7 or 3.7, but I used 
> pyenv to install 3.4, 3.5, and 3.6 and they are all using the same version 
> of SQLite.  And with each version of python, the tests slow down as the 
> version of django increases.  Could this still be the SQLite v2.1->v2.2?
>
> Django isn't getting slower as the version of python increases, it's 
> getting slower as the version of Django increases.
>
> On Sat, Jun 15, 2019 at 7:20 AM Simon Charette  > wrote:
>
>> Hi Mark,
>>
>> It's hard to tell exactly what's going on without more details but 
>> assuming you are running tests
>> against SQLite the 2.1 to 2.2 slowdown is likely caused by the fact 
>> database constraints are
>> now checked of each TestCase[0].
>>
>> Cheers,
>> Simon
>>
>> [0] https://docs.djangoproject.com/en/2.2/releases/2.2/#tests
>>
>>
>> Le samedi 15 juin 2019 07:26:35 UTC-4, Mark Jones a écrit :
>>>
>>> I was fixing up a Django app 
>>> https://github.com/mark0978/django-softdelete and setting up tox to 
>>> make sure it worked with all the listed versions because of issues opened 
>>> on the original repo.  While I was running tox locally I noticed that with 
>>> every version of Django, the tests ran slower, and from 1.8 -> 2.2 the test 
>>> time was nearly doubled.  This was true for every version of python tested 
>>> from 2.7 - 3.7.
>>>
>>> If you want to check this on your machine, just grab the repo and run 
>>> tox.  I'm including the minimal tox output to show this phenomenon.
>>>
>>> py27-A installed: DEPRECATION: Python 2.7 will reach the end of its life 
>>> on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be 
>>> maintained after that date. A future version of pip will drop support for 
>>> Python 2.7.,Django==1.8.19,-e 
>>> git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete
>>> --
>>> Ran 14 tests in 2.821s
>>>
>>> py27-B installed: DEPRECATION: Python 2.7 will reach the end of its life 
>>> on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be 
>>> maintained after that date. A future version of pip will drop support for 
>>> Python 2.7.,Django==1.9.13,-e 
>>> git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete
>>> --
>>> Ran 14 tests in 3.036s
>>>
>>> py27-C installed: DEPRECATION: Python 2.7 will reach the end of its life 
>>> on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be 
>>> maintained after that date. A future version of pip will drop support for 
>>> Python 2.7.,Django==1.10.8,-e 
>>> git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete
>>> --
>>> Ran 14 tests in 3.198s
>>>
>>> py27-D installed: DEPRECATION: Python 2.7 will reach the end of its life 
>>> on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be 
>>> maintained after that date. A future version of pip will drop support for 
>>> Python 2.7.,Django==1.11.21,-e 
>>> git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete,pytz==2019.1
>>> --
>>> Ran 14 tests in 3.609s
>>>
>>> py34-A installed: DEPRECATION: Python 3.4 support has been deprecated. 
>>> pip 19.1 will be the last one supporting it. Please upgrade your Python as 
>>> Python 3.4 won't be maintained after March 2019 (cf PEP 
>>> 429).,Django==1.8.19,-e 
>>> git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete
>>> --
>>> Ran 14 tests in 2.733s
>>>
>>> py34-B installed: DEPRECATION: Python 3.4 support has been deprecated. 
>>> pip 19.1 will be the last one supporting it. Please upgrade your Python as 
>>> Python 3.4 won't be maintained after March 2019 (cf PEP 
>>> 429).,Django==1.9.13,-e 
>>> git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete
>>> --
>>> Ran 14 tests in 3.066s
>>>
>>> py34-C installed: DEPRECATION: Python 3.4 support has been deprecated. 
>>> pip 19.1 will be the last one supporting it. Please upgrade your Python as 
>>> Python 3.4 won't be maintained after March 2019 (cf PEP 
>>> 429).,Django==1.10.8,-e 
>>> git+...@github.com:mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d#egg=django_softdelete
>>> 

Re: Django channels on IIS

2019-06-15 Thread Daniel Butler
No you haven’t missed anything I spoke too soon. I was able to get the regular 
site running using fastcgi. I hope to revisit this once the regular site is in 
production. It’s too bad we are on Windows server R2

-- 
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/a7381016-2d75-47a5-b89a-4bfa95bbe12e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 
  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: Django tests appear to be getting substantially slower

2019-06-15 Thread Mark Jones
Ah, but the slowdown is happening from 1.8 forward, each version of Django
make things just a bit slower.  It's a gradual slowdown.

I do think I've got 3.2x libsqlite though.  So we can account for the
slowdown on 2.1 -> 2.2

/usr/lib/libsqlite3.0.dylib
/usr/lib/libsqlite3.dylib
/usr/local/Cellar/sqlite/3.27.1/lib/libsqlite3.0.dylib
/usr/local/Cellar/sqlite/3.27.1/lib/libsqlite3.a
/usr/local/Cellar/sqlite/3.27.1/lib/libsqlite3.dylib
/usr/local/Cellar/sqlite/3.28.0/lib/libsqlite3.0.dylib
/usr/local/Cellar/sqlite/3.28.0/lib/libsqlite3.a
/usr/local/Cellar/sqlite/3.28.0/lib/libsqlite3.dylib


On Sat, Jun 15, 2019 at 8:16 AM Simon Charette  wrote:

> I meant Django 2.0 -> 2.1. As long as you are using Django 2.2 with SQLite
> 3.20+
> the slowdown I mentioned should be effective.
>
> Simon
>
> Le samedi 15 juin 2019 08:32:56 UTC-4, Mark Jones a écrit :
>>
>> Maybe that's the case, I didn't build the python2.7 or 3.7, but I used
>> pyenv to install 3.4, 3.5, and 3.6 and they are all using the same version
>> of SQLite.  And with each version of python, the tests slow down as the
>> version of django increases.  Could this still be the SQLite v2.1->v2.2?
>>
>> Django isn't getting slower as the version of python increases, it's
>> getting slower as the version of Django increases.
>>
>> On Sat, Jun 15, 2019 at 7:20 AM Simon Charette  wrote:
>>
>>> Hi Mark,
>>>
>>> It's hard to tell exactly what's going on without more details but
>>> assuming you are running tests
>>> against SQLite the 2.1 to 2.2 slowdown is likely caused by the fact
>>> database constraints are
>>> now checked of each TestCase[0].
>>>
>>> Cheers,
>>> Simon
>>>
>>> [0] https://docs.djangoproject.com/en/2.2/releases/2.2/#tests
>>>
>>>
>>> Le samedi 15 juin 2019 07:26:35 UTC-4, Mark Jones a écrit :

 I was fixing up a Django app
 https://github.com/mark0978/django-softdelete and setting up tox to
 make sure it worked with all the listed versions because of issues opened
 on the original repo.  While I was running tox locally I noticed that with
 every version of Django, the tests ran slower, and from 1.8 -> 2.2 the test
 time was nearly doubled.  This was true for every version of python tested
 from 2.7 - 3.7.

 If you want to check this on your machine, just grab the repo and run
 tox.  I'm including the minimal tox output to show this phenomenon.

 py27-A installed: DEPRECATION: Python 2.7 will reach the end of its
 life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't
 be maintained after that date. A future version of pip will drop support
 for Python 2.7.,Django==1.8.19,-e git+...@github.com:
 mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d
 #egg=django_softdelete
 --
 Ran 14 tests in 2.821s

 py27-B installed: DEPRECATION: Python 2.7 will reach the end of its
 life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't
 be maintained after that date. A future version of pip will drop support
 for Python 2.7.,Django==1.9.13,-e git+...@github.com:
 mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d
 #egg=django_softdelete
 --
 Ran 14 tests in 3.036s

 py27-C installed: DEPRECATION: Python 2.7 will reach the end of its
 life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't
 be maintained after that date. A future version of pip will drop support
 for Python 2.7.,Django==1.10.8,-e git+...@github.com:
 mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d
 #egg=django_softdelete
 --
 Ran 14 tests in 3.198s

 py27-D installed: DEPRECATION: Python 2.7 will reach the end of its
 life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't
 be maintained after that date. A future version of pip will drop support
 for Python 2.7.,Django==1.11.21,-e git+...@github.com:
 mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d
 #egg=django_softdelete,pytz==2019.1
 --
 Ran 14 tests in 3.609s

 py34-A installed: DEPRECATION: Python 3.4 support has been deprecated.
 pip 19.1 will be the last one supporting it. Please upgrade your Python as
 Python 3.4 won't be maintained after March 2019 (cf PEP
 429).,Django==1.8.19,-e git+...@github.com:
 mark0978/django-softdelete.git@72b46b0a7823a4fdcb43489663e90713ca7d698d
 #egg=django_softdelete
 --
 Ran 14 tests in 2.733s

 py34-B installed: DEPRECATION: Python 3.4 support has been deprecated.
 pip 19.1 will

Re: Django channels on IIS

2019-06-15 Thread Daniel Butler
My plan to get this to work is to have daphine handle websockets and iis
normal http. I don’t know how to configure iis to allow that though. Any
ideas or direction would be much appreciated

On Sat, Jun 15, 2019 at 9:36 AM Daniel Butler  wrote:

> No you haven’t missed anything I spoke too soon. I was able to get the
> regular site running using fastcgi. I hope to revisit this once the regular
> site is in production. It’s too bad we are on Windows server R2
>
> --
> 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/O-VoFGoQHbs/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/a7381016-2d75-47a5-b89a-4bfa95bbe12e%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Daniel Butler

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


Regarding learning of CGI and socket programming

2019-06-15 Thread Tanishq kokcha
Hey there!
I am a student in final year of my engineering and i am currently looking for a 
resource to learn CGI and socket programming,  i would be glad if someone help 
me out for this

Thanking you

-- 
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/8bac8ec0-ba7d-4bb8-a733-a87ded4c4d5a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.