Hello,
I have created the following django models:
class Entry(SiteObject):
parent = models.ForeignKey(Blog, related_name="entries")
content = models.TextField(help_text = "The Content of the blog post")
class EntryImage(models.Model):
entry = models.ForeignKey(Entry, related_name="entryimages")
imagewidth = models.Po...
Hello,
I am translating a django app and I would like to translate also the homepage of the django admin site.
On this page are listed the application names and the model class names. I would like to translate the model class name but I don't find how to give a user-friendly name for a model class.
Does anybody know how to do that?
...
Hello! I'm trying to integrate TinyMCE or CKEditor into Django, but I have no idea how to manage uploading pictures.
I've been searching and found some django apps, but they won't work with my Django version (1.1.1), buggy and not maintained.
Maybe I missed something? Can you please give me a step-by-step guide how to add WYSIWYG with u...
If a django model contains a foreign key field, and if that field is shown in list mode, then it shows up as text, instead of displaying a link to the foreign object.
Is it possible to automatically display all foreign keys as links instead of flat text?
(of course it is possible to do that on a field by field basis, but is there a gen...
Hello I have a such model:
Foo (models.Model):
slug = models.SlugField(unique=True)
image = models.ImageField(upload_to='uploads/')
I want to do two things with this:
First of all, I want my image to be forced to resize to a specific width and height after the upload.
I have tried this reading the documentation but seems to g...
Hi,
I have a ModelAdmin where I need to insert some html-snippet that is not part of a model (it's a java-applet). Is there any way to do this?
...
The code displayed below is providing the choices I need for the app field, and the choices I need for the attr field when using Admin.
I am having a problem with the attr field on the inline form for already saved records. The attr selected for these saved does show in small print above the field, but not within the field itself. ...
Basically I am writing a simple shopping cart. Each item can have multiple prices. (i.e. shirts where each size is priced differently). I would like to have a single price field in my admin panel, where when the first price is entered, an additional price field pops up. However I am kind of at a loss as to how to do this. What would be t...
Are there any custom themes for Django's admin app, other than django-grappelli?
...
I'm trying to make it so that the ImageFileField only accepts image files of a set dimension. I found another post on here which suggest hijacking the 'clean' method in a form, but I was wondering if it would be simpler to create a custom field type instead?
Has anyone got any code snippets which I might be able to use in order to do t...
Here is a simplified version of one of my models:
class ImportRule(models.Model):
feed = models.ForeignKey(Feed)
name = models.CharField(max_length=255)
feed_provider_category = models.ForeignKey(FeedProviderCategory, null=True)
target_subcategories = models.ManyToManyField(Subcategory)
This class manages a rule for importing ...
Hello there
Currently I have an app with a save method in its models.py . So I would like to change this so the models does not do the save() method, but rather have a separate view that will do this in die admin site.
Can you please direct me in the correct direction?
Thank you
...
I have a model similar to the following (simplified):
models.py
class Sample(models.Model):
name=models.CharField(max_length=200)
class Action(models.Model):
samples=models.ManyToManyField(Sample)
title=models.CharField(max_length=200)
description=models.TextField()
Now, if Action.samples would have been a ...
I would like to change admin for a group, so it would display how many users are there in a certain group. I'd like to display this in the view showing all groups, the one before you enter admin for certain group. Is it possible? I am talking both about how to change admin for a group and how to add function to list_display.
...
Hi all,
I followed this tutorial: http://stackoverflow.com/posts/1348076/revisions
Afterwards i made a user guest with permission 'Can view test' in the admin interface. When i did that it was only possible to see 'test' but not click on it and see it's actual data... so basicly i couldn't view the data from my model 'test' by only per...
I'm new to django templates, and I'm trying to tweak the admin interface. Right now I'm editing tabular.html in order to control how inlines are displayed. However, I have no idea what variables are available via the context the admin app sends to this template. Is there any quick way to see all variables available?
I know it is possib...
I created a database for a site i'm doing using Django as the admin backend. However because the server where the site is hosted on, won't be able to support Python, I find myself needing to do the front end in PHP and as such i've decided to use CodeIgniter along with Datamapper to map the models/relationship.
However DataMapper requi...
Is their any way of counting number of django logins?
The last_login field of the auth_user gets updated with each login.
Can we make use of that field to count number of logins by a specific user?
...
My questions seems like a common problem that when I have seen any questions on it is never really asked right or not answered. So Im going to try to get the question right, and maybe someone knows how to resolve the issue, or correct my understanding.
The problem:
When you have a many-to-many relation ship (related_name not through) a...
It appears Django hides fields that are flagged Primary Key from being displayed/edited in the Django admin interface.
Let's say I'd like to input data in which I may or may not want to specify a primary key. How would I go about displaying primary keys in the admin interface, and how could I make specifying it optional?
...