Re: Initial value is not displayed on forms.DateField with widget input type="date" when localized

2021-10-27 Thread Tim Graham
You can read https://code.djangoproject.com/ticket/33113 for some details on this issue. On Wednesday, October 27, 2021 at 5:07:00 AM UTC-4 binoy...@gmail.com wrote: > Hi > I have a form field forms.DateField and widget as follows > > class CustomDateInput(forms.DateInput): > input_type = '

[ANNOUNCE] Security releases issued (1.4.18, 1.6.10, 1.7.3)

2015-01-13 Thread Tim Graham
Today the Django team is issuing multiple releases -- Django 1.4.18, Django 1.6.10, and Django 1.7.3 -- as part of our security process. These releases address several security issues, and we encourage all users to upgrade as soon as possible. More details can be found on our blog: https://www

[ANNOUNCE] Django 1.8 alpha 1 released

2015-01-16 Thread Tim Graham
We've made the first release on the way to Django's next long-term support release, Django 1.8! With only two and a half months until the scheduled final release, we'll need prompt testing from the community to ensure a timely and stable release. Check out the blog post: https://www.djangoproje

[ANNOUNCE] Django bug fix releases issued: 1.7.4 and 1.4.19

2015-01-27 Thread Tim Graham
Today the Django project has issued bugfix releases in the 1.7 and 1.4 release series. Full details are available on the Django project weblog: https://www.djangoproject.com/weblog/2015/jan/27/bugfix-releases-issued/ -- You received this message because you are subscribed to the Google Groups

[ANNOUNCE] Django 1.8 beta 1 and 1.7.5 released

2015-02-25 Thread Tim Graham
In addition to a bug fix release for the 1.7 series, the Django team has made the second release on the way to Django 1.8. Check out the blog post: https://www.djangoproject.com/weblog/2015/feb/25/releases/ -- You received this message because you are subscribed to the Google Groups "Django us

Re: Research: Translations od documentation

2015-02-26 Thread Tim Graham
Maybe you aren't aware of the existing opportunity to translate Django's documentation? https://docs.djangoproject.com/en/dev/internals/contributing/localizing/#documentation On Thursday, February 26, 2015 at 5:11:21 AM UTC-5, Tomáš Ehrlich wrote: > > Hello, > tonight is regular python/ruby mee

Re: MySQLdb Missing Module errors

2015-02-26 Thread Tim Graham
You're using an incorrect package name for MySQLdb. It should be: pip install MySQL-python However, we currently recommend using mysqlclient as it's actively maintained. The officially supported MySQL drivers are documented here: https://docs.djangoproject.com/en/stable/ref/databases/#mysql-db-a

Re: Migrations force me to have, forever, any name/reference I use in field validators=, choices=, whatever, valid forever (even if the requirements change).

2015-02-26 Thread Tim Graham
Yes, it's expected behavior. Please see the documentation on the topic: https://docs.djangoproject.com/en/stable/topics/migrations/#historical-models On Wednesday, February 25, 2015 at 3:25:19 PM UTC-5, Luis Masuelli wrote: > > I have an issue with migrations. > > Suppose I declare (in my applicat

Re: Where to post documentation suggestions?

2015-03-05 Thread Tim Graham
Same ticket tracker: https://code.djangoproject.com/newticket Is there some place where you saw bug reports and feature requests mentioned that we should add "documentation updates" so we could have prevented your confusion? On Thursday, March 5, 2015 at 7:33:02 AM UTC-5, Sakari Ellonen wrote:

[ANNOUNCE] Security releases and advisory issued (1.7.6 and 1.8b2)

2015-03-09 Thread Tim Graham
Today the Django team issued multiple releases -- Django 1.7.6 and 1.8b2 -- as part of our security process. These releases address a publicly reported security issue, and we encourage all users to upgrade as soon as possible. More details can be found on our blog: https://www.djangoproject.com

Re: Django 1.6's lifespan for security updates?

2015-03-11 Thread Tim Graham
Having managed the last few security releases for Django, I'll say it's one of my least favorite tasks and I'm quite looking forward to dropping support for 1.4 (which supports Python 2.5) and 1.6 (Python 2.6). But, if there's sufficient interest that we could raise funds to support this effort

Re: Cannot get xml using xmlhttprequest GET from an external javascript document

2015-03-14 Thread Tim Graham
Not sure your question is best suited for this mailing list as this seems to be a JavaScript question and not Django related, but maybe you are running into the the same-origin policy: http://en.wikipedia.org/wiki/Same-origin_policy It helps to include a code snippet as it's difficult to determ

[ANNOUNCE] Security releases issued (1.4.20, 1.6.11, 1.7.7 and 1.8c1)

