Re: Bug ? | Django 1.9.11 | ManyToManyField with help_text

2016-11-11 Thread Tim Graham
There's a known bug that help_text=_("") triggers infinite migrations, perhaps you could add your use case to the ticket. https://code.djangoproject.com/ticket/24964 On Friday, November 11, 2016 at 9:05:32 AM UTC-5, Artem Bernatskyy wrote: > > If i add ManyToManyField through intermediary table

Re: python3 manage.py migrate got an error

2016-11-11 Thread Tim Graham
The only thing that comes to mind is that mysql.connector may not support the latest version of Django. Try mysqlclient if that's an option for you. https://docs.djangoproject.com/en/stable/ref/databases/#mysql-db-api-drivers On Friday, November 11, 2016 at 7:07:26 AM UTC-5, xiupei gao wrote:

Re: Admin - saveasnew to another database

2016-11-09 Thread Tim Graham
staging and production. On Wednesday, November 9, 2016 at 4:51:39 AM UTC-5, Melvyn Sopacua wrote: > > On Wednesday 09 November 2016 13:59:35 Mike Dewhirst wrote: > > On 9/11/2016 9:13 AM, Tim Graham wrote: > > > Interesting idea. I'd be interested to here more about the use case

Re: Admin - saveasnew to another database

2016-11-08 Thread Tim Graham
Interesting idea. I'd be interested to here more about the use case. How would it work for entities with a foreign key? Django assumes foreign keys can't be cross-database since the constraint can't be enforced. On Tuesday, November 8, 2016 at 4:29:48 PM UTC-5, Mike Dewhirst wrote: > > I'd like

Bug? ModelChoiceField with to_field_name incorrectly returns True on has_changed() function

2016-11-05 Thread Tim Poffenbarger
Should this be considered a bug? When you provide the to_field_name to a ModelChoiceField, the instance object's field (the primary key) will not match the form's field (the to_field_name field name). Therefore the has_changed() function will return True. In my example, I created an app

[ANNOUNCE] Django security releases issued: 1.10.3, 1.9.11, and 1.8.16

2016-11-01 Thread Tim Graham
Today the Django team issued 1.10.3, 1.9.11, and 1.8.16 as part of our security process. These releases address two security issues, and we encourage all users to upgrade as soon as possible. Details are available on the Django project weblog:

Re: Django 1.10 "Cannot force an update in save() with no primary key", using model with composite primary key (unique_together)

2016-10-29 Thread Tim Graham
Try bisecting to find the commit in Django where the behavior changed: https://docs.djangoproject.com/en/dev/internals/contributing/triaging-tickets/#bisecting-a-regression On Saturday, October 29, 2016 at 9:57:53 AM UTC-4, in...@lucasvandijk.nl wrote: > > Hi all, > > I have a simple model

Re: Django 1.8: Existing Migrations Files Erroring After FK Model Removed

2016-10-24 Thread Tim Graham
: > > Hi Tim, > > Traceback is below. > > As a temporary measure to get me going I have commented out the existing > migrations that added and removed the migrations. There is an initial > migration that adds the FK, a RunPython that checks for the FK to perform > some logic

Re: Django 1.8: Existing Migrations Files Erroring After FK Model Removed

2016-10-21 Thread Tim Graham
It might be that you've made a mistake such as importing a model for RunPython rather than using apps.get_model(). Could you share the traceback? On Friday, October 21, 2016 at 7:18:05 AM UTC-4, dy...@dylan-jenkinson.nz wrote: > > Hi there, > > In one of our projects we have removed an old

Re: Django and uuid with PostgreSQL

2016-10-18 Thread Tim Graham
The SQL looks correct -- it's not using anything Python related. Are you encountering some error? On Tuesday, October 18, 2016 at 9:15:46 AM UTC-4, Andrea Posi wrote: > > I'm creating a rest api using Django and DRF. I don't want to expose IDs > directly to clients so I'm trying to setup my

Re: Migrations for multiple Django versions

2016-10-18 Thread Tim Graham
Assuming the problem is makemigrations generating different migrations based on the Django version, conditionally adding operations in migrations with some django.VERSION checks may help. On Tuesday, October 18, 2016 at 7:12:02 AM UTC-4, Vlastimil Zíma wrote: > > Hi everyone, > > we are trying

Anyone using settings.TIME_ZONE=None? (considering remove support for it)

2016-10-14 Thread Tim Graham
I'm not sure if there's a compelling use case for settings.TIME_ZONE=None these days. If you're using it, could you please describe your use case on the django-developers thread: https://groups.google.com/d/topic/django-developers/OAV3FChfuPM/discussion Thanks! -- You received this message

