I gave the editors such permissions:
auth | user | can add/change user - ON
auth | permissions | can add/change permissions - OFF
Still, when editing, they can change their permissions (and allow themselves actions they shouldn't do). I've found a ticket from 2yrs ago: http://code.djangoproject.com/ticket/6519 and it still works this...
The clever folks behind the app-engine-patch project have essentially enabled all the fun stuff of Django, including the admin, but without using Django's ORM.
From their website:
The most important change is that you have to use Google's Model class because the development model is too different from Django (at least with Django's ...
Here are the model definitions:
class ItemBrand(models.Model):
name = models.CharField(max_length = 30, unique = True)
def __unicode__(self):
return self.name
class WantedItem(models.Model):
name = models.CharField(max_length = 120)
description = models.TextField()
created = models.DateTimeField(auto_now = False, auto_now_add = Tr...
Just installed django-db-log module and trying to make it work properly. 'python manage.py syncdb' command created databases, it seems like logging works, but there is nothing about it in admin panel. As I found in documentation, it should add itself in admin panel without any additional configuration, but then I added 'djangodblog.middl...
Using Flatpages with the default admin, I need to change the template field from a text input with to select or radio with predefined choices. It's easy to do this with one of my own apps - just use the choices attribute in the model.
I have tried a few things - I will add details about those attempts later if necessary - but does anyon...
Hi there,
I have just moved my django site on my staging server, and the admin side of the site has no styling with it, when previously in local development it was fine, I read somewhere that I need to create a symbolic link, I did that by doing this
sudo ln -s /var/www/sico/htdocs /usr/lib/python2.5/site-packages/django/contrib/admin...
Hi,
I keep numeric fields like "size", "width", "height" in my database. Now I would attach units like "KiB" or "pixels" to them when showing them in the change list. This could easily be achieved by adding callables such as "size_formatted" etc to list_display. However, these are no longer sortable.
Is there a way around this limitati...
I added a model to admin via admin.site.register, and it does not show up in admin. Sice admin is so "It just works", I have no idea of how to debug this. POinters?
...
I have a simple database in django with SQLite and now I want to improve it with a better search capability (I will create a new project with new models). I would like to ask about how to plan and go about this project. The existing database has these fields
first, initial, last, school, yearGraduated
I am using django admin to sor...
I have a model with an expiration DateField.
I want to set up an Admin filter that will allow the user to toggle between "Not Expired" and "Any".
The model method is quite a simple Date comparison, no problem.
However assigning this as a field or filter parameter in the AdminForm is not automatic.
Is such a thing possible, and if not...
In my application, I have models that have the Users model as a Foreign key, eg:
class Doctor(models.Model):
username=models.ForeignKey(User, unique=True)
...
In the admin site, when adding a new Doctor, I have the option of adding a new User next to the username field. This is exactly what I want, but in the dialog that opens, it...
If I create a new entry for one particular model it doesn't show up in the django admin.
The Agency Model is causing the trouble.
# catalog.models
class Content(models.Model):
class Meta:
abstract = True
BUNDESLAND_CHOICES = (
('bw', 'Baden-Württemberg'),
('by', 'Bayern'),
('be', 'Berlin'),
...
Hi there,
With django admin, we have an history of who altered an object and when. I would like to add an "old value", "new value" to this to be able to roll back if needed.
Plus I would like every modification made to my objects (also outside of admin) to be recorded as well.
The final objective is to be able to trace every modificat...
Here is my example :
We have printers. We can define page formats that are linked to a specific printer then we define workflows that select a starting format (first page added to the printing job), a body format and an end format (last page added to the printing job).
Start and End are not required (null and blank = True)
I want to b...
This is weird: I have installed and configured django-tinymce, but it doesn't seem to work with django admin.
this works fine with Safari:
class ArticleAdmin(admin.ModelAdmin):
formfield_overrides = {
models.TextField: {'widget': TinyMCE(attrs={'cols': 80, 'rows': 20}, )},
}
but i does not work within firefox.
Just ...
I have two models, Event and Series, where each Event belongs to a Series. Most of the time, an Event's start_time is the same as its Series' default_time.
Here's a stripped down version of the models.
#models.py
class Series(models.Model):
name = models.CharField(max_length=50)
default_time = models.TimeField()
class Event(...
What is the best way to skip the delete confirmation page in the Django admin and go straight to deleting the objects?
Thank you!
...
Given the following model, how do I require that atleast one of the two fields has been given a value?
class ZipUpload(models.Model):
zip_file = models.FileField(upload_to="/tmp", blank=True,
help_text='Select a file to upload.')
zip_file_path = models.FilePathField(path="/tmp", blank=True,
...
The docs say:
When you specify an intermediary model
using the through argument to a
ManyToManyField, the admin will not
display a widget by default.
OK, but how about if I want a multiple select widget?
I have a model:
class Quotation(models.Model):
source = models.CharField()
sourceLink = models.URLField( blank=Tru...
I have installed Django on my host (I use their install version 1.1.1), all is working fine.
I have created some apps and they are registered in my settings.py (I can verify this works when i visit the site, the app shows up).
In the folder of this app i have created admin.py with the following content:
from progmaticnet.page.models imp...