2015-03-18 Thread Tim Graham
Today the Django team issued multiple releases -- Django 1.4.20, 1.6.11, 1.7.7, and 1.8c1 -- as part of our security process. These releases address a couple security issues, and we encourage all users to upgrade as soon as possible. More details can be found on our blog: https://www.djangopro

Re: Django builds wrong sql query.

2015-03-19 Thread Tim Graham
Try ditching .extra() and using the expressions API in Django 1.8. We're trying to make everything that's possible with .extra() available through better APIs so try to avoid it as even if there is a bug, it's probably unlikely to be fixed. On Thursday, March 19, 2015 at 9:11:39 AM UTC-4, Алекс

Re: Django 1.6's lifespan for security updates?

2015-03-19 Thread Tim Graham
or the subset of our user base on certain extended-support distros), > and I don't think that extended-support releases of 1.6 should or will > ever appear on pypi.python.org/pypi/Django. > > But I think that anyone who feels the need for this extended support can >

Re: Max_length of EmailField in django.contrib.auth.models.User

2015-03-22 Thread Tim Graham
Currently you need to use a custom user model if you want to change the username max_length. There's an open ticket to increase the default length to 254 though: https://code.djangoproject.com/ticket/20846 On Sunday, March 22, 2015 at 10:45:34 AM UTC-4, somen...@gmail.com wrote: > > Thanks, Ande

Re: Misleading 404 exception during unit tests.

2015-03-23 Thread Tim Graham
Please see https://github.com/django/django/commit/4c6ffcf7 for the rationale for the change. I am open to ideas, but I'm concerned that including details about the reason for the 404 might cause information leakage in production which wouldn't be desirable. On Monday, March 23, 2015 at 10:06:2

Re: Misleading 404 exception during unit tests.

2015-03-23 Thread Tim Graham
e to a misapplication of this policy. I get the > intent of the change but I'm not sure of the risk security-wise and have > just experienced the impact of the misleading exception result personally. > > -- Ben > > On Mon, Mar 23, 2015 at 9:19 PM, Tim Graham &

Re: Inserting literal % sign in QuerySet.extra()

2015-03-27 Thread Tim Graham
This is fixed in Django 1.8. See the fifth item in https://docs.djangoproject.com/en/dev/releases/1.8/#models. On Friday, March 27, 2015 at 5:38:15 PM UTC-4, Gergely Polonkai wrote: > > Hello, > > I’d like to execute the following code: > > Booking.objects.filter(start_ts__isnull = False, end_ts_

Re: Inserting literal % sign in QuerySet.extra()

2015-03-29 Thread Tim Graham
han willing to upgrade, I still wonder if this fix will > be backported to 1.7… > On 28 Mar 2015 02:15, "Tim Graham" > > wrote: > >> This is fixed in Django 1.8. See the fifth item in >> https://docs.djangoproject.com/en/dev/releases/1.8/#models. >> &

Re: django custom timezone middleware causing django.contrib.humanize test to fail

2015-03-31 Thread Tim Graham
In general it's not possible to have those tests pass with arbitrary settings. To remedy this, the new test runner in Django 1.6 [1] won't pick up Django's tests that are part of contrib apps. On a related note, consider upgrading to a supported version of Django (1.7+), or at least the last r

Re: setup.py for project?

2015-04-01 Thread Tim Graham
The choice depends on your requirements. The code for djangoproject.com doesn't have a setup.py because we pull the code directly from git to "install" it on server. This makes deploying incremental changes easy as we just run Ansible which pulls the latest changes. We don't have the notion of

[ANNOUNCE] Django 1.8 released

2015-04-01 Thread Tim Graham
Django 1.8, the next long-term support release, is now available: https://www.djangoproject.com/weblog/2015/apr/01/release-18-final/ With the release of Django 1.8, Django 1.6 has reached end-of-life. As such, Django 1.6.11 is the final release of the 1.6 series. Django 1.7 will continue to rec

Re: Issues downloading documentation offline

2015-04-07 Thread Tim Graham
Hi Nkansah, Just wanted to acknowledge that I'm aware of these issues and am looking into it. I believe the latter issue needs to be resolved on the readthedocs end. See https://github.com/django/django/pull/4436 for some discussion. Tim On Tuesday, April 7, 2015 at 6:35:26 PM UTC-4, Nkansah

Re: uploadhandler.py comparing str with int

2015-04-08 Thread Tim Graham
Does your project set that setting to a string by mistake? In the default settings: >>> from django.conf import settings >>> settings.FILE_UPLOAD_MAX_MEMORY_SIZE 2621440 >>> type(settings.FILE_UPLOAD_MAX_MEMORY_SIZE) On Tuesday, April 7, 2015 at 2:11:08 PM UTC-4, Jason Wilson wrote: > > Line 16

