I'm trying to delete a user using Django Admin, but I get this error:
TypeError: coercing to Unicode: need string or buffer, User found
What could cause this error?
The complete error:
TypeError at /admin/auth/user/
coercing to Unicode: need string or buffer, User found
Request Method: POST
Request URL: http://www.domain.com/admi...
Is there an easy way of displaying method output in Djangos admin detail view? For the list view we have the list_display field, however i cannot find anything similar for the detail view. Of course, editing the template would be a way but isnt there something easier?
...
I've recently started using django to administer a large existing application that was grown organically over the years using twisted.web. I started experimenting with django and it's automatic admin interface and I've been very pleased with the results.
One thing that seems to be missing for my purposes is the ability to give users re...
Hello,
How can i redirect user to different app on save ?
I have two app say app1 and app2.If user click on save in app2 then it should be redirected to app1 rather then the default page
I want in admin not in customform
...
In the Django admin each app you have registered with the admin gets its own section. I want to add a custom section for reporting that isn't associated with any app. How do I do that?
...
Hi guys, I would like to learn how to work with the Django Admin. How do I know when the user is editing an existing object or saving a new object?
For example, if I want to make a function to do something different when the user saves a new object or saves an edited object, how do I know which is which?
Thanks guys :)
Sorry for my E...
Hello I need to extend the admin view for a model so I can retrieve the items I want and use them at the extended admin templete for that model.
I couldn't find enough docs about this.
d
Thanks
...
Hi guys, I would like to know how to show an error message in the Django admin.
I have a private user section on my site where the user can create requests using "points". A request takes 1 or 2 points from the user's account (depending on the two type of request), so if the account has 0 points the user cant make any requests... in the...
hi,
i'm fairly new to django and just trying a couple simple experiments to get my feet wet. i'm running django 1.0, apache2 prefork and mod_wsgi.
I'm trying to build a site with the following url structure
/
/members
/admin
the root is basically a public area.
the members path should be protected using basic-authentication (probabl...
Hi guys, there is something that i would like do.
i have 4 class:
class delivery(models.Model):
name= models.CharField(max_length=100)
date_join= models.DateField()
....
class Town(models.Model):
delivery_guy = models.ForeignKey(delivery)
name = models.CharField(max_length=100)
....
class...
Hi guys, theres is a way to overriding the save method for inlines form and parent in the same time?
i would like to change the value of a field when the use save the edited inlines form...
Thanks :)
...
#admin.py
class GameListAdmin(admin.ModelAdmin):
list_display = ['game', 'position']
ordering = ('position',)
class GameAdmin(admin.ModelAdmin):
list_display = ['name', 'status']
actions = [make_published]
#models.py
class Game(models.Model):
name = models.CharField(max_length=200)
status = models.CharField(max_...
I've just installed django on my mac os x snow leopard and got some issues with it.
I just made a very simple project that only contains a simple app.
The app contains just one model and it's a task. When running syncdb the table for tasks is created without any problems and I'm requested to create new user. Everything works fine and I...
H guys, Django admin, all section (menu links) come form models with database table, but, what happen if i need a section without model (no database table) that bring me data from other section with model?
Any idea?
Thanks
...
I have a such model named Foo:
class Foo(models.Model):
name = models.CharField()
entry = models.DateField()
I have 2 types of users who can login to the admin panel, regular and superusers. I want to disallow the edition/deletion of Foo entries that are older than 2 days (by using the entry date field) but superusers may edi...
I'm trying to make a custom view in Django admin. I'm reading from this site, Simple Django Admin Preview, but I have a problem:
ValueError: invalid literal for int() with base 10: '13/preview'
Here is my url.py:
url(r'^admin/diligencias/diligencia/(?P<object_id>\d+)/preview/$','preview'),
Here is my view.py:
@staff_member_require...
I would like to add a tool link at the top of my admin change_list.html, which I have already done, and have this link basically be able to produce some sort of printable document version of my models data based off of my current filter settings. Basically a print button in the admin change_list.html.
so far I have overridden the chang...
Hi guys, i would like to know , how ill know which inlines forms was edited?
In my case i want to save a custom value for every inlines form when was edited, so, how i know how much was edited or which one?
thanks
...
I'm trying to show thumbnail images in Django admin, but I can only see the path to the images, but not the rendered images. I don't know what I'm doing wrong.
Server media URL:
from django.conf import settings
(r'^public/(?P<path>.*)$', 'django.views.static.serve',{'document_root': settings.MEDIA_ROOT}),
Function model:
def image_i...
hi
i'm experimenting with django and the builtin admin interface.
I basically want to have a field that is a drop down in the admin UI. The drop down choices should be all the directories available in a specified directory.
If i define a field like this:
test_folder_list = models.FilePathField(path=/some/file/path)
it shows me all t...