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

[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/

[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

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

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: 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: 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: 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: 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: 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: 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: "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: Have mercy please!

2015-06-09 Thread Tim Graham
to another: https://groups.google.com/d/topic/django-developers/MTvOPDNQXLI/discussion If you have any other actionable suggestions, feel free to add them to either thread. Thanks, Tim On Tuesday, June 9, 2015 at 9:27:49 PM UTC-4, Jon Foster wrote: > > I've been involved with Dja

Re: Upgrade Confusion with ForeignKey

2015-06-05 Thread Tim Sawyer
what *could* be the cause appreciated! Cheers, Tim. On Friday, 5 June 2015 23:04:00 UTC+1, Carl Meyer wrote: > > Hi Tim, > > On 06/05/2015 03:44 PM, Tim Sawyer wrote: > > I've just upgraded from a very old version of Django (1.4) up to 1.7.8, > > and some behavio

Upgrade Confusion with ForeignKey

2015-06-05 Thread Tim Sawyer
nueAliases.query SELECT "venues_venuealias"."id", "venues_venuealias"."last_modified", "venues_venuealias"."created", "venues_venuealias"."name", "venues_venuealias"."alias_start_date", "venues_venue

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: 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: 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: utf-16le encode generic view object_list

2015-05-21 Thread Tim Chase
On 2015-05-21 13:04, JHeasly wrote: > I've got a function-based generic view that I want to return a > utf-16le encoded response (for use as an InDesign tagged text file; > the utf-16le is what InDesign wants). I've got it working here > , but

[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: 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

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: 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: Two types of users, how would I authenticate them?

2015-05-09 Thread Tim Chase
On 2015-05-09 15:52, Tom Evans wrote: > I would simplify things, have just one type of user, who can be > associated with 1:N companies and 1:N schools. A user is an employer > if they are associated with at least one company, and a user is a > student if they are associated with at least one schoo

Re: JSON data

2015-05-07 Thread Tim Chase
On 2015-05-07 22:32, Thorsten Sanders wrote: > Am 07.05.2015 17:37, schrieb Tim Chase: >> Can you provide sample JSON data that others can use >> for testing? Which version of Python are you using and which >> Python JSON library are you using? > > The version of

Re: JSON data

2015-05-07 Thread Tim Chase
On 2015-05-07 13:56, palansh agarwal wrote: > processing of json is slow. It takes considerable amount of time to > process data after calling the API. You seem fairly confident in this. Do you have the timing statistics? Can you provide sample JSON data that others can use for testing? Which v

Re: JSON data

2015-05-06 Thread Tim Chase
On 2015-05-07 02:14, palansh agarwal wrote: > I am making a django app in which I require to read json data from > an external API and display data, But it's working very slowly. Any > suggestions to speed up the process will be appreciated. which part is slow? the API, the processing of the JSON

Re: How to represent a calendar month as a field in django models

2015-05-04 Thread Tim Chase
On 2015-05-03 14:35, Matthys wrote: > I posted the question also on stackoverflow: > > http://stackoverflow.com/questions/30017229/how-to-represent-month-as-field-on-django-model > > The question is for situations where a model instance relates to a > specific month, but not to a specific day. I

[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: “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

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: 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: 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: 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: Putting Limits on Memory and CPU Usage in python ?

2015-04-20 Thread Tim Chase
On 2015-04-20 16:01, François Schiettecatte wrote: > I did a little research on this and found cpulimit, you can also > use nice and renice, Yes, nice/renice and their I/O friend ionice (in my Debian installation, it's part of the "util-linux" package) work quite nicely. It's the memory-limiting

Re: Putting Limits on Memory and CPU Usage in python ?

2015-04-20 Thread Tim Chase
On 2015-04-20 13:54, François Schiettecatte wrote: > Peter, why do you want to limit memory and CPU usage? To prevent > someone from killing the machine ? I know I've wanted it to help prevent malicious data that could suck up my RAM and push things into swap. Absent "ulimit -a", I've had to work

Re: Putting Limits on Memory and CPU Usage in python ?

2015-04-20 Thread Tim Chase
On 2015-04-20 13:13, François Schiettecatte wrote: > You don’t say what platform you are running on, but on linux/unix > you can use ulimit, see http://ss64.com/bash/ulimit.html I've wanted this occasionally, but "ulimit -m" doesn't appear to work on most modern Linux installations. See http://u

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: "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: Trying to avoid using the "eval" command/statement

2015-04-15 Thread Tim Chase
_to_file(item) Presumably, these classes come from some namespace like a module, so you can even do something like import models table_names = ["tblA", "tblB"] for name in table_names: log.info("Dumping %s", name) cls = getattr(models, name) for item in c

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: 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: 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, Nk

[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: 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

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: 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: 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: Misleading 404 exception during unit tests.

2015-03-23 Thread Tim Graham
To have the decision revisited, you should raise it on django-developers. On Monday, March 23, 2015 at 10:39:57 AM UTC-4, Ben Scherrey wrote: > > Hey Tim, > >Appreciate the link. It looks like we're trying to have it go both ways > here. If we don't want to allow it

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: 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: Django 1.6's lifespan for security updates?

2015-03-19 Thread Tim Graham
ngo Evolution from very early on, > > and took over maintenance of the project when I moved on). If he's got a > > commercial interest in continued 1.6 support, and he can spare a couple > > of hours to do a backport when a security issue is announced, I'd have > >

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, Алекс

[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: 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

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

[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: 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:

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: 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: 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

[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

Django Admin Page

2015-02-20 Thread Tim Co
Hello, We are trying to run a local development server for our django python app. We are able to connect to our localhost index and get the "It Worked!" Dango page. However when we try to connect to 127.0.0.1/admin/ we are getting an error that the server dropped the connection. Here is the log

Re: models, peeking to next record - maybe

2015-02-09 Thread Tim Chase
On 2015-02-07 22:05, Vijay Khemlani wrote: > The direct solution would be something like this in your view > > events = Event.objects.order_by('event_date') > > event_tuples = [] > last_date_seen = None > > for event in events: > if last_date_seen: > date_difference = event.date - la

[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

Re: django select extremely slow on large table

2015-01-22 Thread Tim Chase
On 2015-01-22 17:14, Joris Benschop wrote: > Thanks you for your response > Unfortunately, yes, the 1.5b records is not something I have > control over. [snip] > WHERE "PROD_SCHEMA"."MARKER"."MARKID" = :arg0 Just out of curiosity, do you have an index on MARKER.MARKID ? And if so, is it combined

Re: Best way to test handle optional FKs in model __str__?

2015-01-17 Thread Tim Chase
On 2015-01-17 12:01, Vijay Khemlani wrote: > I don't think there is a way in Python to do that directly > > you could have a utility method that catches the exception, for > example > > def get_fk_field(obj, fk_field): > try: > return getattr(obj, fk_field) > except AttributeError

[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] 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] 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: 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

Re: Serving mov file with Django

2014-12-27 Thread Tim Chase
On 2014-12-27 10:29, Hanley Hansen wrote: > I'm using the simple backend: > > SENDFILE_BACKEND = 'sendfile.backends.xsendfile' Your initial email mentions running Apache. Are you seeing this on an Apache server, or are you seeing it on the development server? Also, how are you connecting Django

Re: Serving mov file with Django

2014-12-27 Thread Tim Chase
On 2014-12-27 10:29, Hanley Hansen wrote: > That makes sense. I've tried using sendfile but i'm not getting the > behavior I expect. > > return sendfile(request, path, attachment=True) Does it do what you want if you remove the "attachment=True"? -tkc -- You received this message because yo

Re: Serving mov file with Django

2014-12-27 Thread Tim Chase
On 2014-12-27 08:00, Hanley Hansen wrote: > I want to serve an mov file on the file system with Django the way > Apache would. IBe managed to serve the file as a download but I'm > looking to stream it so it plays in browser. I want to avoid > setting up a alias in Apache. Though it's a static file

Re: How to set up a junction table in Django

2014-12-17 Thread Tim Chase
On 2014-12-17 06:34, Ben Gorman wrote: > Notice the NULL value. This basically says "Game 2" consists of > player 2 *and one undetermined* player. This functionality is what > I need to replicate in Django. This is what I tried. > > Models.py > > class Player(models.Model): > player_name = mo

Re: ANN: Django website redesign launched

2014-12-17 Thread Tim Chase
On 2014-12-16 19:34, Jannis Leidel wrote: >> On 16 Dec 2014, at 18:37, Tim Chase wrote: >> if remote-font-loading is disabled, certain icons don't come out >> intelligently. To demonstrate what would happen if the font-file >> was unavailable, you can use Firefo

Re: Devils advocate question

2014-12-16 Thread Tim Chase
On 2014-12-17 00:14, Cal Leeming wrote: > One thing to note, DigitalOcean is truly awesome but it is a > no-frills service. You get an API and raw performance at dirt cheap > pricing, everything else you have to handle yourself. I'd call it "cheap pricing", not "dirt cheap pricing" since PHP hosti

Re: Devils advocate question

2014-12-16 Thread Tim Chase
On 2014-12-16 13:15, Sayth Renshaw wrote: > With django what benefit do I get for the extra build time over > Drupal or Rails. Configuration I assume but real world benefits not > my/our joy of configuration. You're asking about two separate products. Over Rails, the feature-sets are fairly even

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: ANN: Django website redesign launched

2014-12-16 Thread Tim Chase
> As you can imagine, there will be bugs, so please bear with us and > report issues to the issue tracker at > https://github.com/django/djangoproject.com/issues I appreciate the clarification/distinction between Django-Users and Django-Developers mailing-lists. I don't remember them being this b

Re: Test client to a redirect requiring a login doesn't set redirect_chain properly? [2nd follow-up]

2014-12-03 Thread Tim Chase
On 2014-11-30 11:04, Collin Anderson wrote: > As of django 1.7, the admin will redirect to a separate login page > (whatever url reverse('admin:login') returns). > > https://github.com/django/django/commit/be0ad62994a340ad54a0b328771931932a45a899 Shouldn't this reach for reverse(settings.LOGIN_U

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: 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: Test client to a redirect requiring a login doesn't set redirect_chain properly? [2nd follow-up]

2014-11-28 Thread Tim Chase
On 2014-11-27 20:32, Tim Chase wrote: > As a bit of follow-up information, if I use runserver and browse to > the view, it redirects me to /admin/common/region/add/ but it > displays as the login screen. Am I missing why this wouldn't do a > redirect to my named login URL? A c

Re: Test client to a redirect requiring a login doesn't set redirect_chain properly?

2014-11-27 Thread Tim Chase
On 2014-11-27 20:15, Tim Chase wrote: > However my test fails with: > > AssertionError: Response redirected to > 'http://testserver/admin/common/region/add/', expected > 'http://testserver/accounts/login/?next=/admin/common/region/add/' > > Where a

Test client to a redirect requiring a login doesn't set redirect_chain properly?

2014-11-27 Thread Tim Chase
I have a view that can redirect to /admin/common/region/add/ but that url (being an admin page) should require login (right?). My test that logs-in works as expected. However, when I try to do an assertRedirects() without logging in first, the assertRedirects() doesn't seem to follow through to t

Re: Preventing race conditions when submitting forms

2014-11-25 Thread Tim Chase
On 2014-11-25 07:57, Paul Johnston wrote: > Consider an e-commerce site, where Alice and Bob are both editing > the product listings. Alice is improving descriptions, while Bob is > updating prices. They start editing the Acme Wonder Widget at the > same time. Bob finishes first and saves the produ

Re: Obtaining content from Git

2014-11-24 Thread Tim Chase
On 2014-11-24 11:49, martin f krafft wrote: > also sprach Tim Chase [2014-11-24 > 11:19 +0100]: > > urlpatterns = patterns('', > > url(r'^blob/([0-9a-f]{40})/$', > > 'myapp.views.render_blob', ...), ) > > … this is straight-forwa

Re: Obtaining content from Git

2014-11-24 Thread Tim Chase
On 2014-11-24 10:06, martin f krafft wrote: > It could come from Git! After all, Git is really a database by > itself, just like the filesystem could be viewed as a database. [snip] > Furthermore, I'd actually like to post-process the data. The Git > repo would contain reStructuredText files and I'

Re: django on ubuntu

2014-11-22 Thread Tim Chase
On 2014-11-22 18:01, John wrote: > read up on virtualenv and do everything in a virtual python > environment. I can't second John's advice strongly enough. I started programming in Python over a decade ago and just finally broke down and investigated virtualenv/virtualenvwrapper ~2yrs ago and it

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: Multiple versions of python on linux server

2014-11-03 Thread Tim Chase
On 2014-11-03 08:07, robert brook wrote: > I do not have the luxury to create a virtual environment because of > the constraints of this organization. Just making sure that you're aware of the difference between a virtual environment and a virtual machine. A virtual machine is a full abstraction

Re: Rotate the CSRF token on every request

2014-11-01 Thread Tim Chase
On 2014-11-01 08:32, Zach Borboa wrote: > Rotating the CSRF token on every request is probably not a great > idea. Tokens will become invalidated when multiple tabs are open. I've used sites that do this and it infuriates me to no limit. Unless absolutely mandated to use them for $JOB, it's a quic

problem with TransactionTestCase and sqlite

2014-10-22 Thread Tim Court
Hi, I'm having a problem using a TransactionTestCase with a sqlite database and was hoping someone could tell me where I've gone wrong. I'm porting a project from Django 1.6 to 1.7 that uses LiveServerTestCase with a sqlite test database. I converted all of my initial_data fixtures to be prope

Re: Which Version of Django

2014-09-30 Thread Tim Chase
On 2014-09-30 09:28, Mark Caglienzi wrote: > I agree with other advices to start with Django 1.7. > Django is very stable and the new functionalities are always > introduced in a very sane way. I haven't seen any discussion of the deployment platform. I would also recommend 1.7 for green-field de

Re: LIMIT 21 on primary key lookups

2014-09-14 Thread Tim Chase
On 2014-09-14 13:23, James Bennett wrote: > This was something that could bite any user of Django with large > enough QuerySets, so the behavior was changed in upstream Django to > only show 20 objects. [snip] > This means that repr() on a QuerySet will never instantiate huge > numbers of objects,

Re: User to Model relationship- implement a "like" feature on a Model

2014-08-25 Thread Tim Chase
On 2014-08-25 17:00, amarshall wrote: > Hmm, That may work. I should have also noted one thing. I'm > actually using Django as the backend for mobile application. Both > *Android* and iOS. So I'd like to do something like this, in the > simplest matter: > > pseudocode: > > get information

Re: validators not working in shell

2014-07-12 Thread tim
Model validation is not invoked when calling model.save(). You can read more here: https://docs.djangoproject.com/en/1.6/ref/models/instances/#validating-objects On Saturday, July 12, 2014 6:46:17 AM UTC-4, thebsom wrote: > > Hello > I am creating a django library application. I have made a bo

Re: PostgreSQL, queries, speed

2014-06-17 Thread Tim Chase
On 2014-06-17 11:04, Russell Keith-Magee wrote: > On Tue, Jun 17, 2014 at 9:25 AM, Lachlan Musicman wrote: > > Now reading about indexes I can't believe I've not used them > > previously. > > Indicies are definitely your friend - *especially* on > PostgreSQL. :-) I've found http://use-the-index-l

Re: PostgreSQL, queries, speed

2014-06-16 Thread Tim Chase
On 2014-06-17 10:08, Lachlan Musicman wrote: > The problem is that even with a relatively small number of parts > (<5000) and only 4 currencies (USD, AUD, EUR, GBP) we are seeing > page rendering slow down as each of those queries is sent off to be > worked out. A couple things occur to me: - hav

<    2   3   4   5   6   7   8   9   10   11   >