Re: Django hstore widget not working

2015-04-13 Thread Tim Graham
That's the correct output according to https://docs.djangoproject.com/en/1.8/ref/contrib/postgres/forms/#hstorefield On Monday, April 13, 2015 at 7:10:01 AM UTC-4, ksingh wrote: > > Hello, > Had recently updated my project to 1.8, and now the widget for hstore on > admin is not proper. > It is j

Re: "RuntimeError: Error creating new content types."

2015-04-17 Thread Tim Graham
The contenttypes name column was removed in Django 1.8. Could you retrieve the underlying exception before the RuntimeError is raised? On Friday, April 17, 2015 at 2:55:07 PM UTC-4, Christophe Pettus wrote: > > Digging into this a bit more, the specific exception is that it is trying > to insert

Re: DurationField with default value

2015-04-17 Thread Tim Graham
It's a bug that Django cannot serialize timedelta objects in migrations. It will be fixed in 1.8.1 -- see https://code.djangoproject.com/ticket/24566. On Friday, April 17, 2015 at 1:06:09 PM UTC-4, Mathijs Jonker wrote: > > Hi, > > I'm trying to figure out how to use a default value with a durati

Re: moving from Django 1.6 and south to Django 1.8 -- auth migrations not applied

2015-04-21 Thread Tim Graham
Yes, you should generate and apply migrations for the app that contains your custom user model. Since you skipped Django 1.7, you'll have to edit the automatically generated initial migration for that app and change EmailField max_length to 75 since that matches your schema. Then you can auto-g

Re: django contrib auth last_login cannot be "null"

2015-04-21 Thread Tim Graham
This seems to be a common point of confusion. I'll add a sentence to release notes under the "``AbstractUser.last_login`` allows null values" section -- if this makes sense: If you are using a custom user model, you'll need to run :djadmin:`makemigrations` and generate a migration for your app.

Re: Writing some tests for new feature

2015-04-22 Thread Tim Graham
There was some recent work done on allowing customizing the ping_google sitemap URL, but it wasn't completed: https://github.com/django/django/pull/3528 You could take inspiration from your tests from there. On Wednesday, April 22, 2015 at 10:21:44 AM UTC-4, ST LEON wrote: > > I want to contrib

Re: Database and migrations are out of sync.

2015-04-24 Thread Tim Graham
I don't think so. When you create your initial migrations, you need to ensure they match the scheme of your database. After that, things shouldn't get out of sync. Any idea how that happened in the first place? On Friday, April 24, 2015 at 8:54:19 AM UTC-4, Андрей Лукьянов wrote: > > Hi everyone

Re: “Migrate” command for manage.py not recognised when using Django 1.8

2015-04-30 Thread Tim Graham
What does `manage.py --version` say? On Thursday, April 30, 2015 at 12:30:17 PM UTC-4, Kaya Luken wrote: > > Hi Markus, > > I don't have South installed as I am using Django 1.8, and have never used > a previous version. > > For the record INSTALLED_APPS == ['django.contrib.admin', > 'django

[ANNOUNCE] Django bugfix releases issued: 1.8.1 and 1.7.8

2015-05-01 Thread Tim Graham
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2015/may/01/bugfix-releases-issued/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send

Re: Two questions on Django Tutorial.

2015-05-11 Thread Tim Graham
You are using Python 2, but the tutorial is written for Python 3 as noted in part 1. If you aren't willing to switch to Python 3, you can rename the __str__ method to __unicode__ as the comment indicates. On Monday, May 11, 2015 at 12:35:39 PM UTC-4, SUBHABRATA BANERJEE wrote: > > Dear Group, >

Re: TemplateDoesNotExist

2015-05-13 Thread Tim Graham
In what directory is the index.html template you expect to be loaded located? On Wednesday, May 13, 2015 at 12:38:18 PM UTC-4, Rashmi Ranjan Kar wrote: > > Hi > > Please go through the attachment. It contains settings.py, urls.py and > localhost:8080 page. kindly help me to solve this issue as s

Re: Improve Performance in Admin ManyToMany

2015-05-13 Thread Tim Graham
Are you sure it's the query that's slow and not the template rendering and/or JavaScript performance? On Wednesday, May 13, 2015 at 12:32:50 PM UTC-4, Timothy W. Cook wrote: > > I have a model with 13 M2M relations and some of those have a few thousand > instances. > This renders rather slowly

[ANNOUNCE] Django security release issued (1.8.2)

