What sequence of events made Django the most popular Python web framework .. and still so? Even though several other frameworks exist.
Note: This question is neither argumentative nor confrontational. I merely asked for (objective) "the sequence of events" that lead to its actual popularity. Being aware of the dynamics of software accep...
I am trying to test how a view behaves when there is certain data stored in the session. To do so I have created the session in the test method and invoked an interactive shell at the very beginning of the view:
Test Method:
def test_user_with_unused_tests(self):
"User is given a test and sent to test start"
# todo: insure that...
I'm new to both Django and Cappuccino. I have a Django site setup and running through Apache via mod_wsgi. I want to use Django as the backend for a Cappuccino application, but a VirtualHost setup in Apache and mod_wsgi to serve a Django application serves static files out of a different location than the normal web root (e.g. http://exa...
It seems by default django's url solver perform case sensitive search for solving url and differentiate between '/Login' and 'login'. My url patterns are as follows.
urlpatterns = patterns('',
(r'^admin/(.*)', admin.site.root),
(r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.STATIC_DOC_ROOT, 'show_...
I'm wonder why it's provided. The field is database dependent, doesn't that make it totally unreliable to use?
I want to store birth year in a model, kinda like
class Person(models.Model):
name = models.CharField(max_length=256)
born = models.IntegerField()
Of course this requires very little space, it should always be 4 "charact...
I have a website done with Django, that was previously done with PHP and CodeIgniter. I've moved the website to Webfaction, changed the DNS and all other configurations, but now my email is full of errors like this:
Error (EXTERNAL IP): /index.php/main/leer/7497
I don't know why the Django app is looking for pages from the PHP app, sp...
I have a programm where i get the values of two variables for example x and y using javascript functions.How can i send them to the django server so as to do something(for example search in the database for matching values).How can i do this "SENDING" thing.Which language should i use for example?
...
Hi, guys, i would like to know if sorl-thumbnail have any option to crop from the bottom to the top... i have a litter problem, in some picture sorl-thumbnail is croping the head of the people in pictures.
Thanks
...
I have a model like this:
class Task(models.model):
TASK_STATUS_CHOICES = (
(u"P", u'Pending'),
(u"A", u'Assigned'),
(u"C", u'Complete'),
(u"F", u'Failed')
)
status = models.CharField(max_length=2, choices=TASK_STATUS_CHOICES)
prerequisites = models.ManyToManyField('self', symmetrical=Fals...
I've got a model where I need to store birth year. I'm using django admin. The person using this will be filling out loads of people every day, and DateField() shows too much (not interested in the day/month).
This is a mockup model showing how it is now:
class Person(models.Model):
name = models.CharField(max_length=256)
born = mo...
I have a Django Model with a text field. I would like to modify the content of the text field before it's presented to the user in Django Admin.
I was expecting to see signal equivalent of post_load but it doesn't seem to exist.
To be more specific:
I have a text field that takes user input. In this text field there is a read more sep...
A few of the options in the django settings file are urls, for example LOGIN_URL and LOGIN_REDIRECT_URL. Is it possible to avoid hardcoding these urls, and instead use reverse url mapping? At the moment this is really the only place where I find myself writing the same urls in multiple places.
...
Hi guys, im trying to send my title post to twitter, in my local machine is working great!!!, but in remote i have this error from the snippet file:
AttributeError: 'module' object has no attribute 'Api'
im Using python-twitter and this snippet, i dont know why the error, i tested the python-twitter with commands like import twitter a...
How can I display objects that link to an object via a ForeignKey in Django (specifically in the admin interface). For example, if I click on an object, I'll not only see the object but also any other object that link to it. e.g. I have a model for "Manufacturer" and another one for "Model"...the "Model" model links to "Manufacturer" v...
On logging in, the request's session key changes.
This makes it hard to use sessions, for activities that should persist across login, such as, say a shopping cart, where the login is prompted only while check out.
What is the best way to implement such a cart, which persists across login. One solution would be to have a table with ses...
heya,
I've been asked to quickly put together a small system that takes a Yahoo XML feed, parses it, and creates a HTML fragment based on it.
At the moment, I'm using Django to handle the URL routing, with some Python script, and outputting a bit of HTML in a (with hardcoded dimensions as inline CSS), that can hopefully be put into an...
Hi. I have part of a model defined like this:
logo_image = models.ImageField(upload_to=lambda i, fn: "logo_%s"%(fn), height_field="logo_image_height", width_field="logo_image_width")
and had a question about the upload_to function.
According to django's documentation for FileField.upload_to, the second paramater, filename is "The fil...
I'm developing a Django app that uses python-openid. The app is running on my development server at home.
Similar to stackoverflow's login mechanism, I'd like users to login to my website using their Google credentials.
The code I've implemented to do this, works well for a couple weeks, and then stops working. I get stuck during the ...
I'm running Django as threaded fastcgi via flup, served by lighttpd, communicating via sockets.
What is the expected CPU usage for each fastcgi thread under no load? On startup, each thread runs at 3-4% cpu usage for a while, and then backs off to around .5% over the course of a couple of hours. It doesn't sink below this level.
Is thi...
In django admin I wanted to set up a custom filter by tags (tags are introduced with django-tagging)
I've made the ModelAdmin for this and it used to work fine, by appending custom urlconf and modifying the changelist view. It should work with URLs like: http://127.0.0.1:8000/admin/reviews/review/only-tagged-vista/
But now I get 'inval...