Re: Autocomplete in Django

2017-09-18 Thread Melvyn Sopacua
Then you need to learn Ajax.
You can't do dynamic forms like this and not use Ajax.

I linked django-autocomplete-light for a reason: if you follow the
docs and use it, you can build things you need without knowing Ajax.
However, if it doesn't work or is creating problems because of
incorrect input, it is vital you know the foundation of Ajax to
troubleshoot.

On Sun, Sep 17, 2017 at 11:27 PM, Mreno sert  wrote:
> Thanks for the help...but I do not know ajax. Is there anything simpler like
> I heard about "create-field" option. Tried it , but not getting it done
> correctly.
>
> On Sunday, September 17, 2017 at 3:00:14 PM UTC+5:30, Andréas Kühne wrote:
>>
>> That really depends on how you want it to work?
>>
>> I would probably add an item on the dropdown that shows the current items
>> in the database, with "Add city". If the user presses that you can have an
>> AJAX call that adds the item to the database.
>>
>> Regards,
>>
>> Andréas
>>
>> 2017-09-17 6:23 GMT+02:00 Mreno sert :
>>>
>>> I have a small app in which I have form for taking 5 inputs as City1,
>>> City2,City3,City4 and City5 as the fields. I have written a code for auto
>>> completing it but A user can not enter the new fields. Only existing values
>>> can be used. How can I make it to accept a new field if not present in the
>>> database
>>>
>>> --
>>> 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...@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/0e9d44e3-156b-4f5d-80da-5a0cfd0930d5%40googlegroups.com.
>>> 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/2088e144-e2f5-4351-a9d8-62954467da06%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 
Melvyn Sopacua

-- 
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/CA%2Bgw1GXCLsnb0Bzo9m3EJNWBYGXPSL91PZTBGH%3Dj39RJCtTusA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


submit form as superuser vs regular user

2017-09-18 Thread Danae Vogiatzi
 

In my django app I have a Myuser(User) class. It inherits the User class. 
When a new user is created the Myuser table is poplulated.

myusers.py

class Myuser(User):
address = models.CharField(max_length=40)
pobox = models.CharField(max_length=40)

models.py

class Someclass(models.Model):
objectid= models.IntegerField()
objecttype  =  models.CharField(max_length=200)
created =  models.DateTimeField(default=timezone.now)
modified=  models.DateTimeField(auto_now=True)
class Someotherclass(Someclass):
status = models.IntegerField(default=0,)
name   =  models.CharField(max_length=200)
  created =  models.DateTimeField(default=timezone.now)
modified =  models.DateTimeField(auto_now=True)
  user = models.ForeignKey(User)

forms.py

class SomeotherclassForm(forms.ModelForm):

def __init__(self, *args, **kwargs):
self.request = kwargs.pop("request")
self.user = kwargs.pop('user')
self.app = kwargs.pop('app')
self.table = kwargs.pop('table')
self.mytype = kwargs.pop('mytype')
initial = kwargs.get('initial', {})
super(SomeotherclassForm, self).__init__(*args, **kwargs)

create.py

class  DataCreate(CreateView):
  @method_decorator(login_required)
  def dispatch(self, *args, **kwargs):
 #some code here not relevant at all

  def get_form_kwargs(self):
kwargs = super(DataCreate, self).get_form_kwargs()
objectid = self.request.GET.get('objectid',None)
objecttype = self.request.GET.get('objecttype',None)
kwargs.update({'mytype': objecttype})
kwargs.update({'request': self.request})
kwargs.update({'user': self.request.user})
kwargs.update({'app': self.app})
kwargs.update({'table': self.kwargs['table'].lower()})
return kwargs

  def form_valid(self, form):
obj = form.save(commit=False)
group = ''
if not self.request.user.is_superuser:
group = MyUser.objects.get(user_ptr_id=self.request.user.pk)
else:
groups = self.request.user.groups.all()
if  self.kwargs['table'] == 'Myprotocol':
obj = form.save(commit=False)
table = 
eval(self.request.GET.get('objecttype',None).title()).objects.get(pk=int(self.request.GET.get('objectid',None)))

obj.objectid = table.pk
obj.objecttype = table.__class__.__name__.lower()
obj.user_id = self.request.user.pk
obj.save()
else:
obj = form.save()
if self.request.POST.get('is_popup'):
check = int(self.kwargs['is_list'])
if self.kwargs['table'] == 'Someclass':
popup = 1
a = checkPopup2(obj,check,popup,obj.pk)
else:
a = checkPopup(obj,check)

return a
else:
return super(DataCreate, self).form_valid(form)


When I have logged in as a regular user ,everything works fine. When I log 
in as a superuser, I get form error that objecttype,objectid and user are 
not filled. In my attempts to troubleshoot it , I realized that when I am 
logged in as a superuser ,it dowsn't reach the form_valid() function. I 
can't figure out why that is happening. Any suggestions or advice on how to 
troubleshoot it?