Re: How to replace content_type and object_id fields by a field with actual object in admin inline?

2016-10-14 Thread Tim Graham
Something like https://pypi.python.org/pypi/django-genericforeignkey? Search "django admin generic foreign key widget" for other possibilities. On Friday, October 14, 2016 at 10:42:40 AM UTC-4, Anton Ponomarenko wrote: > > I have inline, which shows data of contenttype model, so instead of real

Re: django 1.10.2 mysql 5.6.34 which connector?

2016-10-13 Thread Tim Graham
Try mysqlclient as mentioned in https://docs.djangoproject.com/en/stable/ref/databases/#mysql-db-api-drivers. As it says there, MySQL Connector/Python is developed by Oracle and may not support the most recent Django releases. On Thursday, October 13, 2016 at 6:47:02 PM UTC-4, Andres Marin

Windows users: do the line endings created by startproject/startapp matter?

2016-10-12 Thread Tim Graham
There's an old ticket [0] noting that startproject/app create files with Unix line endings, even on WIndows. My question is whether or not this matters. Some things I thought of: I think version control programs like Git usually normalize line endings anyway. The proposed change only applies

Re: Error with Tutorial - Writing your first Django app, part 1

2016-10-10 Thread Tim Graham
Add a comma after: url(r'^polls/', include('polls.urls')) (these are items in a list, separated by a comma) On Monday, October 10, 2016 at 4:42:30 PM UTC-4, Johnny McClung wrote: > > I am getting an error when I try to run the Django server. > > >> mysite >> polls >> urls.py > from

Re: EmailValidator and ipv4 or ipv6 address

2016-10-07 Thread Tim Graham
I'd take a look at the tests for the validator to see its expected inputs: https://github.com/django/django/blob/c60feb6999f83bfd1fdabff01f0dd4a26d72e158/tests/validators/tests.py#L48-L96 By the way, there's a ticket to relax the validation and use whatever HTML5 validation uses:

Re: django squash migrations bug

2016-10-04 Thread Tim Graham
It's a known issue: https://code.djangoproject.com/ticket/26760 On Tuesday, October 4, 2016 at 4:47:36 PM UTC-4, Kojedzinszky Richárd wrote: > > Dear Django users, > > I was playing a bit with migration squashing, and found that, after > applying a > squashed migration (following the guide),

Re: An almost reusable app, how to make it reusable?

2016-10-03 Thread Tim Graham
Typically, you import settings (even those that you define yourself) using "from django.conf import settings". https://docs.djangoproject.com/en/stable/topics/settings/#using-settings-in-python-code On Monday, October 3, 2016 at 3:06:01 PM UTC-4, Victor Porton wrote: > > I've created an app

[ANNOUNCE] Django bugfix release issued: 1.10.2

2016-10-01 Thread Tim Graham
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2016/oct/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

Re: Upgrading a django 1.2 Alpha site to 1.10 final site, passwords don't work

2016-09-30 Thread Tim Graham
Django 1.10 can still support SHA1, but it's not enabled by default. Please read https://docs.djangoproject.com/en/dev/releases/1.10/#removed-weak-password-hashers-from-the-default-password-hashers-setting and https://docs.djangoproject.com/en/stable/topics/auth/passwords/. On Friday,

Re: email console backend is silent

2016-09-27 Thread Tim Graham
I would put print statements in the Django source code and try to follow its execution. On Sunday, September 25, 2016 at 7:53:20 PM UTC-4, Mike Dewhirst wrote: > > Some little time ago my admin site stopped sending password reset > emails. After checking all the credentials, ports, server

[ANNOUNCE] Django security releases issued: 1.9.10 and 1.8.15

2016-09-26 Thread Tim Graham
Today the Django team issued 1.9.10 and 1.8.15 as part of our security process. These releases address a security issue, and we encourage all users to upgrade as soon as possible. Details are available on the Django project weblog:

Re: Deleting PROTECTED objects that would be deleted by a CASCADE anyway

2016-09-26 Thread Tim Graham
And now a Trac ticket for this: https://code.djangoproject.com/ticket/27272 On Friday, September 23, 2016 at 7:17:32 AM UTC-4, Daniel Izquierdo wrote: > > Hello, > > Consider this set of models: > > class Artist(models.Model): > name = models.CharField(max_length=10) > > class

Re: Getting AttributeError: type object 'RunPython' has no attribute 'noop' error

