Opened 19 years ago
Closed 15 years ago
#714 closed enhancement (duplicate)
access to id of current user on admin
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The model code of admin application doesn't have access to the request, so if I want to save the id of user that is creating the poll, I can't access to it.
this may be more clear, something like this should work:
from django.core import meta
from django.models.auth import User
# Create your models here.
class Poll(meta.Model):
question = meta.CharField(maxlength=200)
pub_date = meta.DateTimeField('date published')
author = meta.ForeignKey(User, default=User.id)
class META:
admin = meta.Admin()
Change History (6)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
priority: | normal → high |
---|
comment:5 by , 15 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
Version: | → SVN |
still no solution
superceded tickets has been marked as wontfix
comment:6 by , 15 years ago
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
Please don't reopen tickets closed by a core developer.
The model code of admin application doesn't have access to the request, so if I want to save the id of user that is creating the poll, I can't access to it.
this may be more clear, something like this should work: