Re: Errors in tests when working through contribution tutorial

2015-10-12 Thread Lee Cartwright
Hi Tim,

I hadn't considered that. I'll try with a different version of Python 3.

Thanks,
Lee

On Monday, 12 October 2015 18:54:51 UTC-7, Tim Graham wrote:
>
> Hi Lee, I think the issue is that the tests don't pass on Python 3.5 at 
> the commit where the contributing was tutorial was authored. I suppose 
> we'll have to update it to use a more recent patch or at least mention this 
> caveat for now.
>
> On Monday, October 12, 2015 at 5:12:20 PM UTC-7, Lee Cartwright wrote:
>>
>> Hi,
>>
>> I'm not sure if this is the right group for this question, but I figured 
>> it was the best place to start. I'm interested in contributing to the 
>> Django project and have spent some time today working through the 
>> contribution tutorial. I've got to the initial 'running tests' stage and 
>> have a few test errors that I cannot figure out. The output is:
>>
>> ==
>>
>> FAIL: test_old_style_storage (file_storage.tests.FileFieldStorageTests)
>>
>> --
>>
>> Traceback (most recent call last):
>>
>>   File 
>> "/Users/leec/Development/django/contrib_tutorial/django/tests/file_storage/tests.py",
>>  
>> line 566, in test_old_style_storage
>>
>> self.assertEqual(len(warns), 2)
>>
>> AssertionError: 4 != 2
>>
>>
>> ==
>>
>> FAIL: test_migrate_legacy_router (multiple_database.tests.RouterTestCase)
>>
>> --
>>
>> Traceback (most recent call last):
>>
>>   File 
>> "/Users/leec/Development/django/contrib_tutorial/django/tests/multiple_database/tests.py",
>>  
>> line 954, in test_migrate_legacy_router
>>
>> self.assertEqual(recorded, [])
>>
>> AssertionError: Lists differ: [> 0x10e915828>] != []
>>
>>
>> First list contains 1 additional elements.
>>
>> First extra element 0:
>>
>> {message : DeprecationWarning('inspect.getargspec() is deprecated, use 
>> inspect.signature() instead',), category : 'DeprecationWarning', filename : 
>> '/Users/leec/Development/django/contrib_tutorial/django/django/db/utils.py', 
>> lineno : 293, line : None}
>>
>>
>> - []
>>
>> + []
>>
>>
>> ==
>>
>> FAIL: test_if_tag_eq_deprecated 
>> (template_tests.syntax_tests.test_if.IfTagTests)
>>
>> --
>>
>> Traceback (most recent call last):
>>
>>   File 
>> "/Users/leec/Development/django/contrib_tutorial/django/django/test/utils.py",
>>  
>> line 182, in inner
>>
>> return test_func(*args, **kwargs)
>>
>>   File 
>> "/Users/leec/Development/django/contrib_tutorial/django/tests/template_tests/utils.py",
>>  
>> line 62, in inner
>>
>> func(self)
>>
>>   File 
>> "/Users/leec/Development/django/contrib_tutorial/django/tests/template_tests/syntax_tests/test_if.py",
>>  
>> line 537, in test_if_tag_eq_deprecated
>>
>> self.assertEqual(len(warns), 1)
>>
>> AssertionError: 3 != 1
>>
>>
>> ==
>>
>> FAIL: test_only_new_files 
>> (utils_tests.test_autoreload.TestFilenameGenerator)
>>
>> --
>>
>> Traceback (most recent call last):
>>
>>   File 
>> "/Users/leec/Development/django/contrib_tutorial/django/tests/utils_tests/test_autoreload.py",
>>  
>> line 87, in test_only_new_files
>>
>> self.assertEqual(len(filenames2), 1)
>>
>> AssertionError: 0 != 1
>>
>>
>> --
>>
>>
>> I'm guessing this is because something isn't quite right in my 
>> development set up but I haven't been able to figure out exactly what. If 
>> anyone can give me some pointers as to what I should check I'd really 
>> appreciate it.
>>
>>
>> OS: Mac OS X Yosemite (10.10.5)
>>
>> Python: 3.5.0
>>
>>
>> Thanks,
>>
>> Lee
>>
>

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8c58224b-17eb-49fb-a43f-386312a687e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: running migrate through views itself

2015-10-12 Thread kk
In the project, every year new books are opened and every organization 
has it's own database for ever every financial year.

Happy hacking.
Krishnakant.


On Tuesday 13 October 2015 07:49 AM, Tim Graham wrote:

You can execute management commands from Python code using call_command():

https://docs.djangoproject.com/en/stable/ref/django-admin/#running-management-commands-from-your-code

It seems a bit risky to me to expose functionality to your users that 
allow them to change your database schema as a result of some action. 
This isn't really how Django is designed in terms of having models 
which map to database tables, but I suppose there could be use cases 
for doing that. I'll be curious to learn if others have done anything 
like you propose.


On Sunday, October 11, 2015 at 11:15:30 PM UTC-7, krmane wrote:

Hello all.
The financial project I am developing requires that when the user
creats
on create organization. the Migrate command has to be run
automatically.
I have 2 questions regarding this.
1, If I am using sqlalchemy instead of sqlobject, will the migrate
utility work?
2, If yes then how can I do this through code in a view function?
if no
then is there a way to do it through sqlalchemy?  or should I use the
create_all function in sqlalchemy itself?

Happy hacking.
Krishnakant.

--
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-users+unsubscr...@googlegroups.com 
.
To post to this group, send email to django-users@googlegroups.com 
.

Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/309f6eba-6f93-4e5e-a23e-42073e8e9c77%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/561C6BEC.7060704%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Get unversioned static file url while using CachedStaticFilesStorage

2015-10-12 Thread Tim Graham
If you used the "as var" syntax: {% static "myapp/css/base.css" as 
admin_base_css %}, then you could write a custom template filter that 
removes the version suffix and then apply it to that variable.

On Sunday, October 11, 2015 at 11:28:10 AM UTC-7, Dheerendra Rathor wrote:
>
> Hello all,
>
> I want to retrieve static file url without version number for a specific 
> static file url while using staticfiles app. 
>
> Is there any way to achieve this with {% static %} tag?
>

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/046e871f-8d17-4d05-9529-11ef95f0dc4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: is Django right choice for a financial app

2015-10-12 Thread kk

hello,


On Tuesday 13 October 2015 04:09 AM, Avraham Serour wrote:


Sqlalchemy is more performant? In what way? Do you have any reference 
or this was from personal experience?



Personal experience and some online reviews.
On Oct 13, 2015 1:11 AM, "kk" > wrote:




On Tuesday 13 October 2015 01:27 AM, bobhaugen wrote:

krmane, google is misbehaving and will not allow me to reply to
your reply to me, so I'll fake it and do some cutnpasting.

You wrote:
>  I did not get the react concept.
https://facebook.github.io/react/

I wrote:

We use the django ORM, not sqlalchemy, but that would probably
just make it all better.

And you replied: Oh is that so?

And now I am stuck in a box. But anyway, I think my comment
miscommunicated. I meant sqlalchemy would probably make it better.
--

I see, I am sorry I could not read it properly.
I use a screen reader because I am totally blind.
I guess it did not read things properly in a way that associated
lines correctly.
I know for sure sqlalchemy is more performant so was thinking.
happy hacking.
Krishnakant.
-- 
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-users+unsubscr...@googlegroups.com
.
To post to this group, send email to django-users@googlegroups.com
.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/561C2FEF.8030800%40gmail.com

.
For more options, visit https://groups.google.com/d/optout.

--
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-users+unsubscr...@googlegroups.com 
.
To post to this group, send email to django-users@googlegroups.com 
.

Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFWa6tLcxawEHaSAvGsaUBpKDEq2O%2BWHZ-KoTPqtVsbuhUZs7w%40mail.gmail.com 
.

For more options, visit https://groups.google.com/d/optout.


--
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/561C6B73.4090301%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help with UnaccentExtension migration

2015-10-12 Thread Tim Graham
That migration file looks correct to me. How did you determine the query 
didn't get run? Are you logging all queries?

On Sunday, October 11, 2015 at 9:30:19 AM UTC-7, pusateri wrote:
>
> I was trying to enable the unaccent postgresql extension using a database 
> migration as hinted here:
>
>
> https://docs.djangoproject.com/en/1.8/ref/contrib/postgres/lookups/#unaccent
>
> I created an empty migration and then added the UnaccentExtension 
> operation and ran the migration but the database command "CREATE EXTENSION 
> unaccent" did not get run on my database even though the migration ran 
> without error.
>
> Here is my migration file:
>
> # -*- coding: utf-8 -*-
> from __future__ import unicode_literals
>
> from django.db import migrations, models
> from django.contrib.postgres.operations import UnaccentExtension
>
>
> class Migration(migrations.Migration):
>
> dependencies = [
> ('maps', '0010_auto_20151010_1756'),
> ]
>
> operations = [
> UnaccentExtension(),
> ]
>
>
>
> Any ideas on how to fix this migration file so that it works?
>

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/37fbc978-8563-4117-92c9-5b5dbc93710a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: running migrate through views itself

2015-10-12 Thread Tim Graham
You can execute management commands from Python code using call_command():

https://docs.djangoproject.com/en/stable/ref/django-admin/#running-management-commands-from-your-code

It seems a bit risky to me to expose functionality to your users that allow 
them to change your database schema as a result of some action. This isn't 
really how Django is designed in terms of having models which map to 
database tables, but I suppose there could be use cases for doing that. 
I'll be curious to learn if others have done anything like you propose.

On Sunday, October 11, 2015 at 11:15:30 PM UTC-7, krmane wrote:
>
> Hello all. 
> The financial project I am developing requires that when the user creats 
> on create organization. the Migrate command has to be run automatically. 
> I have 2 questions regarding this. 
> 1, If I am using sqlalchemy instead of sqlobject, will the migrate 
> utility work? 
> 2, If yes then how can I do this through code in a view function? if no 
> then is there a way to do it through sqlalchemy?  or should I use the 
> create_all function in sqlalchemy itself? 
>
> Happy hacking. 
> Krishnakant. 
>

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/309f6eba-6f93-4e5e-a23e-42073e8e9c77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Errors in tests when working through contribution tutorial

2015-10-12 Thread Tim Graham
Hi Lee, I think the issue is that the tests don't pass on Python 3.5 at the 
commit where the contributing was tutorial was authored. I suppose we'll 
have to update it to use a more recent patch or at least mention this 
caveat for now.

On Monday, October 12, 2015 at 5:12:20 PM UTC-7, Lee Cartwright wrote:
>
> Hi,
>
> I'm not sure if this is the right group for this question, but I figured 
> it was the best place to start. I'm interested in contributing to the 
> Django project and have spent some time today working through the 
> contribution tutorial. I've got to the initial 'running tests' stage and 
> have a few test errors that I cannot figure out. The output is:
>
> ==
>
> FAIL: test_old_style_storage (file_storage.tests.FileFieldStorageTests)
>
> --
>
> Traceback (most recent call last):
>
>   File 
> "/Users/leec/Development/django/contrib_tutorial/django/tests/file_storage/tests.py",
>  
> line 566, in test_old_style_storage
>
> self.assertEqual(len(warns), 2)
>
> AssertionError: 4 != 2
>
>
> ==
>
> FAIL: test_migrate_legacy_router (multiple_database.tests.RouterTestCase)
>
> --
>
> Traceback (most recent call last):
>
>   File 
> "/Users/leec/Development/django/contrib_tutorial/django/tests/multiple_database/tests.py",
>  
> line 954, in test_migrate_legacy_router
>
> self.assertEqual(recorded, [])
>
> AssertionError: Lists differ: [ 0x10e915828>] != []
>
>
> First list contains 1 additional elements.
>
> First extra element 0:
>
> {message : DeprecationWarning('inspect.getargspec() is deprecated, use 
> inspect.signature() instead',), category : 'DeprecationWarning', filename : 
> '/Users/leec/Development/django/contrib_tutorial/django/django/db/utils.py', 
> lineno : 293, line : None}
>
>
> - []
>
> + []
>
>
> ==
>
> FAIL: test_if_tag_eq_deprecated 
> (template_tests.syntax_tests.test_if.IfTagTests)
>
> --
>
> Traceback (most recent call last):
>
>   File 
> "/Users/leec/Development/django/contrib_tutorial/django/django/test/utils.py",
>  
> line 182, in inner
>
> return test_func(*args, **kwargs)
>
>   File 
> "/Users/leec/Development/django/contrib_tutorial/django/tests/template_tests/utils.py",
>  
> line 62, in inner
>
> func(self)
>
>   File 
> "/Users/leec/Development/django/contrib_tutorial/django/tests/template_tests/syntax_tests/test_if.py",
>  
> line 537, in test_if_tag_eq_deprecated
>
> self.assertEqual(len(warns), 1)
>
> AssertionError: 3 != 1
>
>
> ==
>
> FAIL: test_only_new_files 
> (utils_tests.test_autoreload.TestFilenameGenerator)
>
> --
>
> Traceback (most recent call last):
>
>   File 
> "/Users/leec/Development/django/contrib_tutorial/django/tests/utils_tests/test_autoreload.py",
>  
> line 87, in test_only_new_files
>
> self.assertEqual(len(filenames2), 1)
>
> AssertionError: 0 != 1
>
>
> --
>
>
> I'm guessing this is because something isn't quite right in my development 
> set up but I haven't been able to figure out exactly what. If anyone can 
> give me some pointers as to what I should check I'd really appreciate it.
>
>
> OS: Mac OS X Yosemite (10.10.5)
>
> Python: 3.5.0
>
>
> Thanks,
>
> Lee
>

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/aa960193-0d9c-420b-bcb4-c194851bef21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django.contrib.auth 1.8 failed if user.pk not int

2015-10-12 Thread Tim Graham
In the traceback it appears that to_python() is being called for AutoField, 
not CharField. Are you sure the custom user model with the CharField pk is 
properly configured?

On Monday, October 12, 2015 at 7:03:25 AM UTC-7, Petr Bondarenko wrote:
>
> Apparently my problem is caused by the transition to a new Model._meta API.
> It was:
> request.session[SESSION_KEY] = user.pk
> It became:
> request.session[SESSION_KEY] = user._meta.pk.value_to_string(user)
>
> As user.pk we use access_token - CharField(max_length=64, 
> primary_key=True)
> An error occurs in a certain magic method to_python() in 
> django.db.models.fields
> Traceback is seen.
>
> суббота, 10 октября 2015 г., 6:25:50 UTC+5 пользователь Tim Graham написал:
>>
>> Here's the commit and ticket:
>>
>> https://github.com/django/django/commit/0f7f5bc9
>> https://code.djangoproject.com/ticket/24161
>>
>> I think you'll probably have to fix this in your app, but if a change in 
>> Django will help, let me know. Possibly your user model needs a CharField 
>> for its primary key.
>>
>> On Friday, October 9, 2015 at 5:06:59 PM UTC-4, Petr Bondarenko wrote:
>>>
>>> Hi,
>>>
>>> when migrating code from version 1.7 to 1.8 I have a problem.
>>> We do not use standard authentication through ModelBackend.
>>> Authentication takes place on a different server protocol OAuth2.
>>> For the User, using fake-model RemoteApiUser. In which the primary key 
>>> is *access_token*.
>>> Acces_token is written to the standard key 
>>> *django.contrib.auth.SESSION_KEY*.
>>> It is used in RemoteAuthenticationBackend as *user_id* in *get_user()*
>>>  function.
>>> This function generates a request to api-server  in which the token is 
>>> returned by the User.
>>> It is formed from the data object RemoteApiUser and return it.
>>>
>>> In version 1.7. everything worked fine, but when migrating to 1.8 there 
>>> is an error:
>>>
>>> Traceback (most recent call last):
>>> File "/usr/lib/python3.4/wsgiref/handlers.py", line 137, in run
>>> self.result = application(self.environ, self.start_response)
>>> File 
>>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/contrib/staticfiles/handlers.py",
>>>  
>>> line 63, in __call__
>>> return self.application(environ, start_response) 
>>>  
>>> File 
>>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/core/handlers/wsgi.py",
>>>  
>>> line 189, in __call__
>>> response = self.get_response(request)
>>> File 
>>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/core/handlers/base.py",
>>>  
>>> line 218, in get_response
>>> response = self.handle_uncaught_exception(request, resolver, 
>>> sys.exc_info())
>>> File 
>>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/core/handlers/base.py",
>>>  
>>> line 261, in handle_uncaught_exception
>>> return debug.technical_500_response(request, *exc_info)
>>> File 
>>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/views/debug.py",
>>>  
>>> line 97, in technical_500_response
>>> html = reporter.get_traceback_html()
>>> File 
>>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/views/debug.py",
>>>  
>>> line 383, in get_traceback_html
>>> c = Context(self.get_traceback_data(), use_l10n=False)
>>> File 
>>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/views/debug.py",
>>>  
>>> line 328, in get_traceback_data
>>> frames = self.get_traceback_frames()  
>>> File 
>>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/views/debug.py",
>>>  
>>> line 501, in get_traceback_frames
>>> 'vars': self.filter.get_traceback_frame_variables(self.request, 
>>> tb.tb_frame),
>>> File 
>>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/views/debug.py",
>>>  
>>> line 234, in get_traceback_frame_variables
>>> cleansed[name] = self.cleanse_special_types(request, value)   
>>> File 
>>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/views/debug.py",
>>>  
>>> line 189, in cleanse_special_types
>>> if isinstance(value, HttpRequest):
>>> File 
>>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/utils/functional.py",
>>>  
>>> line 225, in inner
>>> self._setup()
>>> File 
>>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/utils/functional.py",
>>>  
>>> line 365, in _setup
>>> self._wrapped = self._setupfunc()
>>> File 
>>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/contrib/auth/middleware.py",
>>>  
>>> line 22, in 
>>> request.user = SimpleLazyObject(lambda: get_user(request))
>>> File 
>>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/contrib/auth/middleware.py",
>>>  
>>> line 10, in get_user
>>> request._cached_user = auth.get_user(request)
>>> File 
>>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/contrib/auth/__init__.py",
>>>  
>>> line 167, in get_user
>>> user_id = _get_user_session_key(request)
>>> File 
>>> 

Errors in tests when working through contribution tutorial

2015-10-12 Thread Lee Cartwright
Hi,

I'm not sure if this is the right group for this question, but I figured it 
was the best place to start. I'm interested in contributing to the Django 
project and have spent some time today working through the contribution 
tutorial. I've got to the initial 'running tests' stage and have a few test 
errors that I cannot figure out. The output is:

==

FAIL: test_old_style_storage (file_storage.tests.FileFieldStorageTests)

--

Traceback (most recent call last):

  File 
"/Users/leec/Development/django/contrib_tutorial/django/tests/file_storage/tests.py",
 
line 566, in test_old_style_storage

self.assertEqual(len(warns), 2)

AssertionError: 4 != 2


==

FAIL: test_migrate_legacy_router (multiple_database.tests.RouterTestCase)

--

Traceback (most recent call last):

  File 
"/Users/leec/Development/django/contrib_tutorial/django/tests/multiple_database/tests.py",
 
line 954, in test_migrate_legacy_router

self.assertEqual(recorded, [])

AssertionError: Lists differ: [] != []


First list contains 1 additional elements.

First extra element 0:

{message : DeprecationWarning('inspect.getargspec() is deprecated, use 
inspect.signature() instead',), category : 'DeprecationWarning', filename : 
'/Users/leec/Development/django/contrib_tutorial/django/django/db/utils.py', 
lineno : 293, line : None}


- []

+ []


==

FAIL: test_if_tag_eq_deprecated 
(template_tests.syntax_tests.test_if.IfTagTests)

--

Traceback (most recent call last):

  File 
"/Users/leec/Development/django/contrib_tutorial/django/django/test/utils.py", 
line 182, in inner

return test_func(*args, **kwargs)

  File 
"/Users/leec/Development/django/contrib_tutorial/django/tests/template_tests/utils.py",
 
line 62, in inner

func(self)

  File 
"/Users/leec/Development/django/contrib_tutorial/django/tests/template_tests/syntax_tests/test_if.py",
 
line 537, in test_if_tag_eq_deprecated

self.assertEqual(len(warns), 1)

AssertionError: 3 != 1


==

FAIL: test_only_new_files 
(utils_tests.test_autoreload.TestFilenameGenerator)

--

Traceback (most recent call last):

  File 
"/Users/leec/Development/django/contrib_tutorial/django/tests/utils_tests/test_autoreload.py",
 
line 87, in test_only_new_files

self.assertEqual(len(filenames2), 1)

AssertionError: 0 != 1


--


I'm guessing this is because something isn't quite right in my development 
set up but I haven't been able to figure out exactly what. If anyone can 
give me some pointers as to what I should check I'd really appreciate it.


OS: Mac OS X Yosemite (10.10.5)

Python: 3.5.0


Thanks,

Lee

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/04857cd2-6698-4102-8cf6-d142c76360c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: is Django right choice for a financial app

2015-10-12 Thread Avraham Serour
Sqlalchemy is more performant? In what way? Do you have any reference or
this was from personal experience?
On Oct 13, 2015 1:11 AM, "kk"  wrote:

>
>
> On Tuesday 13 October 2015 01:27 AM, bobhaugen wrote:
>
> krmane, google is misbehaving and will not allow me to reply to your reply
> to me, so I'll fake it and do some cutnpasting.
>
> You wrote:
> >  I did not get the react concept.
> https://facebook.github.io/react/
>
> I wrote:
>
> We use the django ORM, not sqlalchemy, but that would probably just make
> it all better.
>
> And you replied: Oh is that so?
>
> And now I am stuck in a box. But anyway, I think my comment
> miscommunicated. I meant sqlalchemy would probably make it better.
> --
>
> I see, I am sorry I could not read it properly.
> I use a screen reader because I am totally blind.
> I guess it did not read things properly in a way that associated lines
> correctly.
> I know for sure sqlalchemy is more performant so was thinking.
> happy hacking.
> Krishnakant.
>
> --
> 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-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/561C2FEF.8030800%40gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFWa6tLcxawEHaSAvGsaUBpKDEq2O%2BWHZ-KoTPqtVsbuhUZs7w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: is Django right choice for a financial app

2015-10-12 Thread kk



On Tuesday 13 October 2015 01:27 AM, bobhaugen wrote:
krmane, google is misbehaving and will not allow me to reply to your 
reply to me, so I'll fake it and do some cutnpasting.


You wrote:
>  I did not get the react concept.
https://facebook.github.io/react/

I wrote:
We use the django ORM, not sqlalchemy, but that would probably just 
make it all better.

And you replied: Oh is that so?

And now I am stuck in a box. But anyway, I think my comment 
miscommunicated. I meant sqlalchemy would probably make it better.

--

I see, I am sorry I could not read it properly.
I use a screen reader because I am totally blind.
I guess it did not read things properly in a way that associated lines 
correctly.

I know for sure sqlalchemy is more performant so was thinking.
happy hacking.
Krishnakant.

--
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/561C2FEF.8030800%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: HTMLDOC as a python view

2015-10-12 Thread James Schneider
> and then saves the result to a pdf file in /media/pdf
>
> but somewhere it would appear that the html is being lost and therefore
not being converted or something.
>

I forgot to address this. When you say that the HTML is missing, do you
mean that the CSS styling is missing? The HTML to PDF converters all have
pretty limited support (if any) for CSS styling, which may be why your
documents render incorrectly. That shouldn't cause an error with Adobe
reader though.

Have you seen django-easy-pdf? It wraps in a bunch of the functionality
that you are performing manually. Might be a good alternative.

http://django-easy-pdf.readthedocs.org/en/stable/

-James

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciV-p31XwMv2_T%2B6xo8DkGKNrwwV_eNQkZwtSaHPbebDTA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: HTMLDOC as a python view

2015-10-12 Thread James Schneider
> Please excuse if this is the wrong forum and if a mod wants to move it
please feel free, just please let me know where it went.
>
> I'm attempting to convert html to pdf on the fly with HTMLDOC.
>
> The fly in the ointment appears to be that the generated pdf is not
viewable in that it opens Adobe Reader and gives a warning This PDF
document might not be displayed correctly.
>

Sounds like an issue with the shell application you are using to generate
it. Have you tried manually grabbing the generated file from the server
(not through the web) and opening it with the same result?

> worker = subprocess.Popen( """htmldoc --webpage "%s" --linkstyle
plain --footer ... --no-compression -t pdf14 > %s_tmp""" % ( url,
outputfile ), shell = True, stdout = subprocess.PIPE, stderr =
subprocess.STDOUT )

Have you tried running the command manually in the shell and then trying to
open the PDF? That would eliminate Django as a culprit.

-James

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciWKowx16gc4bsz28%3Dm5B-wKNpnSj5kH-MLzBXcx8eAQ5A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: is Django right choice for a financial app

2015-10-12 Thread James Schneider
> The said project is an enterprise accounting (book keeping ) system.
> It is not mere dynamic content such as that served by news rooms (the
very foundation of Django's origin ).
> It is going to be lot of dynamic views which actually have to
conditionally serve ad-hock dynamic data.

As long as you can coerce the data into Django models (preferred), Python
objects/dicts/lists, or have some function that returns the data in a sane
serialized manner such as JSON/XML, that shouldn't be an issue. That's
pretty much how all web apps work.

> It will also be used at point of  sails counters for example in trade
fairs and malls.

Here is where you'll run into trouble. PoS systems usually need to be able
to run in a standalone mode due to a lack of connectivity. Django is not
meant to be run directly on the client side (although I suppose it could
be). Without connectivity back to the Django server, the clients need some
way to store transactions locally and upload them later. A web application
is not ideal in this scenario. You would need to develop a local PoS app
(perhaps in Python directly) that knows how to communicate with Django as
connectivity is available, usually via an API that you would write in
Django that the app knows how to use.

You also need to be careful with the data that is traversing your system.
Not sure what country you are in, but in the US, PoS systems are required
to adhere to strict guidelines when accepting payments, even if it isn't
stored within your system. If any sort of electronic payment card hits your
app, you're probably subject to those regulations. Check with your legal
and information security team before accepting payments.

> So is Django good enough for such development?

Yes and no for the reasons above.

> We are used to using sqlalchemy and would want to continue the same for
ORM.

I believe there is 3rd party support for SQLAlchemy as a plugin for Django,
but not officially out of the box. I'm not familiar with any packages to
provide further comment, but they definitely exist.

> Happy hacking.
> Krishnakant
>

That's the last thing you want to say around a PoS system. :-P

If you have doubts, I would recommend you run through the tutorial and try
it out yourself to get a better feel for its capabilities.

-James

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciVW8Fm-quGctTpd7Ebx%3DGgsTKAs2xe0vj_hgC_A93o8GQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [REQUEST] Please list all the deprecations in the changelogs.

2015-10-12 Thread Vasiliy Korol
Xavier, thank you!
My bad, I missed it. Sorry for the fuss, it was my fault.
Consider the question closed.

понедельник, 12 октября 2015 г., 15:21:22 UTC+2 пользователь Xavier Ordoquy 
написал:
>
> Hi Vasiliy, 
>
> > Le 12 oct. 2015 à 14:53, Vasiliy Korol  
> a écrit : 
> > 
> > Hi. 
> > I find it useful to turn DeprecationWarnings into exeptions on the 
> development server in order to ease the future transition to the next 
> Django LTS release. 
> > After migrating to Django 1.8.5, we received some unexpected exceptions 
> on the devel server, related to the recently deprecated features (like the 
> 'context_instance' kwarg in render_to_response() ). 
> > Could the developers please mention ALL the new deprecations in the 
> changelog for every minor version release? It would be very convenient to 
> know about these before upgrading. 
>
> Isn’t it mentioned  here: 
>
> https://docs.djangoproject.com/en/1.8/releases/1.8/#dictionary-and-context-instance-arguments-of-rendering-functions
>  
> ? 
>
> It says it’s removed in 1.10 which translates into a DeprecationWarning in 
> 1.8 
>
> Regards, 
> Xavier, 
> Linovia. 
>
>

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/71805239-93c6-4bf4-a3cf-1ae8794e9801%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: is Django right choice for a financial app

2015-10-12 Thread bobhaugen
krmane, google is misbehaving and will not allow me to reply to your reply 
to me, so I'll fake it and do some cutnpasting.

You wrote:
>  I did not get the react concept.
https://facebook.github.io/react/

I wrote:

We use the django ORM, not sqlalchemy, but that would probably just make it 
all better.

And you replied: Oh is that so?

And now I am stuck in a box. But anyway, I think my comment 
miscommunicated. I meant sqlalchemy would probably make it better.

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7b50ec0f-4064-44f6-8b11-935204e32042%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: is Django right choice for a financial app

2015-10-12 Thread kk



On Monday 12 October 2015 08:06 PM, bobhaugen wrote:

On Sunday, October 11, 2015 at 10:33:03 PM UTC-5, krmane wrote:

The said project is an enterprise accounting (book keeping ) system.
It is not mere dynamic content such as that served by news rooms (the
very foundation of Django's origin ).
It is going to be lot of dynamic views which actually have to
conditionally serve ad-hock dynamic data. 



We're doing the equivalent of an ERP system in django.
https://github.com/valnet/valuenetwork


Wow that's interesting.
I guess ERP needs scalability and Django is good at that.
The django backend works great, and has handled probably more complex 
processing than you will do. Or at least, very complex, like 
event-driven MRP. It also does multi-party accounting.



Ic.
Main problem we have is that complex pages with lots of django forms 
get way too slow. We plan to use django-restframework to create an API 
which will be consumed by something like React in the browser.

Well We are actually planning to use REST based services.
But I did not get the react concept.


We use the django ORM, not sqlalchemy, but that would probably just 
make it all better.

Oh is that so?
How about baked queries in sqlalchemy where queries from Python code are 
already byte compiled?

How about the SA expression language?
So far as what I herd, SQLAlchemy is more performant and fast than 
sqlobject?



--
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-users+unsubscr...@googlegroups.com 
.
To post to this group, send email to django-users@googlegroups.com 
.

Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c4d38614-621c-4cc2-ad74-2e4744725fc8%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/561BF43B.7050100%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


HTMLDOC as a python view

2015-10-12 Thread MikeKJ
Please excuse if this is the wrong forum and if a mod wants to move it 
please feel free, just please let me know where it went.

I'm attempting to convert html to pdf on the fly with HTMLDOC.

The fly in the ointment appears to be that the generated pdf is not 
viewable in that it opens Adobe Reader and gives a warning This PDF 
document might not be displayed correctly.

The model creates the filename as a slug appended with pdf creates a dict 
of the variables and calls 

def generate_or_serve_pdf( self, saving = False ):
"""
Return a link to the PDF of this CV, generating one only if 
necessary.
"""
self.filename = "%s.pdf" % self.slug
pdfurl = os.path.join( settings.MEDIA_URL, "pdf", self.filename )
pdfpath = os.path.join( settings.MEDIA_ROOT, "pdf", self.filename )
if saving == True or not os.path.exists( pdfpath ):
super( CVMask, self ).save()
url = """%s/%s/""" % ( settings.CVBASE, self.slug )
pdfgen( url, pdfpath )
#return pdfurl
else:
return pdfurl


pdfgen is

def pdfgen( url, outputfile = None, testing = False ):
"""
Generate a PDF file from the supplied URL and write
it to outputfile when complete:
>>> pdfgen("http://www.google.com;, "testpdfgen.pdf", testing = True )
"""
if os.path.exists( outputfile ):
os.unlink( outputfile )
worker = subprocess.Popen( """htmldoc --webpage "%s" --linkstyle plain 
--footer ... --no-compression -t pdf14 > %s_tmp""" % ( url, outputfile ), 
shell = True, stdout = subprocess.PIPE, stderr = subprocess.STDOUT )
worker.wait()
os.rename( outputfile+"_tmp", outputfile )

and then saves the result to a pdf file in /media/pdf

but somewhere it would appear that the html is being lost and therefore not 
being converted or something.

Using XHTML2PDF it all works fine but with some horrible inconstencies in 
the rendering and just want to try this to see if it is better but if the 
pdf isn;t generated in the first place I can't do that.


-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6fbbfd3f-f66b-4021-8c0e-200544660189%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: is Django right choice for a financial app

2015-10-12 Thread bobhaugen
On Sunday, October 11, 2015 at 10:33:03 PM UTC-5, krmane wrote:
>
> The said project is an enterprise accounting (book keeping ) system. 
> It is not mere dynamic content such as that served by news rooms (the 
> very foundation of Django's origin ). 
> It is going to be lot of dynamic views which actually have to 
> conditionally serve ad-hock dynamic data. 


We're doing the equivalent of an ERP system in django.
https://github.com/valnet/valuenetwork

The django backend works great, and has handled probably more complex 
processing than you will do. Or at least, very complex, like event-driven 
MRP. It also does multi-party accounting.

Main problem we have is that complex pages with lots of django forms get 
way too slow. We plan to use django-restframework to create an API which 
will be consumed by something like React in the browser. 

We use the django ORM, not sqlalchemy, but that would probably just make it 
all better.

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c4d38614-621c-4cc2-ad74-2e4744725fc8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django.contrib.auth 1.8 failed if user.pk not int

2015-10-12 Thread Petr Bondarenko
Apparently my problem is caused by the transition to a new Model._meta API.
It was:
request.session[SESSION_KEY] = user.pk
It became:
request.session[SESSION_KEY] = user._meta.pk.value_to_string(user)

As user.pk we use access_token - CharField(max_length=64, primary_key=True)
An error occurs in a certain magic method to_python() in 
django.db.models.fields
Traceback is seen.

суббота, 10 октября 2015 г., 6:25:50 UTC+5 пользователь Tim Graham написал:
>
> Here's the commit and ticket:
>
> https://github.com/django/django/commit/0f7f5bc9
> https://code.djangoproject.com/ticket/24161
>
> I think you'll probably have to fix this in your app, but if a change in 
> Django will help, let me know. Possibly your user model needs a CharField 
> for its primary key.
>
> On Friday, October 9, 2015 at 5:06:59 PM UTC-4, Petr Bondarenko wrote:
>>
>> Hi,
>>
>> when migrating code from version 1.7 to 1.8 I have a problem.
>> We do not use standard authentication through ModelBackend.
>> Authentication takes place on a different server protocol OAuth2.
>> For the User, using fake-model RemoteApiUser. In which the primary key is 
>> *access_token*.
>> Acces_token is written to the standard key 
>> *django.contrib.auth.SESSION_KEY*.
>> It is used in RemoteAuthenticationBackend as *user_id* in *get_user()*
>>  function.
>> This function generates a request to api-server  in which the token is 
>> returned by the User.
>> It is formed from the data object RemoteApiUser and return it.
>>
>> In version 1.7. everything worked fine, but when migrating to 1.8 there 
>> is an error:
>>
>> Traceback (most recent call last):
>> File "/usr/lib/python3.4/wsgiref/handlers.py", line 137, in run
>> self.result = application(self.environ, self.start_response)
>> File 
>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/contrib/staticfiles/handlers.py",
>>  
>> line 63, in __call__
>> return self.application(environ, start_response) 
>>  
>> File 
>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/core/handlers/wsgi.py",
>>  
>> line 189, in __call__
>> response = self.get_response(request)
>> File 
>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/core/handlers/base.py",
>>  
>> line 218, in get_response
>> response = self.handle_uncaught_exception(request, resolver, 
>> sys.exc_info())
>> File 
>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/core/handlers/base.py",
>>  
>> line 261, in handle_uncaught_exception
>> return debug.technical_500_response(request, *exc_info)
>> File 
>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/views/debug.py",
>>  
>> line 97, in technical_500_response
>> html = reporter.get_traceback_html()
>> File 
>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/views/debug.py",
>>  
>> line 383, in get_traceback_html
>> c = Context(self.get_traceback_data(), use_l10n=False)
>> File 
>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/views/debug.py",
>>  
>> line 328, in get_traceback_data
>> frames = self.get_traceback_frames()  
>> File 
>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/views/debug.py",
>>  
>> line 501, in get_traceback_frames
>> 'vars': self.filter.get_traceback_frame_variables(self.request, 
>> tb.tb_frame),
>> File 
>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/views/debug.py",
>>  
>> line 234, in get_traceback_frame_variables
>> cleansed[name] = self.cleanse_special_types(request, value)   
>> File 
>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/views/debug.py",
>>  
>> line 189, in cleanse_special_types
>> if isinstance(value, HttpRequest):
>> File 
>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/utils/functional.py",
>>  
>> line 225, in inner
>> self._setup()
>> File 
>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/utils/functional.py",
>>  
>> line 365, in _setup
>> self._wrapped = self._setupfunc()
>> File 
>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/contrib/auth/middleware.py",
>>  
>> line 22, in 
>> request.user = SimpleLazyObject(lambda: get_user(request))
>> File 
>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/contrib/auth/middleware.py",
>>  
>> line 10, in get_user
>> request._cached_user = auth.get_user(request)
>> File 
>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/contrib/auth/__init__.py",
>>  
>> line 167, in get_user
>> user_id = _get_user_session_key(request)
>> File 
>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/contrib/auth/__init__.py",
>>  
>> line 59, in _get_user_session_key
>> return get_user_model()._meta.pk.to_python(request.session[SESSION_KEY])
>> File 
>> "/root/django/envs/wallet/lib/python3.4/site-packages/django/db/models/fields/__init__.py",
>>  
>> line 969, in to_python
>> params={'value': value},
>> 

Re: [REQUEST] Please list all the deprecations in the changelogs.

2015-10-12 Thread Xavier Ordoquy
Hi Vasiliy,

> Le 12 oct. 2015 à 14:53, Vasiliy Korol  a écrit :
> 
> Hi.
> I find it useful to turn DeprecationWarnings into exeptions on the 
> development server in order to ease the future transition to the next Django 
> LTS release.
> After migrating to Django 1.8.5, we received some unexpected exceptions on 
> the devel server, related to the recently deprecated features (like the 
> 'context_instance' kwarg in render_to_response() ).
> Could the developers please mention ALL the new deprecations in the changelog 
> for every minor version release? It would be very convenient to know about 
> these before upgrading.

Isn’t it mentioned  here:
https://docs.djangoproject.com/en/1.8/releases/1.8/#dictionary-and-context-instance-arguments-of-rendering-functions
 ?

It says it’s removed in 1.10 which translates into a DeprecationWarning in 1.8

Regards,
Xavier,
Linovia.

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9C687207-F2F4-446D-B84D-AA9202B6A363%40linovia.com.
For more options, visit https://groups.google.com/d/optout.


Re: [REQUEST] Please list all the deprecations in the changelogs.

2015-10-12 Thread Avraham Serour
could you contribute the list you made so it can be added to the release
notes, it is never too late to add them even for past releases

On Mon, Oct 12, 2015 at 3:53 PM, Vasiliy Korol 
wrote:

> Hi.
> I find it useful to turn DeprecationWarnings into exeptions on the
> development server in order to ease the future transition to the next
> Django LTS release.
> After migrating to Django 1.8.5, we received some unexpected exceptions on
> the devel server, related to the recently deprecated features (like the
> 'context_instance' kwarg in render_to_response() ).
> Could the developers please mention ALL the new deprecations in the
> changelog for every minor version release? It would be very convenient to
> know about these before upgrading.
>
> --
> 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-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/b325ef63-26da-47b6-8fe0-1544f2da06ab%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFWa6tKmJqCzWWjbjYPAEDaMvw9qzdk%2BsHtGda_8gVJLmzY_qQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[REQUEST] Please list all the deprecations in the changelogs.

2015-10-12 Thread Vasiliy Korol
Hi.
I find it useful to turn DeprecationWarnings into exeptions on the 
development server in order to ease the future transition to the next 
Django LTS release.
After migrating to Django 1.8.5, we received some unexpected exceptions on 
the devel server, related to the recently deprecated features (like the 
'context_instance' kwarg in render_to_response() ).
Could the developers please mention ALL the new deprecations in the 
changelog for every minor version release? It would be very convenient to 
know about these before upgrading.

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b325ef63-26da-47b6-8fe0-1544f2da06ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


running migrate through views itself

2015-10-12 Thread kk

Hello all.
The financial project I am developing requires that when the user creats 
on create organization. the Migrate command has to be run automatically.

I have 2 questions regarding this.
1, If I am using sqlalchemy instead of sqlobject, will the migrate 
utility work?
2, If yes then how can I do this through code in a view function? if no 
then is there a way to do it through sqlalchemy?  or should I use the 
create_all function in sqlalchemy itself?


Happy hacking.
Krishnakant.

--
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/561B4FAA.7040108%40gmail.com.
For more options, visit https://groups.google.com/d/optout.