2016-09-26 Thread Tim Graham
RunPython.noop is new in Django 1.8. You should try to upgrade as 1.7.x is unsupported and has unpatched security issues. On Monday, September 26, 2016 at 7:03:36 AM UTC-4, Arundas R wrote: > > My django version is 1.7.11. While migrating I get an error as described. > What might be the

Re: Model Meta is overwriten by abstract parent class

2016-09-23 Thread Tim Graham
I see you posted the same thing in Trac: https://code.djangoproject.com/ticket/27264 For future reference, it's better not to duplicate posts. Otherwise, you might have multiple people duplicating effort to investigate the issue. Thanks. On Friday, September 23, 2016 at 10:58:13 AM UTC-4,

Re: Complex query, queryset.query.alias_map and query changes

2016-09-23 Thread Tim Graham
Not sure, this is using lots of private API and QuerySet.extra() which is discourage these days. I'm afraid you won't get much help for unsupported Django versions. After you upgrade to Django 1.9+, hopefully you can construct your query using the new expressions API!

Re: Hello - need help on accessing current user in django forms.

2016-09-23 Thread Tim Graham
Try a web search for "django passing request to a form". Here's the first result: http://stackoverflow.com/questions/6325681/passing-a-user-request-to-forms On Friday, September 23, 2016 at 7:17:32 AM UTC-4, Naresh Kumar wrote: > > Hello, > > I need filter a queryset based on current user in

Re: Foreign key set template

2016-09-22 Thread Tim Graham
model.foreignkey_set returns a manager while model.foreignkey_set.all returns a QuerySet. https://docs.djangoproject.com/en/stable/topics/db/queries/#following-relationships-backward On Thursday, September 22, 2016 at 7:09:27 AM UTC-4, jorr...@gmail.com wrote: > > I have a question about using

Re: Cannot find table "..." after django updated from 1.7 to 1.9

2016-09-21 Thread Tim Graham
Please post the full traceback. On Wednesday, September 21, 2016 at 7:12:18 AM UTC-4, ranvir singh wrote: > > Hello there and apologies for asking this silly question here. > Actually I am facing some trouble in a Django app. Here is the link > for that app. > >

Re: Unable to post to the bug tracker (Submission rejected as potential spam)

2016-09-20 Thread Tim Graham
Sorry for the inconvenience. We don't have a good solution right now. I tried training the filter by marking your submission as valid. Alternately, you just need to rephrase your comment until the filter accepts. On Tuesday, September 20, 2016 at 7:00:41 PM UTC-4, Ben Whale wrote: > > Hi all >

Re: Starting maintenance on code.djangoproject.com

2016-09-20 Thread Tim Graham
The maintenance is complete. If you find any issues creating or updating tickets, let me know. Thanks! On Tuesday, September 20, 2016 at 1:17:11 PM UTC-4, Tim Graham wrote: > > https://code.djangoproject.com/ is going down shortly for an upgrade. > I'll send an update if it takes

Starting maintenance on code.djangoproject.com

2016-09-20 Thread Tim Graham
https://code.djangoproject.com/ is going down shortly for an upgrade. I'll send an update if it takes more than an hour. -- 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

Re: No module named MySQLdb

2016-09-20 Thread Tim Graham
I'm not sure if PyMySQL is compatible, but it's not tested by the Django team. I'd use mysqlclient as documented: https://docs.djangoproject.com/en/stable/ref/databases/#mysql-db-api-drivers On Tuesday, September 20, 2016 at 11:18:08 AM UTC-4, Alessandro Madruga wrote: > > pip install

Re: How to do a generic field in an app.

2016-09-19 Thread Tim Graham
Do you know about https://docs.djangoproject.com/en/stable/ref/contrib/contenttypes/#generic-relations ? On Monday, September 19, 2016 at 12:30:01 PM UTC-4, Jonty Needham wrote: > > I want to have a model that has a foreignkey to a model from another app. > The app can be one of many. > > So

Re: Setting FK field in list view

2016-09-19 Thread Tim Graham
eld correctly, as I just only get str > representations of the field or the widget. > > El lunes, 19 de septiembre de 2016, 18:53:56 (UTC+2), Tim Graham escribió: >> >> I still don't understand the goal. Maybe you can mock up a screenshot >> and/or give a code examp

Re: Incorrect number of bindings supplied. The current statement uses 0, and there are 1 supplied

2016-09-19 Thread Tim Graham
Can you print query and params where the error happens? On Monday, September 19, 2016 at 12:56:12 PM UTC-4, premdjango wrote: > > Im trying to run the tests in Django but get the following error. > > > (djangodev) Anands-MacBook-Pro:tests premlaks$ ./runtests.py > --settings=test_sqlite

