I'm looking to categorize my entries, the catch is there are multiple levels of categories I want. An example:
css
layout
floats
specificity, selectors
html
html 5
In this example, css and html are parent categories, css has 2 children and layout has a child of floats.
I suppose the schema I would need would be
...
For instance, I have a model called Person, and it has a bool field called 'isAthlete'. I would like to be able to check off True for 50 of these Person records, and then hit submit, without having to go into each Person model record and make the change. Is there an easy or already provided way to set this up in Django?
...
Hi everyone. I'm using Django 1.0, and I'm having a tricky problem with permissions and groups.
Having launched a site, I wanted to use more fine-grained permissions for the content editors, so that they can insert new content with django's built-in admin function, not having to worry about potential damage to those models they should n...
Hi.
Ok, i'm shit at describing. Here's a relationship diag.
In Django i've made my models like:
from django.db import models
from datetime import datetime
class Survey(models.Model):
name = models.CharField(max_length=100)
pub_date = models.DateTimeField('date published',default=datetime.now)
def __unicode__(self):
...
I select an object (of type SourceClass) from the admin site and get to the 'change' page.
The object I have selected has a ForeignKey relationship to another type of object (TargetClass).
The change page for the object of type SourceClass gives me both a drop down box (from a select form field) and a link to add a new TargetClass.
Th...
Hi all,
So i have an Article and a Comment model. Comment have a foreign key pointing to Article. As well Comment in admin.py is admin.StackedInline. Currently, in the admin view of Article, i have an extra column for the latest 3 comments displayed (using a custom function). I would like to have a behavior that when the user clicks on ...
My model:
class Order(models.Model):
property_a = models.CharField()
property_b = models.CharField()
property_c = models.CharField()
Many users will access a given record in a short time frame via admin change page, so I am having concurrency issues:
User 1 and 2 open the change page at the same time. Assume all values a...
I have a system with multiple Sites in it. Every User object in the system gets a Profile object attached to it which governs which Sites they have permission to interact with. The system also has an Article model which can belong to multiple sites. So, when a user loads up the Article admin page, I only want them to see Articles that ar...
Hi all,
Does anyone know if there is a way to save changes on a per row/cell basis for forms with list_editable in django admin? I would like to have a button for each row and each cell to do that.
Thanks a lot!
Jason
...
Hi there,
I just converted one of my models to use a generic foreign key. The model is working correctly with these, database is reporting correct values, and the API I have is working perfectly with the new foreignkey with zero change (Kept the same field name).
However, the admin totally fails. The Inline shows no data, despite there...
I have just spotted that something is wrong with my django-admin.py command. I checked similar SO posts on django-admin.py problems but nothing seems to be related to my problem. I use Windows Vista (yeah, I know...). I also have many versions of django in some folder on my disk and I switch to the version I need using junction command (...
[Update: Changed question title to be more specific]
Sorry if I didn't make the question very well, I can't figure how to do this:
class WhatEver():
number = model.IntegerField('Just a Field', default=callablefunction)
...
Where callablefunction does this query:
from myproject.app.models import WhatEver
def callablefunction():
...
I'm trying to figure out a way to display the following RelativeInline only if Person.is_member is True.
Current admin.py:
class RelativeInline(admin.TabularInline):
model = Relative
fk_name = 'member'
class PersonAdmin(admin.ModelAdmin):
inlines = [RelativeInline,]
ordering = ('first_name',)
list_filter = ('is_me...
I want to be able to edit all data on one page. How can i achieve this ? Should i modify my models? If so, then how should i modify them?
class TextStyle(models.Model):
color = models.CharField(_("color"), max_length=7)
style = models.CharField(_("style"), max_length=30)
typeface = models.CharField(_("typeface"), max_lengt...
I have these models:
class Client(models.Model):
is_provider = models.BooleanField()
class Billing(models.Model):
client = models.ForeignKey(Client)
I want to limit the choices of ForeignKey to show only the clients with is_provider=True. Is there something like:
limit_choices_to = {'is_provider': True}
Or anything I can u...
Hi All,
I am working on a Django project where I need to change almost half the features and the way Django admin manages the models. For e.g. I have to create an application and then create an administrator and assign that application such that this admin can manage only that particular application. The administrators would be create...
Hi folks,
I'm using SQL Server 2005 with Django, I'm wondering if anyone has ever attempted to create an admin panel for SQL using Django.
Would be quite useful to have!
...
I have to implement a way to send automatic notification emails based on a model DateFields. I'll put an example.
I have a DateField with 2010-07-23 stored in it and I want django to send an email to a designated user when the current date reaches a week before (send it in 2010-07-16). Is there any way to accomplish this?
...
Hello - sorry if this is an obvious question but I have been searching for a few days and have not been able to come up with a result.
I am creating a simple photo gallery app. There are four galleries, each containing a photo (the photo consists of a 'before' image, 'after' image and caption). I am trying to use django-admin to allow...
Hi guys, im trying to upload videos from django admin, but i cant see how validate upload video files and nothing more.
Any idea?
Thanks
Sorry with my English
...