I'm looking a Django app I'm looking for an app that that allows for management and integration of footnotes for articles
just wondering if anyone had seen something around...
When making a django request through json as,
var info=id + "##" +name+"##"
$.post("/supervise/activity/" + info ,[] ,
function Handler(data,arr)
{
}
In urls.py
(r'^activity/(?P<info>\d+)/$, 'activity'),
In views,
def activity(request,info):
print info
The request does not go through.info is a string.How can this be…
I don't know if its me but {% tag ??? %} has bee behaving a bit sporadically round me (django ver 1.2.3). I have the following main.html file:
<html>
{% include 'main/main_css.html' %}
<body>
test! <a href="{% url login.views.logout_view %}">logout</a>
test! <a href="{% url client.views.client_search_last_name_view…
I have looked a lot on google for answers of how to use the 'url' tag in templates only to find many responses saying 'You just insert it into your template and point it at the view you want the url for'. Well no joy for me :( I have tried every permutation possible and have resorted to posting here as a last resort.
So here it is. My…
Hello,
I have two models:
class Model1():
name = CharField()
url = CharField()
class Model2():
model1 = ForeignKey(Model1)
user = ForeignKey(User)
zzz = CharField()
There are 5 rows for model1 in the database, these are fixed and will rarely change.
I need to display a formset for model2 that allows users to…
A form will be spitting out an unknown number of questions to be answered. each question contains a prompt, a value field, and a unit field. The form is built at runtime in the formclass's init method.
I'd like each question rendered on the form as an inline: prompt, value(input-text), units (select).
this seems a case perfect…
This post relates to this:
http://stackoverflow.com/questions/520421/add-row-to-inlines-dynamically-in-django-admin
Is there a way to achive adding inline formsets WITHOUT using javascript? Obviously, there would be a page-refresh involved.
So, if the form had a button called 'add'...
I figured I could do it like this:
if…
I am trying to display the 3 select fields that are rendered out using Django SelectDateWidget on one line. When I use crispy forms, they are all on separate rows. Is there a way to use the Layout helper to achieve this?
Thank you!
class WineAddForm(forms.ModelForm):
hold_until =…
I'm new to django and I'm trying to get display a list of buildings and sort them alphabetically, then load it into an html document. Is there something that I am not doing correctly?
below is models.py
class Class(models.Model):
building = models.CharField(max_length=20)
…
Hi.
I have ceated several django apps and stuffs for my own fund and so far everything has been working fine.
Now i just created new project (django 1.2.1) and have run into trouble from 1st moments.
I created new app - game and new model Game. i created admin.py and put…
I saw this question and recommendation from Django Projects here but still can't get this to work. My Django Admin pages are not displaying the CSS at all.
This is my current configuration.
settings.py
ADMIN_MEDIA_PREFIX = '/media/admin/'
httpd.conf
<VirtualHost…
I have an Attachment model that has a FileField in a Django1.4.1 app. This FileField has a callable upload_to parameter which, per the Django docs should be called when the form (and therefore the model) is saved.
When I run FormTest below, the upload_to callable is…
Well, i've walking around this for a couples of days now... I think is time to ask for some help, i think my installation is ok...
Server OS: Centos 5
Python -v 2.6.5
Django -v (1, 1, 1, 'final', 0)
my apache conf:
<VirtualHost *:80>
DocumentRoot…
I have a Django application with some fairly common models in it: UserProfile and Organization. A UserProfile or an Organization can both have 0 to n emails, so I have an Email model that has a GenericForeignKey. UserProfile and Organization Models both…
hi i have to following model
class Match(models.Model):
Team_one = models.ForeignKey('Team', related_name='Team_one')
Team_two = models.ForeignKey('Team', related_name='Team_two')
Stadium = models.CharField(max_length=255, blank=True)
…
I need to detect when some of the fields of certain model have changed in the admin, to later send notifications depending on which fields changed and previous/current values of those fields.
I tried using a ModelForm and overriding the save() method,…
Hello!
I have a ForeignKey relationship between TextPage and Paragraph and my goal is to make front-end TextPage creating/editing form as if it was in ModelAdmin with 'inlines': several field for the TextPage and then a couple of Paragraph instances…
This is are my models i want to relate. i want for collection to appear in the form of occurrence.
class Collection(models.Model):
id = models.AutoField(primary_key=True, null=True)
code = models.CharField(max_length=100, null=True,…
Having a ModelFormSet built with modelformset_factory and using a model with an optional ForeignKey, how can I make empty (null) associations to validate on that form?
Here is a sample code:
### model
class Prueba(models.Model):
…
I want to create a field for phone number input that has 2 text fields (size 3, 3, and 4 respectively) with the common "(" ")" "-" delimiters. Below is my code for the field and the widget, I'm getting the following error when trying…
All,
i have the following model defined,
class header(models.Model):
title = models.CharField(max_length = 255)
created_by = models.CharField(max_length = 255)
def __unicode__(self):
return self.id()
class…
hi i have to following model
class Match(models.Model):
Team_one = models.ForeignKey('Team', related_name='Team_one')
Team_two = models.ForeignKey('Team', related_name='Team_two')
Stadium =…
Suppose I have a model:
class SomeModel(models.Model):
id = models.AutoField(primary_key=True)
a = models.IntegerField(max_length=10)
b = models.CharField(max_length=7)
Currently I am using the…
I'm having difficulty uploading the following model with model form. I can upload fine in the admin but that's not all that useful for a project that limits admin access.
#Models.py
class…
I have an inlineformset with a custom Modelform. So it looks something like this:
MyInlineFormSet = inlineformset_factory(MyMainModel, MyInlineModel, form=MyCustomInlineModelForm)
I am…