Re: Setting FK field in list view

2016-09-19 Thread Tim Graham
El lunes, 19 de septiembre de 2016, 18:15:17 (UTC+2), Tim Graham escribió: >> >> ModelAdmin.list_editable? >> >> >> https://docs.djangoproject.com/en/stable/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_editable >> >> On Monday, September 19, 2016 at

Re: Setting FK field in list view

2016-09-19 Thread Tim Graham
de 2016, 16:31:55 (UTC+2), Tim Graham escribió: >> >> Is your request https://code.djangoproject.com/ticket/10743? >> >> On Monday, September 19, 2016 at 10:08:59 AM UTC-4, RompePC wrote: >>> >>> Yep, the second one is what I wanna do. Althrough the

Re: Setting FK field in list view

2016-09-19 Thread Tim Graham
Is your request https://code.djangoproject.com/ticket/10743? On Monday, September 19, 2016 at 10:08:59 AM UTC-4, RompePC wrote: > > Yep, the second one is what I wanna do. Althrough they aren't inlines, but > like FK filter choices in the list view (not the default ones). > It's hard to

Re: Issue using django-admin

2016-09-19 Thread Tim Graham
Did you install it as described at https://docs.djangoproject.com/en/dev/topics/install/#installing-the-development-version ? On Sunday, September 18, 2016 at 10:10:50 PM UTC-4, PARTH VERMA wrote: > > Hello everyone, > > I am new to Django and just cloned it. I am getting error running >

Re: ModelAdmin missing a couple of key features, or am I doing this wrong?

2016-09-15 Thread Tim Graham
I think these ideas have been floated before. If you look through the Trac tickets you might find something related. However, your subclass where you store "self.instance" on ModelAdmin is a no no due to thread safety. See

Re: Access request body in the django.request logger

2016-09-15 Thread Tim Graham
the request object is set > in /usr/lib/python2.7/SocketServer.py(652)__init__() as the socket. This is > seems reasonable to me, so I guess some kind of processing of the request > isn't being performed somewhere. > > > On Friday, 16 September 2016 08:16:09 UTC+10, Ben Whale wrote: >

Re: Access request body in the django.request logger

2016-09-15 Thread Tim Graham
If true, it does seem like a bug. Could you provide a test for Django's test suite or a sample project to reproduce it? On Thursday, September 15, 2016 at 6:53:55 AM UTC-4, Ben Whale wrote: > > Hi > > What I'd like to do is log the request body whenever the django.request > logger logs

Re: creating a loginpage

2016-09-14 Thread Tim Graham
Have you looked at the official Django documentation? http://masteringdjango.com/django-book/ is another nice resource. On Wednesday, September 14, 2016 at 2:22:18 PM UTC-4, Timothy Steele wrote: > > Thanks Tim it has work this time but can any one help me with a beginner > book to lea

Re: creating a loginpage

2016-09-14 Thread Tim Graham
Import the view: from django.contrib.auth.views import login and replace 'django.contrib.auth.views.login' with a reference to the login function. from django.contrib.auth.views import login urlpatterns = [ <-- remove the empty string on this line ... url(r'^login/$', login), ] On

Re: GeoDjango has few problems on Django 1.11-dev version

2016-09-13 Thread Tim Graham
UTC-4, Satish wrote: > > Hi Tim, > > I have attached a new django project which gave me the error. or you can > try below steps to reproduce the error: > > >1. Create a python3 virtualenv and activate it >2. pip install git+https://github.com/django/django.git &

Re: GeoDjango has few problems on Django 1.11-dev version

2016-09-13 Thread Tim Graham
I'm not aware of any bugs or regressions. Could you provide a sample project that we can use to reproduce that issue? Does you have the same issue with older versions of Django? On Tuesday, September 13, 2016 at 9:23:38 AM UTC-4, Satish wrote: > > Hi, > > Am a starting a new Django project, I

Re: Database is not reset after StaticLiveServerTestCase (Django 1.9.5)

2016-09-12 Thread Tim Graham
Yes, a minimal example project that demonstrates the issue would be helpful. My guess is that you have a mistake in your tests that's causing some state to leak between them. On Monday, September 12, 2016 at 9:36:23 AM UTC-4, ankitj...@gmail.com wrote: > > Hello, > > I have a Python project

Re: Try to read data from remote database

2016-09-06 Thread Tim Graham
Please take a look at https://docs.djangoproject.com/en/stable/howto/legacy-databases/ On Tuesday, September 6, 2016 at 3:16:29 PM UTC-4, MPY wrote: > > Hi everyone , I am new with Django and I try to connect with external > database to read the data and show in my view. > > Hi create a new

