Re: How to add more fields to each ManyToMany Field in Django?

2017-09-04 Thread Mark Phillips
I replied to your StackOverflow question. An error in your through model caused the no such table error. Keep in mind that web pages are only generated once, and then presented to the user. If you want the page to display the cost of the course based on the university you pick on this page in the

Re: Processing data sent by sockets in django-channels

2017-09-04 Thread Andrew Godwin
Hi, I don't keep track of stack overflow so I don't know if anybody else would answer stuff there. Secondly, I replied to a very similar question you asked on this list last week - is this the same problem as that? Andrew On Mon, Sep 4, 2017 at 1:45 AM, Samuel Muiruri

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

2017-09-04 Thread Melvyn Sopacua
Is it possible you create your virtual environments with global site-packages? >From what I'm seeing this is caused primarily by version mismatches of the six library and using OS site-packages with virtualenv would certainly do it as setuptools and pip both use six. The difference with 1.10/1.11

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

2017-09-04 Thread Derek Zeng
Hi Melvyn, Renaming MIDDELWARE_CLASSES doesn't help either. These are the requirements I have: django==1.10.5 djangorestframework markdown django-filter django-jinja pytest factory_boy fabric3 pytest-django feedparser==5.2.1 pytz PyYAML lxml requests django-extensions Werkzeug

How to add more fields to each ManyToMany Field in Django?

2017-09-04 Thread Omer Iqbal
Hi, Is it possible to add one or more field (Char Field) to the options of ManyToMany field? My current models result in this: *My Models:* class engineeringUni(models.Model): field2 = models.CharField(max_length=200) des_eng =

Re: Tests broken when I have two database in settings

2017-09-04 Thread Melvyn Sopacua
Did you read the documentation on this? https://docs.djangoproject.com/en/1.11/topics/testing/advanced/#tests-and-multiple-databases On Mon, Sep 4, 2017 at 3:16 PM, Rodrigo Braga wrote: > Hello, > > I have troubles when I try running tests with two databases configured. > > I

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

2017-09-04 Thread Melvyn Sopacua
Rename MIDDLEWARE_CLASSES to MIDDLEWARE in settings to see if that changes anything. If not, remove one by one (except static). There are some changes to the static files middleware [1], but I can't really relate that to your error. Is there anything in your project requirements that also uses

Tests broken when I have two database in settings

2017-09-04 Thread Rodrigo Braga
Hello, I have troubles when I try running tests with two databases configured. I have migrations with RunPython (where the problem occurs). I opened a thread on Stackoverflow [1] but without answers yet. * sorry my English [1]

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 wrote: > On Sun, Sep 3, 2017 at 4:26 PM, Derek Zeng wrote: >>

Re: Python 2 versus 3

2017-09-04 Thread Ari Davidow
Python 2 in general is reaching end of life. If you have the time to make the transition to Python 3 now, it will be significantly easier to maintain your installation (or any other python application) moving forward. ari On Mon, Sep 4, 2017 at 2:04 AM, BIJAL MANIAR wrote: >

Re: Channels - Forward messages from a third party async source.

2017-09-04 Thread Dan Tagg
Hi Roger, Have you seen Diamond (http://diamond.readthedocs.io/en/latest/) it may be just what you need on the client side. Graphite (the server process) runs on Django. Dan On 1 September 2017 at 11:56, Roger Gammans wrote: > Hi all, > > I'm trying to build a

Re: Channels - Forward messages from a third party async source.

2017-09-04 Thread Roger Gammans
Andrew, Thanks for that. Is there is anything I should avoid in my design and worker process to ensure it would be compatible with what goes in later versions of channels? On Fri, 2017-09-01 at 12:38 -0700, Andrew Godwin wrote: > Hey, > You can send onto Channels from anywhere, event loop or

Processing data sent by sockets in django-channels

2017-09-04 Thread Samuel Muiruri
According to django-channels' github any "help" related issue should be posted here, I've asked this question before here and on stack with no response, don't feel the need to but if I don't get an adequate response I might need to hire a dev to implement this for me. I have this code for a

Re: Python 2 versus 3

2017-09-04 Thread James Bennett
Here is a very comprehensive article on why Python 3 is an improvement over Python 2: https://eev.ee/blog/2016/07/31/python-faq-why-should-i-use-python-3/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Django Gunicorn Import Error: no module name wsgi

2017-09-04 Thread Melvyn Sopacua
Your Django project really is "weather_station", but you treat "myproject" as the project. Revisit: https://docs.djangoproject.com/en/1.11/intro/tutorial01/#creating-a-project And follow instructions to the tee and look at the directory structure. On Sun, Sep 3, 2017 at 6:04 PM, Jonathan Cheng

Re: Python 2 versus 3

2017-09-04 Thread Melvyn Sopacua
At this point it makes more sense to upgrade to 3.6, but that aside, next Django release (2.0) will drop support for Python 2. Dealing with 2 major version upgrades is not the best platform for a smooth ride. On Mon, Sep 4, 2017 at 8:04 AM, BIJAL MANIAR wrote: > > Hi, > > I

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

2017-09-04 Thread Raffaele Salmaso
On Sun, Sep 3, 2017 at 4:26 PM, Derek Zeng wrote: > > When I use django==1.10.7, this does not happen. > When I use django==1.11a1 this happens. > Why 1.11a1? Current is 1.11.4 -- | Raffaele Salmaso | https://salmaso.org | https://bitbucket.org/rsalmaso |

Re: Python 2 versus 3

2017-09-04 Thread Lachlan Musicman
Bijal, Django 2.x - the next release cycle - will be Python 3.x Most major OSes will be moving to Python 3.x in their next release (eg in RedHat/CentOS 7.4 (I think))... If it's no big deal - and it really shouldn't be - you should move to Python 3.x Cheers L. -- "The antidote to

Re: Python 2 versus 3

2017-09-04 Thread Antonis Christofides
Hi, the reason is that Python 3.6 is backwards-compatible with 3.5. Same thing with 3.7 and 3.8 and generally 3.x for x>=6. In contrast, Python 3.0 is backwards-incompatible with 2.7. So if you upgrade to 3.5 now, your program will also run in any Python 3 version later than 3.5. The big thing is

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

2017-09-04 Thread Melvyn Sopacua
Could you turn off DEBUG and check what the problem is then? The reason is that I want to make sure we're not judging the side effect of *rendering* the exception. On Sun, Sep 3, 2017 at 11:52 PM, Derek Zeng wrote: > it's the same in either versions of python. the output was

Python 2 versus 3

2017-09-04 Thread BIJAL MANIAR
Hi, I have current django application with django 1.11 and python 2.7. Python 2.7 has support till 2020-01-01 and 3.5 has support till 2020-09-13. I've been asked to upgrade to Python 3.5. My question is why is there a need to upgrade from 2.7 to 3.5 as EOL support for both of them is nearly