0
votes
0answers
5 views

allow_tags=True does not render <form> tag in django admin

I want to display a form in the list_display in django admin, but I'm facing this problem: when I define something like this: class MyModelAdmin(admin.ModelAdmin): list_display = ('foo', ...
0
votes
1answer
3 views

Customizing Mezzanine (use different thems)

I am working on a multisite project and right now there is only one theme I am using for both sites , So is there any way that I can use different theme for each site and if I change the one theme it ...
0
votes
1answer
9 views

can't get the objects of foreign keys of django models also my design is probably bad

I've made two django models: Person and Items (here is part of my code): class Person(models.Model): """ Represent a person who has credentials. The person may have devices and/or ...
0
votes
0answers
8 views

Displaying Page Numbers with django-tables2

I'm currently displaying a dataset using django-tables2. The docs make no mention of this in particular, so I'm guessing this'll take probably some table overriding - but, I'm hopeful someone out ...
0
votes
1answer
15 views

secure django file permissions

I am looking for a baseline set of file permissions to keep a django installation as secure as possible. I cannot seem to find any obvious reference either on the Django site or Google. Any links ...
1
vote
1answer
43 views

How to PEP8 a long array of strings with comments

The line with a comment is wider than 80 characters: MIDDLEWARE_CLASSES = ( 'mydogslow.middleware.MyWatchdogMiddleware', 'gattlib.djangomiddleware.SetRemoteAddrFromXRealIP', ...
1
vote
1answer
16 views

Garbage Collection using Django's Session Middleware

NOTE: Sorry, but I don't have the required reputation score to post more then two links. The snippets posted below reference the following views and supporting class' __del__() method. I have a ...
0
votes
1answer
50 views

Regular expression for UK Mobile Number - Python

I need a regular expression that only validates UK mobile numbers. A UK mobile number can be between 10-14 digits and either starts with 07, or omits the 0 and starts with 447. Importantly, if the ...
0
votes
0answers
20 views

Django Admin delete image

I Have the following function by delete the image in the admin Django when you check the checkbox and after save the image. This checkbox appear, when you go to the modify the register the field ...
0
votes
1answer
20 views

Why is “blank” is missing in django.forms.CharField, but present in django.db.models.CharField?

Background I have a model with two fields that are set the blank: class News(models.Model): ...
0
votes
2answers
17 views

csv file uploading error in Django in Mac: new-line character seen in unquoted field

I created a csv file in Mac Excel and wanna upload it to my server through Django, part of my code in views.py is as follows: FILE_UPLOAD_DIR2 = '/mnt/opt/data/spam/' fd2, filepath2 = ...
1
vote
1answer
30 views

How to mix AND and OR operators in Django query?

I a Django beginner, I figured out how to dynamically create a model query but I'm stuck at some point when I'm tring to mix AND and OR operators: I have a list of fields (contact_name, company, ...
0
votes
1answer
24 views

django template inheritance not working everywhere

I have a blog app and something is really bogging me. I have a base.html template that I extend in every template of my views and that works perfectly, just one of the views, which is the one that ...
0
votes
1answer
32 views

__init__() got an unexpected keyword argument 'default' in json/__init__.py in dumps

I have a django server running, and, out of nowhere, I got this error. I really have no idea what changes led to this. I'm trying to solve this for hours, but I can't find why this is happening. ...
0
votes
1answer
23 views

Django Different form validation when adding and changing instance

My question is that can we perform different form validation on the same form based on different action, such as adding or changing. Say I have a model which has a field named 'type'. And 'type' is ...

1 2 3 4 5 1364
15 30 50 per page