I set myself up on PythonAnywhere a few minutes ago. I go to the admin panel and attempt to create a new model instance, but when I click 'Save' I just get an unhelpful page with just Bad Request (400) on it.
I don't exactly know what I can provide to you to make it easier to understand and solve, so tell me if you want me to add something.
My model code:
class Frame(models.Model):
name = models.TextField(max_length=16, unique=True)
file_upload = models.FileField(upload_to='/media/')
font = models.FileField(upload_to='/media/')
text_size = models.IntegerField()
slug = models.SlugField(unique=True)
def save(self, *args, **kwargs):
self.slug = slugify(self.name)
super(Frame, self).save(*args, **kwargs)
def __str__(self):
return self.name
Only thing I could find in the logs relating to that:
x.x.x.x - - [12/Sep/2015:16:34:06 +0000] "POST /admin/generate/frame/add/ HTTP/1.1" 400 37 "http://x.pythonanywhere.com/admin/generate/frame/add/" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36" "x.x.x.x"
Error log is empty and Server log has nothing but generic stuff.
@Glenn nope, either I set it to True or False it doesn't work. Also, it's all good and working until I go to /admin/generate/frame/add/ and attempt to save the form there. So, it's not a problem with the ALLOWED_HOSTS, even when I set it to a wildcard it doesn't work.