Re: FileField with UUID filename

2016-09-06 Thread Tim Graham
See https://code.djangoproject.com/ticket/4345 for the ticket that disallowed primary_key/unique on FileField. You can write a custom field to get FileField to use a UUID in the database (and likely also lift the other restrictions you want to bypass). On Sunday, September 4, 2016 at 11:54:06

Re: Django migrations taking all the memory on Django 1.9

2016-09-06 Thread Tim Graham
e done > in the right order it might be safe enough, but of course we get into muddy > waters.. > > On Monday, August 8, 2016 at 2:36:23 PM UTC+1, Tim Graham wrote: >> >> I think that error suggests that you disabled migrations for an app >> (something_else) tha

Re: NIST’s new password rules - Digital Authentication Guidelines

2016-09-04 Thread Tim Graham
: > > Thank you, Tim. Although we are using Django 1.9 and I understand that > passwords are hashed and salted, it's interesting to know which version of > Django was the first one to hash and salt passwords? I didn't find it > documented there. > > Thanks, > Uri. > >

Re: Project time and expense tracking

2016-09-02 Thread Tim Graham
I see some results by searching "django time tracking app" in a search engine. In particular, Django Packages has a nice comparison of some options: https://djangopackages.org/grids/g/project-management/ On Thursday, September 1, 2016 at 1:58:08 PM UTC-4, Rich Shepard wrote: > > Before I

Re: NIST’s new password rules - Digital Authentication Guidelines

2016-09-02 Thread Tim Graham
Hi, We have fairly comprehensive documentation about passwords: https://docs.djangoproject.com/en/stable/topics/auth/passwords/ Let us know if you have unanswered questions after reading that. Tim On Friday, September 2, 2016 at 7:35:03 AM UTC-4, uri wrote: > > To Django users, >

[ANNOUNCE] Django bugfix release issued: 1.10.1

2016-09-01 Thread Tim Graham
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2016/sep/01/bugfix-release/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Possible bug in AlterField migration with spatial_index

2016-08-31 Thread Tim Graham
That looks plausible. The place to patch would probably be https://github.com/django/django/blob/master/django/contrib/gis/db/backends/postgis/schema.py. Could you create a Trac ticket and, if possible, a patch? On Wednesday, August 31, 2016 at 6:33:23 PM UTC-4, Arjun Attam wrote: > > Hi, > >

Re: cache.get_or_set : function name is misleading

2016-08-31 Thread Tim Graham
You're welcome to submit a documentation patch to help clarify. On Wednesday, August 31, 2016 at 5:54:21 AM UTC-4, florian wrote: > > Hi, > > I wanted to refactor my code using cache.get_or_set instead of using > cache.get and then check for None and so on > > However, after a few tests, it

Re: Django documentation release 1.10.1a1

2016-08-30 Thread Tim Graham
I don't think there have been any recent changes to the styling, but if you'd like to contribute, the place to look is probably https://github.com/django/django/tree/master/docs/_theme. On Tuesday, August 30, 2016 at 6:15:45 PM UTC-4, Rich Shepard wrote: > > I don't know how this PDF displays

Re: get_available_name() got an unexpected keyword argument 'max_length'

2016-08-30 Thread Tim Graham
You need to update your own code or one of your dependencies as per https://docs.djangoproject.com/en/stable/releases/1.8/#support-for-the-max-length-argument-on-custom-storage-classes. If you follow https://docs.djangoproject.com/en/stable/howto/upgrade-version/ with an older version of

Re: Trying to overload Django 1.9 JSONField

2016-08-28 Thread Tim Graham
Custom encoding for JSONField will be a feature in Django 1.11. See if https://github.com/django/django/pull/7071/commits/13c3e5d5a05e9c358d212d154addd703cac3bc66 and the documentation tips in that patch helps. On Sunday, August 28, 2016 at 2:15:38 PM UTC-4, Ben Scherrey wrote: > > I have an

Re: Strange failing test

2016-08-24 Thread Tim Graham
You'll be glad to know that's fixed in Django 1.10: https://github.com/django/django/commit/e0837f2cb12de5e95e621d19b186b0da43bcdee2 On Wednesday, August 24, 2016 at 10:27:37 AM UTC-4, Gergely Polonkai wrote: > > It just turned out that value_list(…, flat=True) returns a QuerySet, not a > list.

Re: Using version control with django

