2
votes
2answers
16 views

Django send mail from admin panel

I want to sent email to user's from django admin panel and store the sent mail in database too.I have two usertypes 1.Staff 2. Students. When I select staff and give email, it'll sent email to all the ...
0
votes
0answers
30 views

Django admin issues with empty translated values and unique=True

I'm trying to use django-modeltranslation but I can't get it working well. I'm suffering because Django admin crashes with empty translated values and unique=True. This appears as a closed issue, but ...
0
votes
1answer
20 views

post_save signal and relations

I am applying the post_save signal to apply user rights per object, and then filter the queryset accordingly. My model is like this: class Project(models.Model): # Relations with other entities. ...
0
votes
1answer
12 views

openshift-django : syncdb, deploy script not running

Is there any way by which I can run syncdb from my terminal? I don't know why my action_hooks/deploy script is not running. When I open my openshift database it show no table created.
0
votes
0answers
35 views

export items from database in .csv format Django

views.py @login_required def export_csv(request): user = request.user # heading columns headerrow = ['Filename', 'Description','Notes other','Reporter Name'] allrows = [] today = ...
0
votes
0answers
35 views

Django South migration history causing an integrity error

My south migration history table is causing integrity errors every time I try to run a new migration. Here is the error: django.db.utils.IntegrityError: duplicate key value violates unique ...
0
votes
2answers
44 views

How to Dynamically Access Fields from Foreign Key in Django Admin

So I have models like this: class Celebrity(models.Model): #30+ fields here ... class HoneyBadger(models.Model): name = models.CharField(max_length=10) celebrity_owner = ...
0
votes
2answers
36 views

OneToMany queries in Django

I'm having some trouble working out the best way to do queries with one to many relationships in Django. Best explained by an example: class Item(models.Model): name = ...
0
votes
1answer
18 views

Implement Django aggregate object that is not mapped to database

I have a model query function written in a test as contracts = Contracts.objects.all() contractPlans = ContractPlans.objects.filter(contractnum__in = contracts) parentorgs = Parentorgs.objects.all() ...
0
votes
1answer
22 views

Odd values_list and filter behavior in Django

I'm trying to reduce the number of queries on the database in a Django app. Rather than using three nested loops to execute quite a number of database queries, I'd like to use the method that was ...
0
votes
1answer
20 views

Resolving TypeError when comparing unicode strings in conditional

I have two classes that are connected by a FK constraint in the model. After executing a query, I'm packing a list of the return objects in the QuerySet where the related object's field matches the ...
0
votes
2answers
31 views

Django Forum App Project Structure

EDIT: I'm new to this site but if you are going to down vote me, could you perhaps explain why? I've searched Google, this site and others but have not found anything that makes any sense and I ...
0
votes
2answers
132 views

Django: Error No module named apps.homepage

So I'm following a tutorial from programmersbook.com and I'm at a point where I've finished the 7th video located here ...
26
votes
4answers
5k views

Get all related Django model objects

How can I get a list of all the model objects that have a ForeignKey pointing to an object? (Something like the delete confirmation page in the Django admin before DELETE CASCADE). I'm trying to ...
0
votes
0answers
19 views

django-hvad and django-model-utils comdined?

I'm stuck a little bit with choosing django packages, that'll simplify the developing process for me: currently I'm using django-model-utils in order to get inheritance managers and stuff. Now I'm ...

1 2 3 4 5 137
15 30 50 per page