2015-05-20 Thread Tim Graham
Today the Django team issued Django 1.8.2 as part of our security process. This releases address a security issue, and we encourage all users to upgrade as soon as possible. More details can be found on our blog: https://www.djangoproject.com/weblog/2015/may/20/security-release/ As a reminder,

Re: django1.8 collectstatic permission denied

2015-05-27 Thread Tim Graham
STATIC_ROOT should be the absolute path to the directory static files should be collected to. Example: "/var/www/example.com/static/" It looks like you set it to "/static" which probably doesn't exist (or at least your user doesn't have write privileges to it). On Wednesday, May 27, 2015 at 2:2

Re: Issues Upgrading to django 1.8 and migrating from south

2015-05-29 Thread Tim Graham
I guess you might have an old database created using the PostGIS template. See http://gis.stackexchange.com/questions/112592/installed-postgis-extension-not-listed-for-database On Thursday, May 28, 2015 at 5:09:47 PM UTC-4, Marcela Campo wrote: > > Hi all, > I am upgrading an app from django 1

Re: Are data created by setUpTestData shared by all tests ?

2015-06-01 Thread Tim Graham
It looks like you may be using in-memory models instead of saving them to the database? In case your go_available() method does save the OrderFactory instance, you'll still need to refresh the object from the database using Model.refresh_from_db() in test_2(). On Monday, June 1, 2015 at 5:20:03

Re: Have mercy please!

2015-06-09 Thread Tim Graham
Hi Jon, Please see a recent discussion on django-developers with similar complaints: https://groups.google.com/d/topic/django-developers/WKpkv1hdVWU/discussion There is also discussion on django-developers about revising the deprecation schedule to make it easier to upgrade from one LTS release

Re: "RuntimeError: Error creating new content types."

2015-06-10 Thread Tim Graham
ling row contains (39, null, app_name, model_name). >> >> > On Friday, April 17, 2015 at 1:25:06 PM UTC-7, Tim Graham wrote: >> >> The contenttypes name column was removed in Django 1.8. Could you >> retrieve the underlying exception before the RuntimeError is r

Re: Django 1.8 migrate - relation “django_content_type” already exists

2015-06-16 Thread Tim Graham
Take a look at the migrate --fake-initial option. It's new in 1.8. In 1.7, --fake-initial was an implicit default, but we decided to make it explicit in 1.8. https://docs.djangoproject.com/en/1.8/ref/django-admin/#django-admin-option---fake-initial On Tuesday, June 16, 2015 at 3:22:39 PM UTC-4,

Re: GeoIP in Django and IPv6

2015-06-18 Thread Tim Graham
There's an open ticket for that issue: https://code.djangoproject.com/ticket/18349 The pull request needs to be updated for my review comments. If you want to update it, I don't think it should be much work. On Thursday, June 18, 2015 at 7:17:31 AM UTC-4, David Simandl wrote: > > Hello, > > I s

Re: The related_name of ForeignKey cannot be Unicode name after Django 1.8

2015-06-22 Thread Tim Graham
It looks like the check added in ticket #22064 may be too strict (only allowing alphanumeric characters in related_name). Would you like to open a ticket? On Monday, June 22, 2015 at 11:28:50 AM UTC-4, Cheng-Hung Hsueh wrote: > > This code can run before django 1.7 > But "related_name" got an er

Re: Best Queryset Practice

2015-06-22 Thread Tim Graham
Have you had a look at the documentation? https://docs.djangoproject.com/en/stable/topics/db/optimization/#understand-querysets On Monday, June 22, 2015 at 11:28:51 AM UTC-4, Paritosh Gupta wrote: > > Hello, > > Do advice me on: > > queryset = User.objects.all() > user = get_object_or_404(pk=id) >

Re: how to connect django 1.8 to mysql

2015-06-23 Thread Tim Graham
Have you read https://docs.djangoproject.com/en/1.8/ref/databases/#mysql-db-api-drivers ? Which driver are you using and what is the problem? On Tuesday, June 23, 2015 at 8:17:32 AM UTC-4, Arindam sarkar wrote: > > having issue with the db connector please help. > > -- > Regards, > > Arindam >

Re: what is the alternative to SiteProfileNotAvailable in django?

2015-06-25 Thread Tim Graham
I don't think SiteProfileNotAvailable is part of Django. Can you clarify what deprecation you are referring to? https://docs.djangoproject.com/en/1.8/releases/1.8/#features-deprecated-in-1-8 If it's a deprecation in django-profiles itself, you might have more luck asking for help in that projec

Re: Django 1.4 (LTS) end of life?