2016-08-23 Thread Tim Chase
On 2016-08-23 12:42, Rich Shepard wrote: >I want to track django projects with subversion. (Single > developer, local, so svn is better suited than the distributed git > and mercurial.) I used subversion both as a solo developer and as part of a team, and have migrated to a DVCS for both

Re: DateField default value

2016-08-22 Thread Tim Graham
What do you mean by "not accepted"? Is there some error message? What you wrote should work as far as I know. from datetime import date pub_date = models.DateField(default=date.today) On Monday, August 22, 2016 at 7:04:11 PM UTC-4, Rich Shepard wrote: > > Reading the doc for DateField() I

Re: TypeError: 'class Meta' got invalid attribute(s): indexes

2016-08-22 Thread Tim Graham
What Django version are you using? Meta.indexes is a new feature in Django 1.11 -- are you using it in your models? On Monday, August 22, 2016 at 10:58:51 AM UTC-4, Dennis Kornbluh wrote: > > Going through the Django tutorial > , now at

Re: Django m2m through model with classic admin widget

2016-08-22 Thread Tim Graham
I haven't look into what's needed to make this work on current Django versions, however, if you're interested in contributing to Django, there's an open ticket to allow using the widget as long as there aren't any extra required fields on the through model:

Re: Django-drip not working

2016-08-20 Thread Tim Graham
Looks like it could be a bug in django-drip because: Model._meta.fields + Model._meta.many_to_many + Model._meta.get_all_related_objects() (tuple) + (tuple) + (list) A possible fix could be: ... + tuple(Model._meta.get_all_related_objects()) On Saturday, August 20, 2016 at 7:56:46 AM UTC-4, M

Re: Starting new project -- version 1.10

2016-08-19 Thread Tim Graham
Don't use the same name for your app and project. When you "startproject crm", the project settings.py, urls.py, and wsgi.py are placed in a module named "crm" so you can't use the same name for an app. On Friday, August 19, 2016 at 2:54:56 PM UTC-4, Rich Shepard wrote: > > I'm working my way

Re: query values() calls don't use transforms as filter() does

2016-08-18 Thread Tim Graham
I merged support for expressions in values() a few hours ago: https://github.com/django/django/commit/39f35d4b9de223b72c67bb1d12e65669b4e1355b If that doesn't meet your needs, can you give an idea of what the QuerySet you want would look like? On Thursday, August 18, 2016 at 5:10:41 PM UTC-4,

Re: Python dictionaries saved to models

2016-08-18 Thread Tim Graham
s error: >> >> Enter code here...NameError: name apps is not defined >> >> That is coming from this line in the migration: >> >> Players = apps.get_model("team","Players") >> >> This is a copy/paste from the documentation. Is th

Re: Odd problem: some database updates do not appear on other pages until server restart

2016-08-18 Thread Tim Graham
I'd guess you're doing a query for the form field's choices at the module level which will be executed once and cached for as long as the server runs. See if https://docs.djangoproject.com/en/stable/ref/forms/fields/#fields-which-handle-relationships helps, otherwise please post the code for

Re: Python dictionaries saved to models

2016-08-18 Thread Tim Graham
ration > <https://docs.djangoproject.com/en/1.9/topics/migrations/#data-migrations> > is what you are looking for. > > On Thursday, August 18, 2016 at 8:38:33 AM UTC+3, Aaron Weisberg wrote: >> >> Great- thanks Tim. >> >> I understand the Python, but what

Re: MIDDLEWARE vs MIDDLEWARE_CLASSES: 'WSGIRequest' object has no attribute 'user'

2016-08-18 Thread Tim Graham
Are you running Django 1.10? It looks like your MIDDLEWARE setting is ignored which suggests you might be using an older version. On Wednesday, August 17, 2016 at 6:43:14 PM UTC-4, Andrew Emory wrote: > > My settings.py file has the default MIDDLEWARE settings generated by > django-admin

Re: Python dictionaries saved to models

2016-08-17 Thread Tim Graham
You need to transform your data dictionary so that the keys match the models field names and then you can use: players_data = [{'number': 1, ...}, {...}] for data in players_data: Player.objects.bulk_create(**data) (or something similar with bulk_create())

Re: Database data caching in Django?...

2016-08-17 Thread Tim Graham
I did a quick search and found https://github.com/BertrandBordage/django-cachalot. Does it meet your requirements? On Wednesday, August 17, 2016 at 3:34:33 PM UTC-4, Fred Stluka wrote: > > Django users, > > Is there an easy way to enable an automatic write-through > database cache in Django? >

Re: Adding new models to test Django unit test case

