Re: Improve Performance in Admin ManyToMany

2015-05-16 Thread Timothy W. Cook
On Sat, May 16, 2015 at 5:27 PM, Erik Cederstrand wrote: > > > Den 15/05/2015 kl. 20.54 skrev Timothy W. Cook : > > > > def formfield_for_many_to_many(self, db_field, *args, **kwargs): > > formfield = super(ClusterAdmin, >

Re: Improve Performance in Admin ManyToMany

2015-05-16 Thread Erik Cederstrand
> Den 15/05/2015 kl. 20.54 skrev Timothy W. Cook : > > def formfield_for_many_to_many(self, db_field, *args, **kwargs): > formfield = super(ClusterAdmin, > self).formfield_for_many_to_many(db_field, *args, **kwargs) > if db_field.name in >

Re: How to change type of field in model, when database is already populated ?

2015-05-16 Thread Sergiy Khohlov
Dump your data in the SQL file. Of course , separate structure and data. Update structure. Verify ability to switch into digit. If you have using Digit as string in dump you can update data manually or by see or ask. If previous data contains char then no chances. 16 трав. 2015 16:26 "mangu

Re: Invalid HTTP_HOST, can someone explain why I am getting this?

2015-05-16 Thread Carl Meyer
> On May 16, 2015, at 8:12 AM, Gerald Klein wrote: > > This looks like a cross domain request that is being received by your site > and the requestor is not listed in your sites allowed sites list, Sites > conforming with CORS will have a list of sites that can request data

Re: Invalid HTTP_HOST, can someone explain why I am getting this?

2015-05-16 Thread Gerald Klein
This looks like a cross domain request that is being received by your site and the requestor is not listed in your sites allowed sites list, Sites conforming with CORS will have a list of sites that can request data via http from them, this is stating the requestor is not on the list Hope that

Re: Invalid HTTP_HOST, can someone explain why I am getting this?

2015-05-16 Thread bobhaugen
I've gotten this error now and then when I have updated the software on a webfaction-hosted site and restarted Apache. Then it goes away after maybe a couple more restarts. It's like the software has not quite gotten itself together yet. I have no idea why this should be, and since it goes

How to change type of field in model, when database is already populated ?

2015-05-16 Thread mangu rajpurohit
Hi, I am new to Django. I am working on an application ,where the types of table fields in database are not known before hand. So, say for eg. In student table, I am assigning CharField to marks field, ie class Student(models.Model): marks = model.CharField(max_length = 3) and after

Re: File Upload in Django

2015-05-16 Thread Timothy W. Cook
The official docs are a good place to start https://docs.djangoproject.com/en/1.8/topics/http/file-uploads/ This GitHub example is about the newest one available showing the changes in recent Django versions https://github.com/axelpale/minimal-django-file-upload-example On Sat, May 16, 2015 at

File Upload in Django

2015-05-16 Thread SUBHABRATA BANERJEE
Dear Group, I want to upload file and form in Django. I am using Django 1.8 on Windows 2.7+ on Windows 7 Professional. I am bit new and I was confused how may I upload file and form in Django. If anyone may kindly show me an example tutorial. I tried some examples on Github and stackoverflow