Re: request.read() is empty in POST

2017-01-03 Thread Vijay Khemlani
Yeah, because hitting a roadblock only happens in Django Why are you trying to read the request directly? django parses it in request.body, request.GET, request.POST, request.FILES, etc https://docs.djangoproject.com/en/1.10/ref/request-response/ On 1/4/17, Flávio Cardoso

Re: request.read() is empty in POST

2017-01-03 Thread Flávio Cardoso
Wow, that's sad :( I'll port it to C# Em sexta-feira, 30 de dezembro de 2016 19:52:49 UTC-2, Flávio Cardoso escreveu: > Hello! I'm getting crazy, PLEASE someone, give me some light!!! > > I'm using Django 1.10.4, Python 3.5 on Windows using Visual Studio > Community 2015. > > I have

attachments

2017-01-03 Thread Aref
I have downloaded the django-attachments app from GitHub. I followed the instructions for installation and usage but can't seem to make things work. Has anyone used this app and if so could you provide some example / snippets as how to get the app to work with another app in the project. What

Re: DateField default value in SQLite and Postgres

2017-01-03 Thread jorrit787
This field: activity_date = models.DateField('Datum', default='17/06/2017') Results in this migration: class Migration(migrations.Migration): dependencies = [ ('activities', '0006_auto_20161231_1703'), ] operations = [ migrations.AlterField(

Re: Multiple Fields as Primary Key in MySQL - Django 1.10

2017-01-03 Thread Michal Petrucha
On Tue, Jan 03, 2017 at 01:56:00PM +0100, Simone Federici wrote: > Hi, > > from compositekey import db > > On my compositekey project the development is stopped on 1.5 django release. > https://github.com/simone/django-compositekey > > The Django 1.6 release, with an huge ORM refactoring and a

Re: multiple databases - two questions

2017-01-03 Thread Fred Stluka
Mike, Yeah.  Makes sense.  Good thought about the UUIDs!  My success was due partly to the fact that I could afford to move entire tables, not just selected rows, and could move all related tables as well. Trying to move just some of a related set of data

Re: Filter a contenttype with the content object's field

2017-01-03 Thread Robin Lery
I forgot to mention, there is another class: class Photo(models.Model): user = models.ForeignKey(User) file = models.ImageField() tags = models.ManyToManyField(Tag) pub_date = models.DateTimeField(default=timezone.now) activity = GenericRelation(Activity) So, filtering would

Filter a contenttype with the content object's field

2017-01-03 Thread Robin Lery
I creating an app where users can post with its related tags: class Tag(models.Model): name = models.CharField(max_length=255, unique=True) class Post(models.Model): user = models.ForeignKey(User) body = models.TextField() tags = models.ManyToManyField(Tag) pub_date =

Phoenix, AZ meetup group

2017-01-03 Thread Joey Wilhelm
Hello everybody! I want to send a call out to all Django developers, or those interested in the Django framework in the Phoenix, AZ area. I have taken over a long-dormant meetup group[1], and am holding the first meetup[2] on Wed, Jan 18. I know that there are many developers in the area using

Re: Django-Channels strange slowdowns - how to profile?

2017-01-03 Thread Andrew Godwin
On Tue, Jan 3, 2017 at 9:55 AM, Deven Bhooshan wrote: > Hi Andrew, > Any plans of making some out of the box django-channels profiling > framework ? > It's not something I personally have time for at the moment - if someone wants to submit a proposal I'm sure we could

Re: Django-Channels strange slowdowns - how to profile?

2017-01-03 Thread Deven Bhooshan
Hi Andrew, Any plans of making some out of the box django-channels profiling framework ? On Friday, December 30, 2016 at 2:26:40 PM UTC+5:30, Andrew Godwin wrote: > > Wow, that's an incredibly slow network you have there. I would agree that > you should move them all to the same place; I

Re: How to send user specific data on Group().send() on Channels?

2017-01-03 Thread Andrew Godwin
On Mon, Jan 2, 2017 at 11:57 PM, Utku Gültopu wrote: > Then since I will be sending different data for every user, holding online > users in a single Group does not make sense right? > > But then where should I hold online users? In a database table? The > documentation

Re: DateField default value in SQLite and Postgres

2017-01-03 Thread Avraham Serour
please post your migration file and the error On Tue, Jan 3, 2017 at 12:00 PM, wrote: > I recently set a default value in my local date format on a DateTimeField > while I was using SQLite. The migration ran fine on my SQLite dev database, > but when trying to apply the

Re: can anyone tell django deployment process with apache, mod_wsgi using aws ec2 hosting requirements

2017-01-03 Thread Avraham Serour
https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-uwsgi-and-nginx-on-ubuntu-16-04 On Tue, Jan 3, 2017 at 1:58 PM, chowdam1992 wrote: > So i can thankfull. > > -- > You received this message because you are subscribed to the Google

Re: Multiple Fields as Primary Key in MySQL - Django 1.10

2017-01-03 Thread Simone Federici
Hi, from compositekey import db On my compositekey project the development is stopped on 1.5 django release. https://github.com/simone/django-compositekey The Django 1.6 release, with an huge ORM refactoring and a huge testing refactoring, let my work hard to maintains. What I understand after

Re: Custom Error 400/500 page in Django

2017-01-03 Thread ludovic coues
In your first exemple, you return a class but in your second exemple you return an instance of the class. That might explain the difference you notice. The documentation on HttpResponseBadRequest mention it is used like an HttpResponse object and part 3 of the django tutorial show how to render a

Custom Error 400/500 page in Django

2017-01-03 Thread Sergiy Smertelny
There is some strange problem. When I do like this def error_page(request): return HttpResponseBadRequest it raises My custom error page that I listed in main URLconf. But when I pass and exception there - I got just a blank page with the text of exception. For example, view is something

Multiple Fields as Primary Key in MySQL - Django 1.10

2017-01-03 Thread ramesh
Hi, Below is the model generated for one of the table from the legacy database using "inspectdb" class Test(models.Model): field1 = models.AutoField(db_column='Field1') # Field name made lowercase. field2 = models.ForeignKey('Field2', models.DO_NOTHING, db_column='Field2') # Field

Re: Django expat error

2017-01-03 Thread Syed Saqlain
> > Hi I am getting same error I am using django 1.8 > /home/vagrant/.virtualenvs/bmo-us-wealth/local/lib/python2.7/site-packages/environ/environ.py:572: UserWarning: not reading /home/vagrant/source/core/.env - it doesn't exist. warnings.warn("not reading %s - it doesn't exist." % env_file)

can anyone tell django deployment process with apache, mod_wsgi using aws ec2 hosting requirements

2017-01-03 Thread chowdam1992
So i can thankfull. -- 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

Re: Multi-table Inheritance: How to add child to parent model?

2017-01-03 Thread spam
Thanks Malik for the link to https://dateutil.readthedocs.io/en/stable/examples.html#relativedelta-examples After many, many hours of being baffled at how to create a child instance from an existing parent, this answered my question. On Thursday, June 23, 2016 at 12:45:23 AM UTC+2, Malik Rumi

Re: Serving external files with Django

2017-01-03 Thread Antonis Christofides
Hello, (This is probably not what you mean, but PDF files can perfectly be considered to be "media files". The term "media" is a bit suboptimal—in Django parlance it refers to any files that are uploaded by the user or anyway are conceptually part of the database.) If what you want to do is

DateField default value in SQLite and Postgres

2017-01-03 Thread jorrit787
I recently set a default value in my local date format on a DateTimeField while I was using SQLite. The migration ran fine on my SQLite dev database, but when trying to apply the migration on my production Postgres database I got an error saying that a default value for DateTimeField must be in

Re: Edx LDAP Auth setting

2017-01-03 Thread 'Yip Terence' via Django users
16. Update the database record cd /edx/app/edxapp/edx-platform sudo -H -u edxapp bash source /edx/app/edxapp/edxapp_env paver update_db --se ttings=aws paver update_assets lms --settings=aws 17. Restart Service sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp: sudo

Re: Edx LDAP Auth setting

2017-01-03 Thread 'Yip Terence' via Django users
Dear all, I'm not sure is it the correct setting, but the setting is working for me. Please find the steps as follows. 1. Download LDAP packages sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev sudo pip install python-ldap 2. Install Django LDAP Library pip

Re: Edx LDAP Auth setting

2017-01-03 Thread 'Yip Terence' via Django users
Hi all, I'm not sure is it the correct setting, but the setting is working for me. Please find the steps as follows. 1. Download LDAP packages sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev sudo pip install python-ldap 2. Install Django LDAP Library pip

Re: What is the best combination of components to be used with Django on Windows 10?

2017-01-03 Thread pradam programmer
hi, Please Refer this Link https://www.toptal.com/django/installing-django-on-iis-a-step-by-step-tutorial On Mon, Dec 26, 2016 at 3:28 PM, James Bennett wrote: > On Mon, Dec 26, 2016 at 1:31 AM, Avraham Serour wrote: > >>