Is there a way to customize the way a field is displayed in the django admin results list?
For example, I'd like to display an image based on the field value, just like boolean fields are displayed using an image rather than text value.
...
I have a multivaluefield with a charfield and choicefield. I need to pass choices to the choicefield constructor, however when I try to pass it into my custom multivaluefield I get an error __init__() got an unexpected keyword argument 'choices'.
I know the rest of the code works because when I remove the choices keyword argument from ...
Hi!
I'm using dango 0.97 pre (yep, my site still was not upgraded to be compatible with trunk). I use apache + fastcgi for it. And I have a strange problem: sometimes (I can't guess the order) some of the views throw such error:
Tried audio_index in module mysite.audio.views. Error was: 'module' object has no attribute 'validators'
Th...
In Django's admin, I want disable the links provided on the "select item to change" page so that users cannot go anywhere to edit the item. (I am going to limit what the users can do with this list to a set of drop down actions - no actual editing of fields).
I see that Django has the ability to choose which fields display the link, ho...
I have a certain class structure in my app, that currently utilizes django for presentation. I was not using the model layer at all, - the database interaction routines are hand-written.
I am, however, considering the possibility of actually using django to its full potential and actually using the database-abstraction layer. The quest...
Why?
C:\path\>manage.py shell
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getlocale()
('Spanish_Colombia', '1252')
>>> locale.currency( 1885, grouping=True )
'$ 1.885,00'
>>> locale.currency...
What I need to do is run a process that might take hours to complete from a Django view. I don't need to the state or communicate with it but I need that view to redirect away right after starting the process.
I've tried using subprocess.Popen, using it within a new threading.Thread, multiprocessing.Process - parent process keeps hangin...
I have an web address:
http://www.example.com/org/companyA
I want to be able to pass CompanyA to a view using regular expressions.
This is what I have:
(r'^org/?P<company_name>\w+/$',"orgman.views.orgman")
and it doesn't match.
Ideally all URL's that look like example.com/org/X would pass x to the view.
Thanks in advance!
...
I don't want to restart the memcached server!
...
background: url({{ MEDIA_URL }}/bg.jpg);
That does not work, because this Django template function only works in .html!
...
Hi
I want to install satchmo in my virtual hosting, but they dont provide ssh access for it. I want to know if it is possible. As i can see, adding some Satchmo requirements(http://www.satchmoproject.com/docs/svn/requirements.html) to pythonpath in my .fcgi file seems to be working, but some requirements like pycrypto and trml2pdf look ...
I don't understand is it normal or it's time to create new django's ticket?
In [17]: User.objects.filter(pk=0)
Out[17]: []
In [18]: User.objects.filter(pk=0).exists()
Out[18]: True
The exists() should return False result in this case, I think. This is revision 11653 (Development version)
I have related problem with unique validating...
I am trying to install django-photologue. Everything seems ok, because I install and set up following the official guidelines. I have to upload some photos as examples. However, when viewing a photo or gallery details , then an error as follows:
Caught an exception while rendering: 'Photo' object has no attribute 'get_thumbnail_url'
I...
I am trying to enable sluggified URLs in Django of the form that SO uses: example.com/id/slug.
I have no problem enabling slugs, and have URLs currently set up of the form: http://127.0.0.1:8000/articles/id/ (eg. /articles/1/) and that works fine. The corresponding URLpattern is:
(r'^(?P<object_id>\d+)/$', 'django.views.generic.list_de...
I am trying to use the dynamic django form script from
http://www.djangosnippets.org/snippets/714/
The dynamic form is generated, but I am having hard time retrieving submitted fields through form.cleaned_data['myfield']
There are few comments on the snippet page, those didn't work either.
...
I have a project that I am working on in django. There are a lot of instances where I:
raise Http404("this is an error")
and it creates a nice 404 page for me with the error message "this is an error" written on it. I now want to create a custom error page and have it still display the message, but I can't figure out how. I'm sure it'...
Is there an Eclipse plugin to help with Django projects/apps? If there are multiple choices, what is your recommendation?
...
Hi All:
I've got a server and we run a django powered site. Since we want to test the site, so we use django's build-in development server(i.e runserver). But I'm curious about the ip of the command:
python manage.py runserver 0.0.0.0:80
Then we can visit the test site using server's ip remotely. But when I try:
python manage.py run...
I'm trying to get my head around Cappuccino. I'd like my StackOverview peers to review the architecture below and see if it makes sense - the aim is to utilize the unique benefits of Django and Cappuccino without doubling up where the technologies overlap...
When the web browser requests a 'friendly' URL (eg, /, /articles, etc):
DJang...
Is posible to define an attribute in a data model like an object of other data model in Django?
This is the scenary:
models.py
class Inmueble(models.Model):
calle = models.CharField(max_length=20, verbose_name="Calle")
numero = models.CharField(max_length=6, verbose_name="Numero")
piso = models.IntegerField(verbose_name="Pi...