2015-06-27 Thread Tim Graham
EOL for 1.4 remains October 1. For future reference, see the table on the download page: https://www.djangoproject.com/download/ On Friday, June 26, 2015 at 7:22:01 PM UTC-4, Ned Horvath wrote: > > Originally 1.4 was supposed to end support with the release of 1.8; > earlier this year that was e

Re: Adding new model. ContentType error field "name". Bug?

2015-06-29 Thread Tim Graham
Please take a look at this thread and see if it helps: https://groups.google.com/d/topic/django-users/DlRQOdsJL6o/discussion On Monday, June 29, 2015 at 5:02:52 AM UTC-4, ClosiusBeg wrote: > > Hi All! > > I caught a error when I move from Dajngo 1.7 to 1.8. > > I wanted to add new model, for exam

[ANNOUNCE] Django Security advisory: simple_tag does not do auto-escaping

2015-06-29 Thread Tim Graham
The Django team has just published a short security advisory about usage of the simple_tag template tag helper. You should audit your own code. https://www.djangoproject.com/weblog/2015/jun/29/simple_tag-security-advisory/ -- You received this message because you are subscribed to the Google Gr

[ANNOUNCE] Django security releases issued (1.4.21, 1.7.9, and 1.8.3)

2015-07-08 Thread Tim Graham
Today the Django team issued multiple releases -- Django 1.4.21, 1.7.9, and 1.8.3 -- as part of our security process. These releases address a couple security issues, and we encourage all users to upgrade as soon as possible. More details can be found on our blog: https://www.djangoproject.com/

Re: Django 1.8 feature in 1.7.9?

2015-07-09 Thread Tim Graham
The 1.7.9 wheel file that was first uploaded to PyPI was corrupted. I uploaded a corrected file about 2 hours after the initial release. Sorry for inconvenience and confusion! On Thursday, July 9, 2015 at 7:25:02 AM UTC-4, lois...@polyconseil.fr wrote: > > Hi, > > I updated one of my project to

Re: Django 1.8 feature in 1.7.9?

2015-07-09 Thread Tim Graham
4, Rebecca Muraya wrote: > > I had this error. Pip caches things in a few places, maybe more: > > ~/.pip/ > /tmp/ > ~/.cache/pip/ > > > On Thursday, July 9, 2015 at 10:21:45 AM UTC-4, Karen Tracey wrote: >> >> On Thu, Jul 9, 2015 at 9:17 AM, Tim Graham

Re: 1.7 to 1.8 upgrade: test suite failing

2015-07-10 Thread Tim Graham
No ideas, but if you could bisect to find the Django commit where the problem started to appear that will probably help. On Friday, July 10, 2015 at 7:21:37 AM UTC-4, tom.sz...@eporta.com wrote: > > Hi, > > I've recently tried upgrading from Django 1.7.6 to 1.8.3 but haven't been > able to get m

Re: 1.7 to 1.8 upgrade: test suite failing

2015-07-13 Thread Tim Graham
:49 AM UTC-4, tom.sz...@eporta.com wrote: > > Thanks for the swift reply. The problem starts with Django 1.8.0. My test > suite passes on all 1.7.x versions. > > On Friday, July 10, 2015 at 2:32:25 PM UTC+1, Tim Graham wrote: >> >> No ideas, but if you could bisect to find the

Re: 1.7 to 1.8 upgrade: test suite failing

2015-07-13 Thread Tim Graham
Fixed #20392 -- Added TestCase.setUpTestData() > > On Monday, July 13, 2015 at 12:39:57 PM UTC+1, Tim Graham wrote: >> >> That's a starting point, but there are still a lot of commits between 1.8 >> and 1.7.x. Here's what I meant by "bisecting the commit":

Re: 1.7 to 1.8 upgrade: test suite failing

2015-07-14 Thread Tim Graham
Please try adding the super() calls. On Tuesday, July 14, 2015 at 5:44:09 AM UTC-4, tom.sz...@eporta.com wrote: > > Hi, yes. Some of my test classes do use setUpClass() without calling > super(). > > On Monday, July 13, 2015 at 5:44:03 PM UTC+1, Tim Graham wrote: >> >&g

Re: 1.7 to 1.8 upgrade: test suite failing

2015-07-15 Thread Tim Graham
A minimal project to reproduce the issue would be helpful. On Wednesday, July 15, 2015 at 5:41:49 AM UTC-4, tom.sz...@eporta.com wrote: > > Unfortunately, adding the super() calls didn't help. > > On Tuesday, July 14, 2015 at 12:47:02 PM UTC+1, Tim Graham wrote: >> >>

Re: django 1.8 + mysql + python 3.2