2016-08-15 Thread Tim Graham
ike the test is running by default against sqllite. How do I run it > against the postgres? > > On Monday, August 15, 2016 at 1:48:48 PM UTC-4, premdjango wrote: >> >> It worked..thanks. >> >> On Monday, August 15, 2016 at 1:12:52 PM UTC-4, Tim Graham wrote: >>

Re: Adding new models to test Django unit test case

2016-08-15 Thread Tim Graham
ns but dont see the manage.py module > anywhere. > > On Monday, August 15, 2016 at 7:18:33 AM UTC-4, Tim Graham wrote: >> >> Migrations will run automatically but you need to add the models to the >> migrations in tests/postgres_tests/migrations. >> >> On Sunday,

Re: Adding new models to test Django unit test case

2016-08-15 Thread Tim Graham
Migrations will run automatically but you need to add the models to the migrations in tests/postgres_tests/migrations. On Sunday, August 14, 2016 at 10:53:45 PM UTC-4, premdjango wrote: > > I'm implementing a fix for a ticket-26819 and need to add new models to > test it. > > The new models

Re: "add another" for inline in admin disappeared in 1.10

2016-08-11 Thread Tim Graham
Are you using any third-party enhancements that might need to be updated? I see "Add another Choice" at a page like /admin/polls/question//change/ for the tutorial. More specifics about how to reproduce the issue are needed. On Thursday, August 11, 2016 at 4:55:04 PM UTC-4, Chris Gray wrote: >

Re: (Is it a bug?) TruncMonth does not work when there is "ordering" in the model Meta (Django 1.10)

2016-08-10 Thread Tim Graham
e agosto de 2016 17:17:31 UTC-3, Tim Graham escreveu: >> >> Default ordering affects aggregation queries like that: >> https://docs.djangoproject.com/en/stable/topics/db/aggregation/#interaction-with-default-ordering-or-order-by >> >> On Wednesday, August 10, 2016 at

Re: (Is it a bug?) TruncMonth does not work when there is "ordering" in the model Meta (Django 1.10)

2016-08-10 Thread Tim Graham
Default ordering affects aggregation queries like that: https://docs.djangoproject.com/en/stable/topics/db/aggregation/#interaction-with-default-ordering-or-order-by On Wednesday, August 10, 2016 at 3:44:33 PM UTC-4, Neto wrote: > > I'm trying to get number of records per month, but Django does

Re: Django 1.10

2016-08-09 Thread Tim Graham
Remove the strings at the start of each urlpatterns, e.g. 'matricula.views.Auth'. That's obsolete from when you were using patterns(). urlpatterns should be a list of url()s. On Tuesday, August 9, 2016 at 11:57:09 AM UTC-4, ludovic coues wrote: > > What you are writing is not valid python

Re: Adding custom Template downloaded

2016-08-08 Thread Tim Graham
What template did you download? What template are you trying to replace? On Monday, August 8, 2016 at 12:41:06 PM UTC-4, Timothy Steele wrote: > > > Please What I am Talking about is this > i have download a template from www.github.com, but i can not configure > it and i need a help please >

Re: Adding custom Template downloaded

2016-08-08 Thread Tim Graham
I'm not sure what you're asking. Does this documentation proposal help? https://github.com/django/django/pull/6720 On Monday, August 8, 2016 at 9:55:23 AM UTC-4, Timothy Steele wrote: > > I want to get a step by step process on how to add a django template > downloaded > so that i can over

Re: Django migrations taking all the memory on Django 1.9