-- 
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/570196c4-7fd8-45ec-a33f-0713f0639228%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: single queryset from multiple tables

2017-09-18 Thread Michal Petrucha
On Fri, Sep 15, 2017 at 07:26:27AM -0700, DG wrote:
> After reading this thread and answers on SO (e.g. How to combine 2 or more 
> querysets in a Django view? 
> )
>  
> I'm still not sure if this code is fully lazy with Django 1.11+ or if it is 
> going to load everything into memory:
> 
> qs1 = Model_A.objects.filter(foofield='foo').order_by('created_at')
> qs2 = Model_B.objects.filter(barfield='bar').order_by('created_at')
> 
> paginator = Paginator(sorted(chain(qs1, qs2),
>  key=lambda i:i.created_at
> ),
>   50)
> 
> 
> If the querysets each referred to 500k results, would this blow up?

Yes.*

* Unless you have a very powerful application server that can hold a
copy of your entire databse in memory, and efficiently process it.

What would happen is that the sorted() builtin function consumes the
entire iterator you pass in, which pulls all the matching results from
qs1, and then qs2, which will build model instances for all of them,
and sorts the combined list in memory. Then you'd be taking the result
of that sorting routine, and pass that to the paginator, which would
discard all but 50 items from the potentially huge list of model
instances.

I don't think there's a way to not do this with the sorting that is
built-in in Python, because it's always eager.

Cheers,

Michal

-- 
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/20170918130933.GP8762%40konk.org.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


RE: single queryset from multiple tables

2017-09-18 Thread Matthew Pava
I'm assuming that Model_A and Model_B have some similar columns if you are 
going to be showing them as an index view.  It would seem to me that you need 
to reconsider your model design.  Perhaps you can pull out what is common 
between them and create another model that they both inherit from or create a 
ForeignKey or OneToOne to, Model_C.  Then you can use Model_C in your paginator 
design.

-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Michal Petrucha
Sent: Monday, September 18, 2017 8:10 AM
To: django-users@googlegroups.com
Subject: Re: single queryset from multiple tables

On Fri, Sep 15, 2017 at 07:26:27AM -0700, DG wrote:
> After reading this thread and answers on SO (e.g. How to combine 2 or 
> more querysets in a Django view?
>  uerysets-in-a-django-view?rq=1>) I'm still not sure if this code is 
> fully lazy with Django 1.11+ or if it is going to load everything into 
> memory:
> 
> qs1 = Model_A.objects.filter(foofield='foo').order_by('created_at')
> qs2 = Model_B.objects.filter(barfield='bar').order_by('created_at')
> 
> paginator = Paginator(sorted(chain(qs1, qs2),
>  key=lambda i:i.created_at
> ),
>   50)
> 
> 
> If the querysets each referred to 500k results, would this blow up?

Yes.*

* Unless you have a very powerful application server that can hold a copy of 
your entire databse in memory, and efficiently process it.

What would happen is that the sorted() builtin function consumes the entire 
iterator you pass in, which pulls all the matching results from qs1, and then 
qs2, which will build model instances for all of them, and sorts the combined 
list in memory. Then you'd be taking the result of that sorting routine, and 
pass that to the paginator, which would discard all but 50 items from the 
potentially huge list of model instances.

I don't think there's a way to not do this with the sorting that is built-in in 
Python, because it's always eager.

Cheers,

Michal

--
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/20170918130933.GP8762%40konk.org.
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/998a581c974442659bd42feb286a85d9%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.


[django.contrib.admin] Static files on signed S3

2017-09-18 Thread Manuel Jeckelmann
Hi list, 

In my app, I've configured STATICFILES_STORAGE 
to 'storages.backends.s3boto3.S3Boto3Storage'. The S3 storage I use is a 
custom instance, requiring v2-signed requests. 

What I've noticed now, is that static files base.css and forms.css get 
loaded nicely (using a S3v2-signed request). However, forms.css then 
imports further css files (fonts.css and widgets.css) and a svg file 
(icon-addlink.svg), which cannot be loaded. The reason being that 
css-imports in forms.css use the url(...) function, which does not sign 
requests, which in turn results in a 400-Bad request from my S3 storage. 