2015-07-21 Thread Tim Graham
That configuration is not officially supported as we don't run the Django test suite with that combination. You could try the unofficial fork of MySQLdb that we recommended in the past which clams 3.2 support: https://github.com/clelland/MySQL-for-Python-3 On Tuesday, July 21, 2015 at 2:46:18 A

Re: Django 1.8 + jinja2 Encountered unknown tag 'static'

2015-07-22 Thread Tim Graham
Did you configure your environment with staticfiles_storage.url as documented? https://docs.djangoproject.com/en/1.8/topics/templates/#django.template.backends.jinja2.Jinja2 On Wednesday, July 22, 2015 at 12:31:01 PM UTC-4, James Schneider wrote: > > Take out the parentheses () from your static

Re: Why is Admin login template at admin/login.html instead of registration/login.html?

2015-07-23 Thread Tim Graham
The admin login only allows staff users to login so it makes sense to me that if you wanted to add regular user login to your site, it should have separate URLs. As for the template issue, it seems to me the admin/template/registration templates should be more like admin/login.html and namespac

Re: How to understand Django code

2015-07-24 Thread Tim Graham
Take a look at the contributing tutorial if you haven't: https://docs.djangoproject.com/en/dev/intro/contributing/ If you have an idea for a specific area in which you'd like to contribute (or a ticket), that would be good to share as it's easier than trying to learn all of Django at once. Fee

Re: "RuntimeError: Error creating new content types."

2015-07-27 Thread Tim Graham
;>> Where app is the django app name and listing is the model name. So >>>>>>> that sounds to me like I'm seeing what everyone else is, the migration >>>>>>> is >>>>>>> just not applied on the database for some reason, but s

Re: URL Generation

2015-07-27 Thread Tim Graham
I think what you want is something like: # team URL's url( regex=r'organization/(?P\d+)/team/', view=include('project.teams.urls', namespace='organization-team', app_name='team'), ), # competition team listing - project.competitions.urls url( regex=r'^(?P\d+)/team/', view=include

Re: django1.7, python3.4 and MySQL

2014-11-04 Thread Tim Graham
mysqlclient is available here: https://pypi.python.org/pypi/mysqlclient I just fixed the missing links in Django's database documentation -- sorry for the confusion. On Monday, November 3, 2014 12:56:27 PM UTC-5, larry@gmail.com wrote: > > On Mon, Nov 3, 2014 at 12:42 PM, Leandro Zanuz > wr

Re: template url reverse and namespacing is driving me crazy

2014-12-01 Thread Tim Graham
Did you read about passing 'current_app' to your template rendering calls? https://docs.djangoproject.com/en/1.7/topics/http/urls/#id4 The contrib.admin class has app_name='admin' and namespace='admin' by default, but you can create a custom AdminSite(name='foo') to customize the instance names

Re: template url reverse and namespacing is driving me crazy

2014-12-01 Thread Tim Graham
better defaults. > > A provisory solution would be having a context processor like this: > > def add_default_namespace(request): > return {'current_app': request.resolver_match.namespace} > > On Monday, December 1, 2014 4:33:40 PM UTC+2, Tim Graham wrote: >&

Re: Questions about code reviews and static analysis tools for TU Delft research

2014-12-16 Thread Tim Graham
Hi Radjino, 1. 1. Do all developers (contributors and core developers) have to > submit a code review for every change? I’m asking because many projects > only review changes made by contributors. > While there is nothing that prevents core developers from committing a patch without revie

Re: How to generate the docs with the new style?

2014-12-30 Thread Tim Graham
Unfortunately, the offline docs use an entirely separate layout/theme so the new styles would need to be copied manually over here: https://github.com/django/django/tree/master/docs/_theme/djangodocs I think it's a non-trivial amount of work and tricky because we are using things like web fonts

[ANNOUNCE] Bugfix releases issued

2015-01-02 Thread Tim Graham
The second bugfix release in the 1.7 series is out (with nearly 60 fixes!), along with bugfix releases for the supported 1.4 and 1.6 release series, and what will hopefully (again) be the final release of the 1.5 series, which is now past end-of-life. Full details are available on the Django pr

Re: TypeError: unorderable types: CharField() < CharField()

2017-10-25 Thread Tim Graham
2to3 can do some simple changes for Python 3 compatibility but it can't do everything. I think you'll spend less time updating your application to a supported version of Django which supports Python 3 than you would adding Python 3 support to Django 1.4. On Wednesday, October 25, 2017 at 12:10:

Re: QuerySet.extra and ticket #28756

2017-10-30 Thread Tim Graham
eld_list = field_list + [q.test.identifier for q in quali_results] > fields = '"'+'","'.join(str(field) for field in field_list)+'"' > field_sql = "FIELD(`identifier`,"+fields+")" > quali_results = quali_results