2016-08-08 Thread Tim Graham
my understanding). > > PS. so to clarify our tests do rely on migrations (and there are some data > migrations too) but since we normally use --keepdb anyway we definitively > not need to run only a few migrations at a time max (and even then > sometimes it takes ages and uses all the RAM

Re: deprecated urls as strings: problem adding second + urls to main urls.py file

2016-08-08 Thread Tim Graham
t; On Saturday, August 6, 2016 at 10:05:25 AM UTC-5, Tim Graham wrote: >> >> You're not missing something. You should imports. Sorry you don't like >> the look of it, but that's Python. >> >> On Saturday, August 6, 2016 at 8:42:29 AM UTC-4, Andrew Emory wrote: >>&

Re: deprecated urls as strings: problem adding second + urls to main urls.py file

2016-08-06 Thread Tim Graham
You're not missing something. You should imports. Sorry you don't like the look of it, but that's Python. On Saturday, August 6, 2016 at 8:42:29 AM UTC-4, Andrew Emory wrote: > > I am having trouble with how I would intuitively get my url patterns to > work, by listing the actual path to the

Re: Django migrations taking all the memory on Django 1.9

2016-08-06 Thread Tim Graham
As long as your tests don't rely on any data migrations, you can set MIGRATIONS_MODULES['app'] = None for all apps in a test settings file as described in https://docs.djangoproject.com/en/stable/ref/settings/#std:setting-MIGRATION_MODULES to disable migrations while testing. There's a ticket

Re: How to start Django app with apache server

2016-08-05 Thread Tim Graham
Are you following these instructions? https://docs.djangoproject.com/en/stable/howto/deployment/wsgi/modwsgi/ On Friday, August 5, 2016 at 3:44:27 PM UTC-4, Terry Sankar wrote: > > apache2.4 working , postgresql working , the django app is working - how > do I start the app in apache instead

[ANNOUNCE] Django 1.10 and 1.9.9 released

2016-08-01 Thread Tim Graham
Django 1.10 and a bug fix release for the 1.9 series (1.9.9) are now available: https://www.djangoproject.com/weblog/2016/aug/01/django-110-released/ With the release of Django 1.10, Django 1.9 has reach end of mainstream support. It will continue to receive security and data loss fixes for

Re: Is it possible to share a DB between Django and another application

2016-07-20 Thread Tim Graham
Yes, databases can accept connections from different applications. On Wednesday, July 20, 2016 at 11:31:48 AM UTC-4, Albert180 wrote: > > Hello I wanted to know if it's possible to share a Database between a > Django App ( The WebApp) and another external App which processes the Data ? > --

Re: Running Django tests for postgres_tests

2016-07-20 Thread Tim Graham
You need to use a custom settings module that uses the postgresql database backend. https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/#using-another-settings-module On Tuesday, July 19, 2016 at 11:37:35 PM UTC-4, premdjango wrote: > > I'm trying to run django

[ANNOUNCE] Django security releases issued: 1.10 release candidate 1, 1.9.8, and 1.8.14

2016-07-18 Thread Tim Graham
Today the Django team issued 1.10 release candidate 1, 1.9.8, and 1.8.14 as part of our security process. This releases address a security issue, and we encourage all users to upgrade as soon as possible. Details are available on the Django project weblog:

Re: admin css not working

2016-07-17 Thread Tim Graham
Do you have DEBUG=False in your settings? That disables automatic serving of static files: https://docs.djangoproject.com/en/stable/howto/static-files/#serving-static-files-during-development On Sunday, July 17, 2016 at 6:52:23 AM UTC-4, pritesh singh wrote: > > The stylesheet

Re: Disabling migrations when running tests

2016-07-17 Thread Tim Graham
> > BTW: Would you consider bringing back patch > https://github.com/django/django/commit/157d7f1f1de4705daddebb77f21bd7097a74513d > > ? This patch is what I've asking for months. > > Marcin > Yes -- that patch didn't work properly as noted on the ticket. We'll certainly include a working

Re: Disabling migrations when running tests

2016-07-16 Thread Tim Graham
You can use MIGRATION_MODULES for this: https://docs.djangoproject.com/en/1.9/ref/settings/#migration-modules Also, there's a ticket to simplify disabling of migrations during tests further: https://code.djangoproject.com/ticket/25388 On Saturday, July 16, 2016 at 6:44:26 PM UTC-4,

Re: Django PostGis BUG?

2016-07-15 Thread Tim Graham
This query is also duplicated on Trac: https://code.djangoproject.com/ticket/26893 (closed as "worksforme"). For future reference, please ask "is it a bug?" questions on django-users and wait for confirmation that it is a bug before creating a Trac ticket. On Friday, July 15, 2016 at 6:26:27

[no subject]

2016-07-13 Thread Tim
-- | Tim Dyer | Sounds Like Design | 07739048398 | t...@soundslikedesign.co.uk -- 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 to django-user

Re: Modified postgresql backend

2016-07-06 Thread Tim Graham
Looks reasonable to me -- want to submit a pull request? Maybe "self." was lost in a refactoring. If you can find where that happened, it's always helpful. On Wednesday, July 6, 2016 at 10:27:41 AM UTC-4, Alexander Scherbatey wrote: > > Hello, > > I need to create my own modified backend based

Re: error logging in after updating to 1.9

2016-07-01 Thread Tim Graham
Perhaps the issue is a bit different as I don't see that same behavior. On Thursday, June 30, 2016 at 6:56:54 AM UTC-4, larry@gmail.com wrote: > > It seems like in 1.6 template code like this: > > {% if error %} > ... > {% endif %} > > Was OK. But in 1.9 if error is not defined it throws

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