Hi,
When using inline formsets, how does one do paging? I'm using django 1.1.
The situation I'm in, is that the user needs to be able to edit the related objects quickly and easily (which is why I think I should be using an inline formset). However, there can be a more than a hundred objects to edit, which makes a pretty large formset,...
I have two models:
class Actor(models.Model):
name = models.CharField(max_length=30, unique = True)
event = models.ManyToManyField(Event, blank=True, null=True)
class Event(models.Model):
name = models.CharField(max_length=30, unique = True)
long_description = models.TextField(blank=True, null=True)
I want to cr...
Background
I've created three Django models—Inventory, SalesOrder, and Invoice—to model items in inventory, sales orders for those items, and invoices for a particular sales order. Each sales order can have multiple items, so I've used an intermediary junction table—SalesOrderItems—using the through argument for the ManyToManyField. Als...
Given an admin media class that sets up a rich text editor, like:
class TutorialAdmin(admin.ModelAdmin):
fields...
class Media:
js = ['/paths/to/tinymce.js',]
I would like the ability to selectively override js depending on a field value in the model it references. I've added a "use_editor" boolean to the Tutorial mo...
Hi folks!!
I have various models of which I would like to keep track and collect statistical data.
The problem is how to store the changes throughout time.
I thought of various alternative:
Storing a log in a TextField, open it and update it every time the model is saved.
Alternatively pickle a list and store it in a TextField.
Save...
Hi,
I'm trying to generate some charts using django-googlecharts. This works fine for rather static data but in one case I would like to render a different number of lines, based on a variable. I tried this:
{% chart %}
{% for line in line_data %}
{% chart-data line %}
{% endfor %}
{% chart-size "390x200" %}
{% chart-...
Hello everyone,
I am building a web-based application. The frontend has been designed in Sproutcore. For the backend, we have our own python API which handles all transactions with multiple databases. What is the best way to hook up the front-end with the back-end.
AFAIK django is pretty monolithic (correct me if i am wrong) and it w...
With Django's new multi-db functionality in the development version, I've been trying to work on creating a management command that let's me synchronize the data from the live site down to a developer machine for extended testing. (Having actual data, particularly user-entered data, allows me to test a broader range of inputs.)
Right no...
I'm developing a web application that will require users to either make one time deposits of money into their account, or allow users to sign up for recurring billing each month for a certain amount of money.
I've been looking at various payment gateways, but most (if not all) of them seem complex and difficult to get working. I also se...
I would like to create a secure iCalendar Feed with Django. I currently have a feed working using vobject, but it is accesable to the public. Is there a way to secure a iCalendar feed used by iCal, Google Calendar, and Outlook?
...
My friend says that Django only has 1 thread or something?
And I have to edit my 000-default in order to add more processes? He suggests 4 or 5.
What exactly is this, and what do I have to do?
Thanks, I'm a noob.
...
I am trying to learn django by following along with this tutorial. I am using django version 1.1.1
I run
django-admin.py startproject mysite
and it creates the files it should. Then I try to start the server by running
python manage.py runserver
but here is where I get the following error.
Traceback (most recent call last):
Fil...
Django's form library has a feature of form sets that allow you to process dynamically added forms. For example you would use form sets if your application has a list of bookmarks you could use form sets to process multiple forms that each represent a bookmark.
What about if you want to dynamically add a field to a form? An example wo...
Am having a bit of a problem making my django application run in SUSE linux 9. I have Python2.5 installed well, Django 1.0 installed well. Am able to execute django command
django-admin startproject fine
But when i run the runserver command i get the error below. i have a folder with sqlite3, i can go in there and actually run the sqli...
Hi,
I have 2 forms in my Django view. How can I do a check to see which one has been submitted?
Thanks
...
Alias /media/ /home/matt/repos/hello/media
<Directory /home/matt/repos/hello/media>
Options -Indexes
Order deny,allow
Allow from all
</Directory>
WSGIScriptAlias / /home/matt/repos/hello/wsgi/django.wsgi
/media is my directory. When I go to mydomain.com/media/, it says 403 Forbidden. And, the rest of my site doesn't work because all st...
When I run my django test I get following errors, that are outside of my test suite:
======================================================================
ERROR: test_known_user (django.contrib.auth.tests.remote_user.RemoteUserCustomTest)
----------------------------------------------------------------------
Traceback (most recent call...
All,
How Can we increment a value like the following in django templates,
{{ flag =0 }}
{% for op in options %}
{{op.choices}}<input type="radio" name="template" id="template" value="template{{flag++}}"/>
{% endfor %}
thanks..
...
Hello! I'm now making unit-tests for already existing code. I faced the next problem:
After running syncdb for creating test database, Django automatically fills several tables like django_content_type or auth_permissions.
Then, imagine I need to run a complex test, like check the users registration, that will need a lof ot data tables...
hi
I have following problem.
I have model:
class Towar(models.Model):
nrSeryjny=models.CharField(max_length=100)
opis=models.CharField(max_length=255)
naStanie=models.NullBooleanField(null=True)
def __unicode__(self):
return "%s" % self.opis
def lowerName(self):
return self.__class__.__name__.lower()
def c...