Has anyone else seen this behaviour? How did you handle it (knowing that I 
don't have enough privileges to change the S3-storage behaviour)? 
Is this even a bug with the CSS-url function not going through the 
STATICFILES_STORAGE backend?

Thanks for your advice, 
-Manuel

-- 
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/0455e929-eef4-436b-a190-f3c22257008e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django forks

2017-09-18 Thread Jamesie Pic
Hi all,

After taking a ride in Go lang framework world, and coming back with
the idea that I'd still be producing Django projects for the next 3
years, I have started to fix the problems I think are in Django in a
layer that sits on top of it: https://github.com/yourlabs/crudlfap
because I think that in 2017, my framework should let me configure
OOAO things like: permissions on models/fields/objects/views (not in a
table, please), ajax filtered configurable tables, autocompletes,
modern OOTB UI/UX, automatically create new databases and execute
migrations and ask me to create a superuser when I run runserver
(please), and other stuff I won't mention here because this is long
enough. For this reason, I am not longer interested in participating
to a fork.

Best
Jamesie
<3

-- 
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/CAC6Op1_%3DfxmrfNjzSdsX%3DnNKz1-17jrk%2Bt-AB70Bih%3D%2BHo_NQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Autocomplete

2017-09-18 Thread Mitul Tyagi
How to use create_field in django autocomplete. As per the doc 
http://django-autocomplete-light.readthedocs.io/en/master/tutorial.html#creation-of-new-choices-in-the-autocomplete-form
I am getting an error while doing so... " TypeError: City1Autocomplete() 
received an invalid keyword 'create_field'. as_view only accepts arguments 
that are already attributes of the class."


-- 
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/b1f0677d-06eb-497d-b220-1ce1b95703ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


django newb, python newb. HELP! URL link worked for days, now has stopped working. Have I found a bug?

2017-09-18 Thread Manches spainspots
 Sorry to be a bother, this probably has a quick easy answer that I am 
just not seeing. 
The template code that calls the url:

 My Tree

The idea here is to construct a tree view that can focus on any Person 
object in my model, and database, based on pk of the Person you want to 
center on.
This is the base case, which calls the tree view for the user themselves, 
and is handled in the views.py under the def block for my_tree_view.

My problem is in the url call from the template.

In my system, right now there is only one user, me... at request.user.pk=1.

This sends the url to http://localhost:8000/kin/my_tree/view/0/1/

url.py has the following:

appname="kin"

urlpatterns = [
...

url(r'^kin/my_tree/view/(?P[0-9]+)/(?P[0-9]+)/$', 
my_tree_view, name='my_tree_view'),
...
]

Again, this worked for several days, then yesterday, stopped working.

Attached are screen shots of the error page. I can see where the focus_pk 
loses the value '0' and suddenly becomes focus_pk = ''
It looks like the **kwargs are not being passed correctly here. 







Be the first to help a newb understand!!! Thanks in advance!



   1. 
   

-- 
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/0b3bd188-f396-42e3-b1b4-2f37f46a742d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django newb, python newb. HELP! URL link worked for days, now has stopped working. Have I found a bug?

2017-09-18 Thread Manches spainspots



Edit this is the middle screen shot with the part circled that I have a 
question about.

On Monday, September 18, 2017 at 4:49:41 PM UTC-7, Manches spainspots wrote:
>
>  Sorry to be a bother, this probably has a quick easy answer that I am 
> just not seeing. 
> The template code that calls the url:
>
>  %}> My Tree
>
> The idea here is to construct a tree view that can focus on any Person 
> object in my model, and database, based on pk of the Person you want to 
> center on.
> This is the base case, which calls the tree view for the user themselves, 
> and is handled in the views.py under the def block for my_tree_view.
>
> My problem is in the url call from the template.
>
> In my system, right now there is only one user, me... at request.user.pk
> =1.
>
> This sends the url to http://localhost:8000/kin/my_tree/view/0/1/
>
> url.py has the following:
>
> appname="kin"
>
> urlpatterns = [
> ...
> 
> url(r'^kin/my_tree/view/(?P[0-9]+)/(?P[0-9]+)/$', 
> my_tree_view, name='my_tree_view'),
> ...
> ]
>
> Again, this worked for several days, then yesterday, stopped working.
>
> Attached are screen shots of the error page. I can see where the focus_pk 
> loses the value '0' and suddenly becomes focus_pk = ''
> It looks like the **kwargs are not being passed correctly here. 
>
>
> 
>
>
> 
>
>
> 
>
> Be the first to help a newb understand!!! Thanks in advance!
>
>
>
>1. 
>
>
>

-- 
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/0c8dd768-fdd0-42f4-9892-5b8604eecf88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


collectstatic fails

2017-09-18 Thread Mike Dewhirst

Ubuntu 16.04 dedicated staging server, Django 1.10.8, Python 2.7

Collectstatic has been working forever on this machine driven by 
Buildbot during a complete site deletion and recreation from scratch. I 
must have changed something but I can't think what.


It appears that Django tries to import mock and passes silently if it 
doesn't exist. I don't have mock on my Windows dev machine and 
collectstatic works fine.


I upgraded mock to 2.0.0 which also upgraded pbr to 3.1.1 and six to 
1.11.0 but still get the same fail. See command and trace below.


