Re: Django models in file sharing system

2015-12-11 Thread Vasu Dev Garg
creating a sharing manytomany field is right but how to call it in views and verify that user filled in the form exists? -- 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 e

Re: Multiple serializers

2015-12-11 Thread Daniel Chimeno
This question is more about DRF than Django itself, I haven't use it for a while so I can't answer you, but please, put the code in a proper format way or pastebin, and say the version you are using both Django and DRF in order other people can answer you.

Re: git exclude files

2015-12-11 Thread Tim Graham
I don't know of a use case where virtualenvs are stored in source control. I wouldn't recommend putting the virtual environment in your project folder either. If you use a tool like virtualenvwrapper [1] you can store all your virtualenvs in a single directory on your system to make managing the

git exclude files

2015-12-11 Thread Gary Roach
Since Python3, venv seems to be preferable to virtualenv. Most of the howto's are for virtualenv. The file setup between the two is completely different. So do I include the bin/, include/, lib/, and the lib64 -> /root/archive/lib files in the git repository or should they be excluded. If the n

Re: I might do it wrong -- How to get and process an object from FormView ?

2015-12-11 Thread Sergiy Khohlov
Form.save returns object. You don't need tricking with post directly. 11 груд. 2015 22:30 "Dino" пише: > The form submission and processing as I've done it works, > but I'm not sure its the right way. > > The part I'm concerned about is detailed in these 3 steps: > - I save the form with the data

I might do it wrong -- How to get and process an object from FormView ?

2015-12-11 Thread Dino
The form submission and processing as I've done it works, but I'm not sure its the right way. The part I'm concerned about is detailed in these 3 steps: - I save the form with the data submitted -- form.save() - then I check request.POST for the name of a (unique) field submitted - then I query t

Re: Multiple serializers

2015-12-11 Thread miguel angel lopez mendo
any ? El jueves, 10 de diciembre de 2015, 12:27:26 (UTC-6), miguel angel lopez mendo escribió: > > i have this serializers > > class ValuarCoche(serializers.ModelSerializer): > class Meta: > model = Valuacion > depth = 6 > fields = ('coche','Precio_Venta','Precio_Compra') > > class CocheSerializ

Auto redirect with Apache?

2015-12-11 Thread Andrea Angelini
I'm experiencing this problem since recently, I guess after upgrading to Django 1.9. I had originally this problem with DRF https://github.com/tomchristie/django-rest-framework/issues/3724 but I adapted it to Django. With the following code I can reproduce the problem. The problem happens with A

a bug in model.Manager.values_list?

2015-12-11 Thread Ws Hu
import json from myapp.models import MyModel x = json.dumps(MyModel.objects.values_list('myField', flat=True)) # "[] is not JSON serializable" x = json.dumps([x for x in MyModel.objects.values_list('myField', flat=True )]) #ok It seems that the database is accessed only if the result of