Re: Help: 'django.utils.six.moves' is not a package

2018-04-10 Thread Derek Zeng
On Tue, Apr 10, 2018, 1:39 AM Babatunde Akinyanmi <tundeba...@gmail.com> wrote: > > > On Tue, 10 Apr 2018, 02:47 Derek Zeng, <zen1...@gmail.com> wrote: > >> I'm using django 2.0. >> What exactly is the purpose of django.utils.six.moves module? >> > A

Re: Help: 'django.utils.six.moves' is not a package

2018-04-09 Thread Derek Zeng
django 2 removed six and some library you are using still > hopes it exists. > > what django version are you using? > > On Mon, Apr 9, 2018 at 3:39 AM, Derek Zeng <zen1...@gmail.com> wrote: > >> I got the following error when running pytest in django. Help is >&

Help: 'django.utils.six.moves' is not a package

2018-04-08 Thread Derek Zeng
I got the following error when running pytest in django. Help is appreciated. This is the test I run import pytest from .factories import * @pytest.mark.django_db def test_with_client(client): PostFactory.create() # if commented out, the error is gone response = client.get('/') body =

Re: Django deployment

2018-03-25 Thread Derek Zeng
You may want to check out http://www.fabfile.org It's a fairly popular deployment tool for Python projects. It doesn't really matter what your local dev environment, but for the server it's relatively easier if it's Linux. -- You received this message because you are subscribed to the Google

Re: Django and graphs

2018-03-23 Thread Derek Zeng
What do you mean by Django extension? You can just use the Networkx in any django view controller and render the graph to svg using GraphViz. You can save the svg in database and then render it in a webpage. On Thursday, March 22, 2018 at 3:36:22 PM UTC-4, Mohsen wrote: > > Hi all: > > I am

Using Django Sessions

2018-03-23 Thread Derek Zeng
You can have a flag in cart class to mark if things are cleared. Then in the __iter__ function, check the flag before getting the keys. If you do this you also need to add the check in add/remove and others accordingly. -- You received this message because you are subscribed to the Google

Re: Building a calculator

2018-03-21 Thread Derek Zeng
Basically what you need is to store current selections/values in the session https://docs.djangoproject.com/en/2.0/topics/http/sessions/ Then access the session in the view and redirect accordingly. def my_ On Tuesday, March 20, 2018 at 4:29:00 PM UTC-4, Abbad yeslem wrote: > > Hello, > > I am

Re: from django.utils.six.moves import range, ImportError: cannot import name 'range'

2017-09-04 Thread Derek Zeng
instance will have > # inserted an importer with different class. > if (type(importer).__name__ == "_SixMetaPathImporter" and > importer.name == __name__): > del sys.meta_path[i] > break > > [1] https://docs.djangoproject.com/en/1.11/releases

Re: from django.utils.six.moves import range, ImportError: cannot import name 'range'

2017-09-04 Thread Derek Zeng
If I turn off debug mode, it gives me 500 error and showing the same stack trace in the console. I also tried 1.11.4, still the same error. On Mon, Sep 4, 2017 at 2:33 AM, Raffaele Salmaso <raffa...@salmaso.org> wrote: > On Sun, Sep 3, 2017 at 4:26 PM, Derek Zeng <zen1...@gmai

Re: from django.utils.six.moves import range, ImportError: cannot import name 'range'

2017-09-03 Thread Derek Zeng
it's the same in either versions of python. the output was captured when i was just debugging it in 3.5. On Sun, Sep 3, 2017 at 2:55 PM, James Schneider wrote: > > > File >

Re: from django.utils.six.moves import range, ImportError: cannot import name 'range'

2017-09-03 Thread Derek Zeng
ndle_simple from django.contrib.staticfiles.storage import staticfiles_storage File "/Users/coderek/Documents/projects/py3.5/lib/python3.5/site-packages/django/contrib/staticfiles/storage.py", line 21, in from django.utils.six.moves import range ImportError: cannot import name 'r

from django.utils.six.moves import range, ImportError: cannot import name 'range'

2017-09-02 Thread Derek Zeng
Hi, Today I tried to install my django project on a new mac computer. I used virutalenv to setup the packages. After I start the app by running './mange.py runserver' and access the home page I got the error from django.utils.six.moves import range, ImportError: cannot import name >