I attended a mock session at PyConAu recently and decided never to use 
it (personally:) so it is maybe/possibly worthwhile uninstalling?


Does anyone have any advice?

Thanks

Mike

/usr/bin/python /var/www/ssds/manage.py collectstatic 
--settings=ssds.settings.staging --noinput


Traceback (most recent call last): File "/var/www/ssds/manage.py", line 
24, in  execute_from_command_line(sys.argv) File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 367, in execute_from_command_line utility.execute() File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 341, in execute django.setup() File 
"/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 27, in 
setup apps.populate(settings.INSTALLED_APPS) File 
"/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 
108, in populate app_config.import_models(all_models) File 
"/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 
199, in import_models self.models_module = 
import_module(models_module_name) File 
"/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module 
__import__(name) File "/var/www/ssds/billing/models/__init__.py", line 
7, in  from .fee import Fee File 
"/var/www/ssds/billing/models/fee.py", line 9, in  from 
company.models import RelationshipType File 
"/var/www/ssds/company/models/__init__.py", line 12, in  from 
.relationship import Relationship File 
"/var/www/ssds/company/models/relationship.py", line 12, in  
from common.utils import when File "/var/www/ssds/common/utils.py", line 
18, in  from django.test import TestCase # all our tests import 
unittest from here File 
"/usr/local/lib/python2.7/dist-packages/django/test/__init__.py", line 
27, in  import mock # NOQA File 
"/usr/lib/python2.7/dist-packages/mock/__init__.py", line 2, in  
import mock.mock as _mock File 
"/usr/lib/python2.7/dist-packages/mock/mock.py", line 71, in  _v 
= VersionInfo('mock').semantic_version() AttributeError: 'VersionInfo' 
object has no attribute 'semantic_version'



Looks like collectstatic is triggering all sorts of imports including my 
'common' app which has no models and no static items but does import 
TestCase from django.test and that's where the mock import happens.


I guess I should read Django 1.10 release notes ...

Mike


--
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/ea8a5a66-ccf1-4ff7-153c-fb932fd1d4e8%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.


Re: collectstatic fails

2017-09-18 Thread Mike Dewhirst

This time with a plain text traceback. Sorry about that.

On 19/09/2017 3:22 PM, Mike Dewhirst wrote:

Ubuntu 16.04 dedicated staging server, Django 1.10.8, Python 2.7

Collectstatic has been working forever on this machine driven by 
Buildbot during a complete site deletion and recreation from scratch. 
I must have changed something but I can't think what.


It appears that Django tries to import mock and passes silently if it 
doesn't exist. I don't have mock on my Windows dev machine and 
collectstatic works fine.


I upgraded mock to 2.0.0 which also upgraded pbr to 3.1.1 and six to 
1.11.0 but still get the same fail. See command and trace below.


I attended a mock session at PyConAu recently and decided never to use 
it (personally:) so it is maybe/possibly worthwhile uninstalling?


Does anyone have any advice?

Thanks

Mike

/usr/bin/python /var/www/ssds/manage.py collectstatic 
--settings=ssds.settings.staging --noinput





Traceback (most recent call last):
  File "/var/www/ssds/manage.py", line 24, in 
    execute_from_command_line(sys.argv)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 367, in execute_from_command_line

    utility.execute()
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 341, in execute

    django.setup()
  File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", 
line 27, in setup

    apps.populate(settings.INSTALLED_APPS)
  File 
"/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 
108, in populate

    app_config.import_models(all_models)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", 
line 199, in import_models

    self.models_module = import_module(models_module_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in 
import_module

    __import__(name)
  File "/var/www/ssds/billing/models/__init__.py", line 7, in 
    from .fee import Fee
  File "/var/www/ssds/billing/models/fee.py", line 9, in 
    from company.models import RelationshipType
  File "/var/www/ssds/company/models/__init__.py", line 12, in 
    from .relationship import Relationship
  File "/var/www/ssds/company/models/relationship.py", line 12, in 
    from common.utils import when
  File "/var/www/ssds/common/utils.py", line 18, in 
    from django.test import TestCase  # all tests import unittest from here
  File 
"/usr/local/lib/python2.7/dist-packages/django/test/__init__.py", line 
27, in 

    import mock  # NOQA
  File "/usr/lib/python2.7/dist-packages/mock/__init__.py", line 2, in 


    import mock.mock as _mock
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 71, in 


    _v = VersionInfo('mock').semantic_version()
AttributeError: 'VersionInfo' object has no attribute 'semantic_version'





Looks like collectstatic is triggering all sorts of imports including 
my 'common' app which has no models and no static items but does 
import TestCase from django.test and that's where the mock import 
happens.


I guess I should read Django 1.10 release notes ...

Mike




--
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/1af5599d-4292-6454-1b63-b2d4be352f1d%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.