In my project, I have a contacts model.
I have separate models, such as Person, Institution, Supplier, or Shipper that
all have a foreign key to contacts.
So it looks like you’re doing it the way that I would do it.
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Be
Try using the @never_cache decorator on your login view.
https://docs.djangoproject.com/en/1.11/topics/http/decorators/#django.views.decorators.cache.never_cache
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of fábio andrews rocha marques
Sent: Tuesday, Oct
arted and i already got the message
"usuário já existe"(username already exists) and still the problem i stated
occurred. Is it something i am doing wrong? Like, i should remover the return
renders from my function after putting @never_cache?
On Tuesday, October 31, 2017 at 11:25:28
I had a similar issue and even tried using sessions, but I eventually found
that never_cache worked beautifully for me. I didn’t have to worry about
sessions any more.
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of fábio andrews rocha marques
Sent: Tues
function? What should i return instead?
On Tuesday, October 31, 2017 at 2:46:01 PM UTC-3, Matthew Pava wrote:
I had a similar issue and even tried using sessions, but I eventually found
that never_cache worked beautifully for me. I didn’t have to worry about
sessions any more.
From: django...@go
Though it doesn’t directly answer your query, you might be interested in this
package:
https://github.com/burke-software/django-report-builder
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Samuel Abels
Sent: Monday, November 6, 2017 1:33 PM
To: Django u
need something more tailored.
-Samuel
On Monday, November 6, 2017 at 8:56:29 PM UTC+1, Matthew Pava wrote:
Though it doesn’t directly answer your query, you might be interested in this
package:
https://github.com/burke-software/django-report-builder
From: django...@googlegroups.com
[mailto:
om] On
Behalf Of Samuel Abels
Sent: Monday, November 6, 2017 2:22 PM
To: Django users
Subject: Re: Equivalent of multi-table JOIN (another post on reverse
select_related)
On Monday, November 6, 2017 at 9:15:09 PM UTC+1, Matthew Pava wrote:
Maybe you are expecting too much from the user interfa
It looks like you’re running it in Python 3, not Python 2.7.12. I would start
looking there.
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Ankush Chauhan
Sent: Friday, November 10, 2017 4:35 AM
To: Django users
Subject: Error in django 1.8.7 version wi
Are you saving the string representation of the model instance? I would cast
the model instance as a str in that case, i.e. str(instance).
-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Henrik Baran
Sent: Sunday, November 12,
That is an interesting setup. We just use login middleware that automatically
redirects to the LogIn view with a next GET parameter.
In your situation, I would probably treat the form as ajax and create an ajax
view for handling the login form processing. Just change your action URL to
your a
We can download PDFs in our project.
We start out generating the PDF on the server. We read the contents of it into
a variable to put it into memory. Then we delete the file on the server (it’s
still in memory), and the response is itself the PDF document.
I’ll share the last bit of code that
https://docs.djangoproject.com/en/1.11/ref/models/database-functions/#extract
MyModel.objects.order_by('birthday__month', 'birthday__day')
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Dan Tagg
Sent: Tuesday, November 21, 2017 12:58 PM
To: django-users@g
I have a problem in which I would like to solve with SQL recursive queries
using the ORM (a bill of materials tree, actually). In particular, I was
looking at PostgreSQL's WITH RECURSIVE statement.
I discovered this paper in my research, which seems to indicate that Django had
such a feature or
I’ve done more research. The proper term of these Recursive Queries is Common
Table Expressions (CTEs). I learned that a developer had already worked on
trying to get these in Django more towards the beginning of this year, but it
doesn’t look like it was taken.
Django-mptt looks like it will
Is settings.DEBUG set to True?
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of ???
Sent: Tuesday, December 5, 2017 9:00 PM
To: Django users
Subject: django 2.0 url to path
i try to use path instead of url
but there are some problem
following is my code
Oh, and it looks like you need to add a “/” to the end of your
'application/register' path.
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Matthew Pava
Sent: Wednesday, December 6, 2017 8:26 AM
To: 'django-users@googlegroups.com'
Sub
>> Please keep your political rhetoric and irresponsible scaremongering off
>> this list.
>> All the net neutrality repeal will do is restore some of the permissionless
>> innovation that allowed the internet to blossom in the first place.
Dear Larry,
Please read what you just wrote. On the on
Fellow users,
I have an unmanaged model that references a view in my PostgreSQL 9.5 backend.
I am trying to apply an annotation through the ORM in that model's manager.
Unfortunately, I am getting an error that some fields "must appear in the GROUP
BY clause or be used in an aggregate function
1 décembre 2017 10:43:34 UTC-5, Matthew Pava a écrit :
Fellow users,
I have an unmanaged model that references a view in my PostgreSQL 9.5 backend.
I am trying to apply an annotation through the ORM in that model’s manager.
Unfortunately, I am getting an error that some fields “must appear in th
You context dictionary key is “latest_question_list”, and this is passed into
your template. Your python variable is named latest_ques, which the template
is not aware of.
So you need to change your html temple or your context key.
Also, watch your case. “question” and “Question” are two diffe
I use the perms object in my templates.
{% if perms.app_name.fooperm %}
{% endif %}
See https://docs.djangoproject.com/en/2.0/topics/auth/default/#permissions
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of guettli
Sent: Friday, December 15, 2017 8:09 AM
T
We use gsprint (for Windows printing) and Ghostscript.
http://pages.cs.wisc.edu/~ghost/gsview/gsprint.htm
https://www.ghostscript.com/
We have generic print view, and when users click on a button on the UI, our app
generates a PDF and then sends that to a printer on the local network. The
print
Use a many-to-many field instead.
https://docs.djangoproject.com/en/2.0/topics/db/models/#many-to-many-relationships
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Hasanul Islam
Sent: Tuesday, December 26, 2017 9:52 AM
To: Django users
Subject: How to sto
The problem is in your HTML template.
Your form tag really only has to be this (the action attribute should be a URL;
otherwise, it assumes the current URL):
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Steven Meyer
Sent: Thursday, December 28, 2017 7
Hi everyone,
I am finally able to move to Django 2.0, but I just noticed an error I keep
getting when attempting to open the admin:
TemplateSyntaxError at /admin/
Invalid block tag on line 58: 'get_admin_log', expected 'endblock'. Did you
forget to register or load this tag?
Does anyone have an
override your admin templates?
On Fri, Jan 5, 2018 at 5:20 PM, Matthew Pava
mailto:matthew.p...@iss.com>> wrote:
Hi everyone,
I am finally able to move to Django 2.0, but I just noticed an error I keep
getting when attempting to open the admin:
TemplateSyntaxError at /admin/
Invalid block
lto:django-users@googlegroups.com] On Behalf Of m1chael
Sent: Friday, January 5, 2018 4:25 PM
To: django-users@googlegroups.com<mailto:django-users@googlegroups.com>
Subject: Re: Django 2.0.1 admin
did you ever override your admin templates?
On Fri, Jan 5, 2018 at 5:20 PM, Matthew Pava
mailto:matthew.p.
Check this out for how to redirect:
https://docs.djangoproject.com/en/2.0/topics/http/shortcuts/#redirect
Check this out for how Django determines the name of primary key fields:
https://docs.djangoproject.com/en/2.0/topics/db/models/#automatic-primary-key-fields
The best advice has already been
If I'm understanding you correctly, you could use a callable in the
list_display definition.
https://docs.djangoproject.com/en/2.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_display
def lower_case_name(obj):
return ("%s" % str(obj).lower()
lower_case_name.short_description = 'Sub
Temporal tables are not part of Django, but you could try to manually make
them. Saying that, it appears that are at least a couple of Django packages
that try to make it easier to use them in the ORM.
This one looks decent, but its build is not passing:
https://github.com/arkhipov/temporal_ta
Typically, that indicates a permissions problem. Are you signed in to your
app? Does the account you are signed into have permissions to access that URL?
Check your decorators.
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of mohammad
Sent: Thursday, Ja
You might want to look into this 3rd-party package that will give you access to
the Exchange API.
https://github.com/ecederstrand/exchangelib
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Harrison Latimer
Sent: Wednesday, January 17, 2018 3:59 PM
To: Dj
I think the primary suggestion would be to not use global variables. Is there
any way you could re-implement the function without using those global
variables? Maybe creating a variable in the settings file for you to use?
If you can’t, is there possibly a problem with the get_wb_pdf_as_zip fun
I just want to point out something called WebAssembly. It's supported across
all modern browsers. Presumably, you can write a program in Python, convert it
to WebAssembly, and it will run in your browser. I haven't worked with it
myself, but I am keeping my eye on it because I would like to t
At first, I would do your step 1. I would check for any other errors in Django
1.8, and then proceed with updating to 1.9 -> 1.10 -> 1.11 -> 2.0. You are
probably going to find other issues that need to be resolved in those upgrades.
Ultimately, you will probably have to do step 3. I wouldn’
I’m not familiar with Docker, but I did have to add the path to Python 3.6 DLLs
in my WSGI configuration in my Apache configuration file.
WSGIPythonPath ${project_path};${virtualenv};C:/Python36/DLLs;
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of PASCUAL
You’ll want to use card.get_absolute_url.
See https://docs.djangoproject.com/en/2.0/ref/models/instances/#get-absolute-url
In your get_absolute_url, you should probably use the reverse method to use the
name of a URL rather than hard-coding it in the method. That’s the second
example in that sec
Check the value of b.value. Make sure it isn’t None.
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of sum abiut
Sent: Wednesday, February 21, 2018 4:06 PM
To: django-users@googlegroups.com
Subject: django mathfiters
Hi,
How to you a zero in mathfilter
for
values. But still its displaying nothing.
Thanks
On Thu, Feb 22, 2018 at 9:15 AM, Matthew Pava
mailto:matthew.p...@iss.com>> wrote:
Check the value of b.value. Make sure it isn’t None.
From: django-users@googlegroups.com<mailto:django-users@googlegroups.com>
[mailto:django-users@goog
You may want to look at the model _meta API.
https://docs.djangoproject.com/en/2.0/ref/models/meta/
You are looking for a list of all the ForeignKeys, but you also probably want
other relations such as OneToOne and ManyToMany.
You probably want something like the get_all_related_objects method:
h
You can always override the save method on the model. If you need to make all
your models override the save method, use inheritance.
class DoNotSaveModel(models.Model):
def save(*args, **kwargs):
pass
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Be
Let's see InvoiceForm.
Also, it doesn't make much of a different, but I wouldn't call copy on the
super.get_initial() method.
-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Gabriel Wicki
Sent: Sunday, March 4, 2018 2:48 PM
To:
quot;InvoiceForm.__init__();;;")
#print( self)
print( args)
print( kwargs)
return super(InvoiceForm, self).__init__( *args, **kwargs )
Am Dienstag, 6. März 2018 18:08:33 UTC+1 schrieb Matthew Pava:
Let's see InvoiceForm.
Also, it doesn't
but i'm unable to get further in my
work at this point. thanks for your time and your advice!
Am Mittwoch, 7. März 2018 18:44:40 UTC+1 schrieb Matthew Pava:
Well, I see that you only set self.jobs<http://self.jobs> in the post method in
CreateInvoice. How are you seeing proper conso
Did you look at the Subquery expression?
https://docs.djangoproject.com/en/2.0/ref/models/expressions/#subquery-expressions
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Bernd Wechner
Sent: Thursday, March 15, 2018 1:57 AM
To: Django users
Subject: Re: F
Use self.kwargs.get(‘gwpk’)
https://docs.djangoproject.com/en/2.0/topics/class-based-views/generic-display/#dynamic-filtering
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of RisenFenix
Sent: Friday, March 16, 2018 7:55 AM
To: Django users
Subject: Question
ROM clause in the ORM is dictated by the model in the syntax
model.objects.filter(), where filter() defines the WHERE clause and model the
FROM clause. How can a SubQuiery be put into place there, in the FROM clause?
I would dearly love to learn that was possible and I've overlooked it somehow.
Re
Maybe you are looking for “empty_label=None”?
https://docs.djangoproject.com/en/2.0/ref/forms/fields/#django.forms.ModelChoiceField.empty_label
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of shawn...@gmail.com
Sent: Wednesday, March 28, 2018 6:09 AM
To: D
I have a QuerySet that I annotated fields based on some conditional logic, and
then I pass that QuerySet to another function. In that function, I'd like to
retrieve a list of all the annotated fields on the QuerySet. Is there any way
to do that?
--
You received this message because you are s
Add a new view that returns the files. Connect the “Download” button to the
URL to that view.
Your view should return an HttpResponse object. For instance, I use this for
the user to download PDF versions of forms:
response = HttpResponse(pdf_contents, content_type='application/pdf')
response[
Hi Chris,
SQL Server is not one of the databases that Django supports out of the box.
There are third party packages available, though, but I haven’t tested any of
them with recent versions.
Saying that, you can create views in your database backend. In your migrations
file, use the RunSQL ope
Hi Chris,
The migrations will be run whenever you execute the migrate command. When I
want to make changes to an unmanaged model, in the next migration file I add a
DROP statement to RunSQL, and then the new code to generate the VIEW. I
haven’t attempted reversing a migration, though. I try t
Is there something stopping you from using this construct?
{% for item in graphobject %}
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Jani Tiainen
Sent: Thursday, April 19, 2018 11:29 AM
To: django-users@googlegroups.com
Subject: Re: Use self-increasing
You have a list of values. Use the Pythonic way to iterating over a list,
which does not involve using indices.
{% for o in graphobject %}
{{ o }}
{{ o.subfield }}
{% endfor %}
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf
Did you try running makemigrations first?
./manage.py makemigrations
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Akhi
Sent: Monday, April 23, 2018 1:38 AM
To: Django users
Subject: django.db.migrations.exceptions.NodeNotFoundError while upgrading
djan
DIRS does not have the path that you indicated it has. Try changing it.
DIRS = ['designer/template/designer/']
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of John Wilkinson
Sent: Monday, April 23, 2018 7:47 AM
To: Django users
Subject: Cannot find templa
Actually, I just use this construct:
'DIRS': [
# insert your TEMPLATE_DIRS here
os.path.join(BASE_DIR, 'project_name', 'templates'),
],
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of John Wilkinson
Sent: Monday, April 23, 2018 7:47 AM
To: Django u
I’ve been thinking about your idea, and I wonder if there could instead be some
kind of widget for URL objects (or views).
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of guettli
Sent: Thursday, April 26, 2018 8:34 AM
To: Django users
Subject: Re: Crazy Id
In the form’s __init__ method, you’ll have to modify the queryset of the field.
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields[‘choretime’].queryset |=
ChoiceTime.objects.filter(pk=self.instance.pk)
I hope that helps!
From: dja
have the specific ID specified in the URL, so that is the other
part needed. I’ve successfully done your suggestion for CreateView. Now, I just
can’t seem to get UpdateView to work properly.
Thanks much!
Jim
On Apr 27, 2018, at 9:20 AM, Matthew Pava
mailto:matthew.p...@iss.com>> wrote:
y set.
Thanks for the inputs, Matthew. I hope I’ve made it clearer. If you think
there’s a better overall approach, I’m all ears!
Jim
On Apr 27, 2018, at 11:01 AM, Matthew Pava
mailto:matthew.p...@iss.com>> wrote:
That ID in the URL should be taken care of in the view, not the form. Yo
ers@googlegroups.com] On
Behalf Of guettli
Sent: Monday, April 30, 2018 2:25 AM
To: Django users
Subject: Re: Crazy Idea: OOP for "Hyperlink"
Am Donnerstag, 26. April 2018 15:54:31 UTC+2 schrieb Matthew Pava:
I’ve been thinking about your idea, and I wonder if there could instead be
You need a space between def and __str__
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Avitab Ayan Sarmah
Sent: Monday, April 30, 2018 4:07 PM
To: Django users
Subject: I am following the official Django documentation and trying to make
the polls app. Bu
“random letters & numbers”
That looks like merge conflicts with Git. You’ll want to fix those up, not
just by deleting those lines, but by verifying the code does what you want it
to.
You may want to just delete all of your migrations files and start anew if
they’re not important to you.
I use PhantomJS with Django to create PDFs. I just pass in the URL with the
session variable (to maintain authentication) and a few other parameters into a
customized Rasterize.js script.
Is it an “easy” way? I wouldn’t say so, but it works for us.
It gets really crazy when you start asking, “
The advantage with the signals is that you can put all that code in one place.
You may have different views that are saving the same model, and it isn’t DRY
to have to put that same code in multiple locations.
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf
And you’re using PowerShell instead of the command prompt. I typically just
work in the command prompt. With PowerShell, you may have to be more explicit
in your path, such as using “.\django-admin startproject mysite”
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com]
Hi Avitab,
The exception message tries to explain it to you.
“IndentationError: unindent does not match any outer indentation level”
Python expects perfect whitespace with your code, and you can’t mix spaces with
tabs.
In your view function, you are indenting with 4 spaces most of the time, but
y
I came across an interesting issue recently. I had a form with an action set
to "GET". The corresponding view was a django-rest-framework view that was
just supposed to allow for GET requests. However, I couldn't get it to work
because drf was expecting lower case names, and it turns out that
consistency
On woensdag 9 mei 2018 23:00:06 CEST Matthew Pava wrote:
> I came across an interesting issue recently. I had a form with an
> action set to "GET". The corresponding view was a
> django-rest-framework view that was just supposed to allow for GET
> requ
I know it doesn’t directly answer your question, but I have Django running on
Windows Server 2012. After wrestling with IIS for just a bit, I decided to
just use Apache instead.
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Majid Hojati
Sent: Friday, M
Hojati
Sent: Friday, May 11, 2018 1:33 PM
To: Django users
Subject: Re: Deploy on windows IIS
Is there any good tuturial which I can use Apache? I am also using Geoserver
which runs on tomcat port 8080 I hope it does not make any problems
On Friday, May 11, 2018 at 10:55:45 PM UTC+4:30, Matthew Pava
[mailto:django-users@googlegroups.com] On
Behalf Of Majid Hojati
Sent: Saturday, May 12, 2018 12:24 PM
To: Django users
Subject: Re: Deploy on windows IIS
Which Mode_wsgi you used for python 3.6 x86 and apache2.4 Haus x64 for windows ?
On Friday, May 11, 2018 at 11:07:19 PM UTC+4:30, Matthew Pava wrote
You could use the ORM to get the difference of two dates like so:
Person.objects.annotate(age=ExpressionWrapper(Cast(Now(), DateField()) -
F('dob'), output_field=DurationField()))
https://docs.djangoproject.com/en/2.0/ref/models/database-functions/#cast
https://docs.djangoproject.com/en/2.0/ref/mo
go-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Melvyn Sopacua
Sent: Monday, May 14, 2018 9:29 AM
To: django-users@googlegroups.com
Subject: Re: SQL select statements to Django ORM
On maandag 14 mei 2018 15:38:01 CEST Matthew Pava wrote:
> You could use the ORM to get the dif
elect statements to Django ORM
On maandag 14 mei 2018 16:42:49 CEST Matthew Pava wrote:
> But if in your use case, you had a million records in which you were
> trying to filter
Full stop right there. No one is filtering anything in the original use case,
so you're comparing apples a
Though I’ve never seen that error, I’m guessing that maybe you added ‘polls’ to
your INSTALLED_APPS setting more than once. Simply remove the extra references
to it.
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Paolo Chilosi
Sent: Tuesday, May 15, 201
Avitab,
Whitespace is very important to Python.
You added an extra tab to your else and else clause of your try expression.
Consider the error message: unindent does not match outer indentation level
The message is mentioning indents, so let’s check our indents for any problems.
try:
I was using Python 3's f-strings with self.stdout in a BaseCommand.
I keep getting this exception:
TypeError: 'OutputWrapper' object is not callable
Any ideas?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and s
Nevermind…
I was using self.stdout(f’’)
Instead of
self.stdout.write(f’’)
Go figure…
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Matthew Pava
Sent: Monday, May 21, 2018 9:21 AM
To: django-users@googlegroups.com
Subject: f-strings with self.stdout
You can access self.instance, which should have all the fields populated for
that model instance. So you can access it via self.instance.pk.
Keep in mind, though, that if you are creating the Document, you will not have
a pk until after the save is committed, so it won’t be accessible in the cl
I’m not able to wrap my head around your specific application, but if you don’t
want to use a ForeignKey on a formset, don’t use an InlineFormset.
Just use a regular BaseFormset.
https://docs.djangoproject.com/en/2.0/topics/forms/formsets/
From: django-users@googlegroups.com [mailto:django-users
iolates the unique constraint on the model. I did develop a
roundabout way of dealing with the situation: I simply delete all the instances
from the database for forms that are marked for deletion before calling
formset.is_valid(). But I keep thinking to myself that there must be something
I a
We use a package called django-auth-ldap.
https://pythonhosted.org/django-auth-ldap/
It saves some of the LDAP data into the User model everytime the user logs in.
We also have our own Employee model that has a foreign key to the User model,
and if the user logs in without an employee record th
I do see them available as Postgres fields because Postgres supports them
natively. I assume that they aren’t by default in model Fields because other
databases may not support them natively.
https://docs.djangoproject.com/en/1.10/ref/contrib/postgres/fields/
From: django-users@googlegroups.c
Just create another CBV that factors out all of the similarities between all of
the other CBVs. Then inherit from your new CBV to create your more specific
ones. Basically instead of inheriting from the Django CBVs, you will inherit
from your own.
From: django-users@googlegroups.com [mailto:d
I am just a regular user, but I don’t see how a Django setting could possibly
modify some such a setting on the web server. I would just learn how to write
that EB command and take it from there. …I suppose you could try writing a
Python function or a Django command that will append your desir
I would use an if block in the template, and actually, I do use an if block.
So I would have either two context variables with this_month and last_month or
I would look up some filter or template tag to find the month of the current
datetime object in the Django documentation.
{% if month = thi
Hi Larry,
I would just write my own custom view using my own custom forms to do this. I
would add my own custom permissions to apply to my custom view. I would avoid
using DjangoAdmin to handle such a customized use case.
-Original Message-
From: django-users@googlegroups.com [mailto
I would like to be able to change the 'from' address of the admin error emails
in production environments to be the email address of the user that generated
the error. It would be convenient in triaging errors rather quickly.
I did examine the Django source code, but it doesn't appear to be pos
: Admin Email From Address
Hi Matthew,
There should be considered following:
1. Not always cod runs with user interaction - worker cases
2. Not always user authenticated
With such cases who the sender should be?
Regards,
Constantine C.
On Nov 15, 2016 12:43 AM, "Matthew Pava"
mailto
better to call things by its name.
On Tue, Nov 15, 2016 at 4:05 PM, Matthew Pava
mailto:matthew.p...@iss.com>> wrote:
In such cases, we would have a fallback that is already established in the
settings file.
From: django-users@googlegroups.com<mailto:django-users@googlegroups.com>
[m
gging/>.
Hope that helps
On Tue, Nov 15, 2016 at 10:31 PM, Matthew Pava
mailto:matthew.p...@iss.com>> wrote:
The error emails only go to the admins: me. I would not be confused because
the subject line of the email indicates that it is coming from the Django app
starting with [Django].
I am trying to annotate a list of values on a queryset.
Basically, I have a model of Items that are associated many to many to Serial
Numbers, and I want for each distinct Item the list of all Serial Numbers for
that Item.
--
You received this message because you are subscribed to the Google Gr
Render_to_response no longer accepts a context instance parameter (or a “dirs”
parameter).
https://docs.djangoproject.com/en/dev/releases/1.10/
I encourage you to read this document before performing an upgrade:
https://docs.djangoproject.com/en/dev/howto/upgrade-version/
In particular, read the
For what it’s worth, I do get this error sometimes when I am running the
development server, even in Python 3.5 and Django 1.10. But because it’s the
development server, I simply disregard it.
I typically only get this message when I am running several AJAX calls very
close together. (e.g. Whe
I am using Django-auth-ldap as my primary authentication backend. Since using
this package, I have noticed that our LDAP server (actually, an Active
Directory Primary Domain Controller) sometimes cannot be reached by Django (or
Outlook, for that matter, but that's a different problem). Django
If you made any of your customizations to the migrations files, then you will
lose that information.
You may want to consider using Django’s dumpdata management command to save all
the data on your production database (and loaddata to restore it).
https://docs.djangoproject.com/en/1.10/ref/djang
I have a Document model that has an M2M-symmetrical field on itself. The idea
is that we can "link" documents to other documents. It's very simple to find
the linked documents of a particular document, but is there an easy way to get
all the linked documents of the linked documents of the docu
1 - 100 of 330 matches
Mail list logo