Django bugfix release: 1.11.7

2017-11-01 Thread Tim Graham
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2017/nov/01/bugfix-release/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email

Re: Find a typo in the documentation.

2017-11-07 Thread Tim Graham
I pushed a fix for that, thanks! On Tuesday, November 7, 2017 at 3:42:14 AM UTC-5, 王祥 wrote: > > In this site > , > the code > Book.objects.all().aggregate(price_diff=Max('price', output_field= > FloatField()) - Avg('pri

Django 2.0 release candidate 1 released

2017-11-15 Thread Tim Graham
We've made the final (hopefully) release on the way to Django's next major release, Django 2.0! Check out the blog post: https://www.djangoproject.com/weblog/2017/nov/15/django-20-release-candidate-1-released/ -- You received this message because you are subscribed to the Google Groups "Django

Re: AttributeError: 'TemplateResponse' object has no attribute '_reason_phrase'

2017-11-22 Thread Tim Graham
I tried a Google search for the last line of the error message and came to https://code.djangoproject.com/ticket/25964. Conclusion: try clearing your cache. On Wednesday, November 22, 2017 at 3:29:42 AM UTC-5, Web Architect wrote: > > Hi, > > We recently migrated from Django 1.8 to Django 1.11.7

Re: AutocompleteSelect and AutocompleteSelectMultiple admin widgets.

2017-11-27 Thread Tim Graham
They're used when you use ModelAdmin.autocomplete_fields. https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.autocomplete_fields On Monday, November 27, 2017 at 3:27:30 AM UTC-5, Daniel Gola wrote: > > Hello, > > Where I can find more detailed information abou

Django 2.0 released

2017-12-02 Thread Tim Graham
Django 2.0 is now available: https://www.djangoproject.com/weblog/2017/dec/02/django-20-released/ With the release of Django 2.0, Django 1.11 has reached the end of mainstream support. The final minor bug fix release (1.11.8) was issued today. As a long-term support release, Django 1.11 will rece

Django bugfix releases: 2.0.1 and 1.11.9

2018-01-01 Thread Tim Graham
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2018/jan/01/bugfix-releases/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an emai

Re: Impossible to reproduce example in the documentation of Queryset.values()

2018-01-17 Thread Tim Graham
Confirmed. I opened a bug report: https://code.djangoproject.com/ticket/29032. On Wednesday, January 17, 2018 at 11:37:23 AM UTC-5, Joseph Lucas wrote: > > Hi, > > We were not able to reproduce an example described in Django's > documentation, concerning the value() method of Queryset >

Re: Deprecations not listed within release notes

2018-01-17 Thread Tim Graham
Correct, that falls under "private API removal". If you clone the Django source code you can use "git log -S custom_sql_for_model" to find the commits that touched something with that name. In this case, you'll find https://github.com/django/django/commit/4aa089a9a9504c4a833eee8161be013206da5d15

Re: Django 2.0.2 not work with Jinja 2 (admin side)

2018-02-05 Thread Tim Graham
The admin doesn't support Jinja2. If you're using Jinja2, you must also have a DjangoTemplates backend defined in your TEMPLATES to use the admin. On Saturday, February 3, 2018 at 7:26:33 PM UTC-5, Николай Инкогнито wrote: > > /admin/ > - raise error > -- You received this message because you

Re: Disable single instance of a system check warning

2018-02-09 Thread Tim Graham
There is not, but there's an open ticket for that enhancement. https://code.djangoproject.com/ticket/26472 On Friday, February 9, 2018 at 6:58:08 AM UTC-5, Mattias Linnap wrote: > > Hi djangonauts, > > > System check identified some issues: > > > HINT: ForeignKey(unique=True) is usually better se

Django security releases issued: 2.0.3, 1.11.11, and 1.8.19

2018-03-06 Thread Tim Graham
Today the Django team issued Django 2.0.3, 1.11.11, and 1.8.19 as part of our security process. These releases address two security issues, and we encourage all users to upgrade as soon as possible: https://www.djangoproject.com/weblog/2018/mar/06/security-releases/ As a reminder, we ask that pot

Re: GROUP BY behavior change in Django 2.0 with annotate/extra

2018-03-12 Thread Tim Graham
I'd use git bisect to find the commit where the behavior changed in Django. That will likely yield some insight. https://docs.djangoproject.com/en/dev/internals/contributing/triaging-tickets/#bisecting-a-regression On Friday, March 9, 2018 at 5:39:43 PM UTC-5, Michael Soderstrom wrote: > > In a

Re: Updating TimeField in forms/formsets returns value without microseconds

2018-03-26 Thread Tim Graham
You need to set support_microseconds=True on the widget. https://docs.djangoproject.com/en/stable/ref/forms/widgets/#django.forms.Widget.supports_microseconds On Sunday, March 25, 2018 at 9:03:18 AM UTC-4, Rafał Szymczuk wrote: > > I have problem with updating TimeField in my models - when I want

Django bugfix releases: 2.0.4 and 1.11.12

2018-04-02 Thread Tim Graham
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2018/apr/02/bugfix-releases/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an emai

Re: First Django Patch: django.contrib.auth 'Specifying a namespace in include() without providing an app_name '

2018-04-15 Thread Tim Graham
It can't be changed due to backwards compatibility. See https://github.com/django/django/pull/9527. On Saturday, April 14, 2018 at 12:29:01 PM UTC-4, jazu...@gmail.com wrote: > > Hi, I've recently sprung a bug that seems to be easily fixable. I would > like to create my first patch on django wit

Re: Proxy User and AUTH_USER_MODEL: TypeError: MyUser cannot proxy the swapped model 'myapp.MyUser'.

2018-04-15 Thread Tim Graham
The behavior seems expected. https://docs.djangoproject.com/en/dev/topics/auth/customizing/#custom-users-and-proxy-models It looks like if you use a proxy model, then you should import it where needed rather than use AUTH_USER_MODEL. On Saturday, April 14, 2018 at 6:34:59 PM UTC-4, Nicolas Pant

Re: perhap buys in autodetector.py

2018-04-19 Thread Tim Graham
When you say, "remove all previous migration codes" -- you mean you removed all the migration files such as 0001_initial.py? In that case, make sure you don't remove the __init__.py file, otherwise you must use "makemigrations app_name". On Thursday, April 19, 2018 at 7:18:02 AM UTC-4, guzheng2

Django bugfix releases: 2.0.5 and 1.11.13

2018-05-01 Thread Tim Graham
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2018/may/01/bugfix-releases/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email

Re: @mark_safe decorator and filters & tags

2018-05-12 Thread Tim Graham
Seems to be a regression: https://code.djangoproject.com/ticket/29400 On Tuesday, May 8, 2018 at 4:45:14 PM UTC-4, Torsten Bronger wrote: > > Hallöchen! > > Up to Django 1.11, I had the following pattern frequently in my > code: > > @register.filter > @mark_safe > def myfilter(val

Django 2.1 alpha 1 released

2018-05-17 Thread Tim Graham
We've made the first release on the way to Django's next major release, Django 2.1! With about two and a half months until the final release (scheduled for August 1), we'll need timely testing from the community to ensure an on time, stable release. Check out the blog post: https://www.djangoprojec

Re: Problems following tutorials on django 1.9.2

2016-04-24 Thread Tim Graham
Please double check your Django version with: python manage.py --version If you generated the polls app using a version older than 1.9, you won't have apps.py. In that case, you use simply use 'polls' in INSTALLED_APPS rather than 'polls.apps.PollsConfig'. By the way, please use Django 1.9.5 r

Re: Test runner wants to run models package?!

2016-04-26 Thread Tim Graham
Could you try Python 3.4.x? I ran into some issues with Django's own test suite [0] due to some import changes in Python 3.5 [1]. [0] https://code.djangoproject.com/ticket/23763#comment:11 [1] http://bugs.python.org/issue7559 On Tuesday, April 26, 2016 at 6:04:56 PM UTC-4, Torsten Bronger wrote:

Re: (Newbie) Stuck with annotate() docs

2016-04-26 Thread Tim Graham
Looks like a typo. Does the rest of the example make sense and work if that line is changed to "Book.objects.first().chapters"? On Tuesday, April 26, 2016 at 12:50:31 PM UTC-4, Ankush Thakur wrote: > > Folks, I'm having exceptional trouble understanding annotate(), > aggregate(), and their vario

Re: (Newbie) Stuck with annotate() docs

2016-04-27 Thread Tim Graham
On Wednesday, April 27, 2016 at 4:36:40 AM UTC+5:30, Tim Graham wrote: >> >> Looks like a typo. Does the rest of the example make sense and work if >> that line is changed to "Book.objects.first().chapters"? >> >> On Tuesday, April 26, 2016 at 12:50:31 PM

Re: Csrf: when is it updated/generated?

2016-04-28 Thread Tim Graham
Did you read https://docs.djangoproject.com/en/stable/ref/csrf/#how-it-works ? On Thursday, April 28, 2016 at 11:24:40 AM UTC-4, Stefano Tranquillini wrote: > > Hello, > i was running a test on a website i dev with django and the system pointed > out that "There are indications that attempts to

  1   2   3   4   5   6   >