ANN: eGenix mxODBC Connect 2.1.1 - Python Database Interface

2014-11-19 Thread eGenix Team: M.-A. Lemburg

ANNOUNCING
  eGenix.com mxODBC Connect

  Python Database Interface

Version 2.1.1


 mxODBC Connect is our commercially supported client-server product for
   connecting Python applications to relational databases
 in a truly platform independent way.


This announcement is also available on our web-site for online reading:
http://www.egenix.com/company/news/eGenix-mxODBC-Connect-2.1.1-GA.html


INTRODUCTION

The mxODBC Connect Database Interface for Python allows users to
easily connect Python applications to all major databases on the
market today in a highly portable, convenient and secure way.

Python Database Connectivity the Easy Way
-

Unlike our mxODBC Python extension, mxODBC Connect is designed as
client-server application, so you no longer need to find production
quality ODBC drivers for all the platforms you target with your Python
application.

Instead you use an easy to install royalty-free Python client library
which connects directly to the mxODBC Connect database server over the
network.

This makes mxODBC Connect a great basis for writing cross-platform
multi-tier database applications and utilities in Python, especially
if you run applications that need to communicate with databases such
as MS SQL Server and MS Access, Oracle Database, IBM DB2 and Informix,
Sybase ASE and Sybase Anywhere, MySQL, PostgreSQL, SAP MaxDB and many
more, that run on Windows or Linux machines.

Ideal for Database Driven Client Applications
-

By removing the need to install and configure ODBC drivers on the
client side and dealing with complicated network setups for each set
of drivers, mxODBC Connect greatly simplifies deployment of database
driven client applications, while at the same time making the network
communication between client and database server more efficient and
more secure.

For more information, please have a look at the mxODBC Connect product
page, in particular, the full list of available features.

For more information, please see the product page:

http://www.egenix.com/products/python/mxODBCConnect/


NEWS

mxODBC Connect 2.1.0 is a patch level release of our successful mxODBC
Connect product. We have put great emphasis on enhancing the TLS/SSL
setup of the mxODBC Connect product, addressing recent attacks on
SSLv3 and improving the security defaults.

Security Enhancements
-

 * Updated included eGenix pyOpenSSL to 0.13.6, which includes OpenSSL
   1.0.1j and enables the TLS_FALLBACK_SCSV protection against
   protocol downgrade attacks.

 * OpenSSL cipher string list updated to use the best available
   ciphers in OpenSSL 1.0.1j per default and support perfect forward
   security.

 * OpenSSL context options setup to disallow weak protocol features.

 * Disabled SSLv3 for the mxODBC Connect Client in response to the
   recent POODLE attack on SSLv3.

   mxODBC Connect Client 2.1.1 will not be able to communicate with
   mxODBC Connect Server 2.1.0 and earlier when using SSL mode. The
   error message looks like this: [Error] [('SSL routines',
   'SSL23_GET_SERVER_HELLO', 'unsupported protocol')] (using
   pyOpenSSL) or [SSLError] [Errno 1] _ssl.c:493: error:1408F10B:SSL
   routines:SSL3_GET_RECORD:wrong version number (using the ssl
   module).

 * Enabled TLS v1, v1.1 and v1.2 for the mxODBC Connect Server in SSL
   mode and have it use the best possible protocol when talking to a
   client.

   The server will still support SSLv3 for backwards compatibility
   reasons, since older mxODBC Connect Clients only support
   SSLv3. This will be changed in the next major/minor mxODBC Connect
   Server release.

 * Fixed a linker setting on Linux to have the mxODBC Connect Server
   use the embedded OpenSSL libraries instead of the system ones.

 * Improved the protocol handlers for SSL connection setups using
   mixed plain text/TLS connections to renew the session id after
   having established the TLS session.

mxODBC Connect Enhancements
---

 * Fixed a problem where connection/cursor.messages could not be
   accessed from the client side.

 * mxODBC Connect Client is now also available as web installer,
   greatly simplifying the installation of the client. It is now
   possible to install the client using a single pip command:

   pip install egenix-mx-base egenix-mxodbc-connect-client egenix-pyopenssl

 * Upgraded eGenix PyRun used for mxODBC Connect Server on Linux to
   2.0.1.

 * Upgraded the Python version used for mxODBC Connect Server on
   Windows to 2.7.8.

Asynchronous Processing
---

 * Fixed a problem which prevented the mxOD

Deploying Django project

2014-11-19 Thread termopro
 

I have created a Django 1.7 project and would like to deploy it. I am 
reading about how to do it right and i have some questions.

If i understand correctly deployment should contain the following steps:

1) Initial remote machine set up:

   - a) install os / server / database / cache ...
   - b) install Django and required modules
   - c) update database with real data

2) Upload code/ database changes to remote machine:

   - a) upload changed Django project
   - b) upload changes in Database tables (model migrations)

Most tutorials/articles about deployment do not cover 1.c and 2.b. Also the 
tasks 1.b. and 2.a. are solved using revision control tools (Git/Mercurial)

So i'd like to know:

   - 
   
   1) How do i install Django project or it's updates without revision 
   control tools ? Should i simply upload my project using FTP/SSH ? Is there 
   a good way to automate it ?
   - 
   
   2) How do i automate the task of uploading required database changes 
   (like model migrations) ?
   

-- 
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/e9fb8f5a-2bd9-47d5-80c7-07a3aa82bd25%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: FieldDoesNotExist Error in Tutorial Part 1

2014-11-19 Thread Adailton Nascimento
Use:
import datetime


class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField(auto_now=True)
 
class Meta:
   ordering = ['-pub_date']


def __str__(self):
   return self.question_text




delete all objects of your paste migrates. and run: PS:[for this option must 
delete the db]= python manage.py syncdb or use: makemigrations and then migrate 
.


Att;

Adailton do nascimento

-- 
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/85fcfbf4-e4d9-4ad0-8f40-7790a0dc9752%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Squid or Varnish for Django?

2014-11-19 Thread Avraham Serour
what do you mean by ESI? wikipedia has 7 definitions onlyon computer science

In any case you can build you django application normally and scale in the
future as needed.

squid and varnish have different purposes and work on opposites sides of
the pipe, varnish sits on the server side serving the html, squid sits on
the client side reading, and both of them work with http, doesn't matter if
you have django

before you complicate your architecture I suggest you start using the
django part of caching, set the http headers for caching

On Wed, Nov 19, 2014 at 1:16 AM, Trupti W  wrote:

> Hi all,
>
> I have a django application that needs to be built to scale in the future.
> I am considering http caching & ESI for the solution. Has any of you any
> experience with either Squid or Varnish? What works better with Django? I
> just want the caching & ESI functionality. We are using NGINX as the
> reverse proxy.
>
> Thanks!
>
> --
> 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/fb7e1649-0a3e-4d30-9a3d-ebc582650675%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/CAFWa6tKiW0xHQWp01fB1Wv9XojWqGGjU5_gNWtaCD-sf%2BuBk6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Webcomponents in Django

2014-11-19 Thread Timothy W. Cook
I have a Django app that I want to include a UI similar to the Polymer
designer https://www.polymer-project.org/tools/designer/
Source code here:  https://github.com/twcook/TdV-app-designer/tree/tdv
 plus the components installed via bower.


I have built this designer as a standalone app and it works great
using  python -m SimpleHTTPServer

I have the code included in the Django app templates directory, renamed
index.html to designer.html

I have a url entry:

url(r'^designer/', (DesignerView.as_view()), name='designer')

I have a view:

class DesignerView(TemplateView):
template_name = 'TdV-app-designer/designer.html'


and I have tried using the {% verbatim %} {% endverbatim %} tags to wrap
the code (the entire file, just the body, just the  tags, etc.) all to no success.

What happens is that the server begins recursively calling the custom
element.

​So I get:

[19/Nov/2014 09:46:41] "GET / HTTP/1.1" 200 12867
[19/Nov/2014 09:46:43] "GET /designer/ HTTP/1.1" 200 10193
[19/Nov/2014 09:46:43] "GET /designer/components/platform/platform.js
HTTP/1.1" 200 10196
[19/Nov/2014 09:46:44] "GET
/designer/elements/designer-element/designer-element.html HTTP/1.1" 200
10193
[19/Nov/2014 09:46:44] "GET
/designer/elements/designer-element/components/platform/platform.js
HTTP/1.1" 200 10193
[19/Nov/2014 09:46:44] "GET
/designer/elements/designer-element/elements/designer-element/designer-element.html
HTTP/1.1" 200 10193
[19/Nov/2014 09:46:44] "GET
/designer/elements/designer-element/elements/designer-element/components/platform/platform.js
HTTP/1.1" 200 10193
[19/Nov/2014 09:46:44] "GET
/designer/elements/designer-element/elements/designer-element/elements/designer-element/designer-element.html
HTTP/1.1" 200 10194

...

it continues until timeout and probably forever until the server runs out
of memory.

Anyway, I have no idea what this is telling me.

Any hints as to where the problem is and/or how to fix it?

Thanks,
Tim






​




Timothy Cook
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
MLHIM http://www.mlhim.org

-- 
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%2B%3DOU3XdmJmaPmjpGQe0UMXBwk0mhsawbdk3qynxRHwQhW6rsw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Tricky Django QuerySet with Complicated ForeignKey Traversals

2014-11-19 Thread Rodney Lewis
Please check out my question on StackOverflow:

http://stackoverflow.com/questions/27016026/tricky-django-queryset-with-complicated-foreignkey-traversals

I really appreciate any help you can offer.

-- 
Rodney Lewis
http://www.youtube.com/pyrodney

-- 
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/b03b2844-9266-49a0-a317-a9e1de27f2f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


What on earth is causing this "naive datetime" warning?

2014-11-19 Thread Daniel Grace
Hi,

Here is my model:
class Flow(models.Model):
ref = models.CharField(max_length=32)
state = models.ForeignKey(State)
flow_type = models.ForeignKey(Type)
created = models.DateTimeField(db_index=True, auto_now_add=True)
modified = models.DateTimeField(db_index=True, auto_now=True)
version = models.IntegerField()
def __str__(self):
return str(self.id)

Here is my test.py file:
import warnings
warnings.filterwarnings(
'error', r"DateTimeField .* received a naive datetime",
RuntimeWarning, r'django\.db\.models\.fields')


In settings.py:
TIME_ZONE = 'Europe/London'
USE_TZ = True

Here is what happens when I run the test script:
>python manage.py test flow
Creating test database for alias 'default'...
Traceback (most recent call last):
  File "manage.py", line 10, in 
execute_from_command_line(sys.argv)
  File "C:\landy\lib\site-packages\django\core\management\__init__.py", 
line 385
, in execute_from_command_line
utility.execute()
  File "C:\landy\lib\site-packages\django\core\management\__init__.py", 
line 377
, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"C:\landy\lib\site-packages\django\core\management\commands\test.py", lin
e 50, in run_from_argv
super(Command, self).run_from_argv(argv)
  File "C:\landy\lib\site-packages\django\core\management\base.py", line 
288, in
 run_from_argv
self.execute(*args, **options.__dict__)
  File 
"C:\landy\lib\site-packages\django\core\management\commands\test.py", lin
e 71, in execute
super(Command, self).execute(*args, **options)
  File "C:\landy\lib\site-packages\django\core\management\base.py", line 
338, in
 execute
output = self.handle(*args, **options)
  File 
"C:\landy\lib\site-packages\django\core\management\commands\test.py", lin
e 88, in handle
failures = test_runner.run_tests(test_labels)
  File "C:\landy\lib\site-packages\django\test\runner.py", line 147, in 
run_test
s
old_config = self.setup_databases()
  File "C:\landy\lib\site-packages\django\test\runner.py", line 109, in 
setup_da
tabases
return setup_databases(self.verbosity, self.interactive, **kwargs)
  File "C:\landy\lib\site-packages\django\test\runner.py", line 299, in 
setup_da
tabases
serialize=connection.settings_dict.get("TEST_SERIALIZE", True),
  File "C:\landy\lib\site-packages\django\db\backends\creation.py", line 
374, in
 create_test_db
test_flush=True,
  File "C:\landy\lib\site-packages\django\core\management\__init__.py", 
line 115
, in call_command
return klass.execute(*args, **defaults)
  File "C:\landy\lib\site-packages\django\core\management\base.py", line 
338, in
 execute
output = self.handle(*args, **options)
  File 
"C:\landy\lib\site-packages\django\core\management\commands\migrate.py",
line 160, in handle
executor.migrate(targets, plan, fake=options.get("fake", False))
  File "C:\landy\lib\site-packages\django\db\migrations\executor.py", line 
63, i
n migrate
self.apply_migration(migration, fake=fake)
  File "C:\landy\lib\site-packages\django\db\migrations\executor.py", line 
97, i
n apply_migration
migration.apply(project_state, schema_editor)
  File "C:\landy\lib\site-packages\django\db\migrations\migration.py", line 
107,
 in apply
operation.database_forwards(self.app_label, schema_editor, 
project_state, ne
w_state)
  File 
"C:\landy\lib\site-packages\django\db\migrations\operations\fields.py", l
ine 131, in database_forwards
schema_editor.alter_field(from_model, from_field, to_field)
  File "C:\landy\lib\site-packages\django\db\backends\schema.py", line 509, 
in a
lter_field
self._alter_field(model, old_field, new_field, old_type, new_type, 
old_db_pa
rams, new_db_params, strict)
  File "C:\landy\lib\site-packages\django\db\backends\schema.py", line 612, 
in _
alter_field
new_default = self.effective_default(new_field)
  File "C:\landy\lib\site-packages\django\db\backends\schema.py", line 183, 
in e
ffective_default
default = field.get_db_prep_save(default, self.connection)
  File "C:\landy\lib\site-packages\django\db\models\fields\__init__.py", 
line 62
7, in get_db_prep_save
prepared=False)
  File "C:\landy\lib\site-packages\django\db\models\fields\__init__.py", 
line 12
86, in get_db_prep_value
value = self.get_prep_value(value)
  File "C:\landy\lib\site-packages\django\db\models\fields\__init__.py", 
line 12
78, in get_prep_value
RuntimeWarning)
RuntimeWarning: DateTimeField Flow.created received a naive datetime 
(2014-11-19
 12:28:38.831258) while time zone support is active.

What on earth is causing this "naive datetime" warning?

Thanks

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

Re: Webcomponents in Django

2014-11-19 Thread Avraham Serour
looks like the html rendered is making the recursive requests, are you
using {% static %} and {% url 'designer' %} ?

On Wed, Nov 19, 2014 at 1:53 PM, Timothy W. Cook  wrote:

>
> I have a Django app that I want to include a UI similar to the Polymer
> designer https://www.polymer-project.org/tools/designer/
> Source code here:  https://github.com/twcook/TdV-app-designer/tree/tdv
>  plus the components installed via bower.
>
>
> I have built this designer as a standalone app and it works great
> using  python -m SimpleHTTPServer
>
> I have the code included in the Django app templates directory, renamed
> index.html to designer.html
>
> I have a url entry:
>
> url(r'^designer/', (DesignerView.as_view()), name='designer')
>
> I have a view:
>
> class DesignerView(TemplateView):
> template_name = 'TdV-app-designer/designer.html'
>
>
> and I have tried using the {% verbatim %} {% endverbatim %} tags to wrap
> the code (the entire file, just the body, just the  id="designer"> tags, etc.) all to no success.
>
> What happens is that the server begins recursively calling the custom
> element.
>
> ​So I get:
>
> [19/Nov/2014 09:46:41] "GET / HTTP/1.1" 200 12867
> [19/Nov/2014 09:46:43] "GET /designer/ HTTP/1.1" 200 10193
> [19/Nov/2014 09:46:43] "GET /designer/components/platform/platform.js
> HTTP/1.1" 200 10196
> [19/Nov/2014 09:46:44] "GET
> /designer/elements/designer-element/designer-element.html HTTP/1.1" 200
> 10193
> [19/Nov/2014 09:46:44] "GET
> /designer/elements/designer-element/components/platform/platform.js
> HTTP/1.1" 200 10193
> [19/Nov/2014 09:46:44] "GET
> /designer/elements/designer-element/elements/designer-element/designer-element.html
> HTTP/1.1" 200 10193
> [19/Nov/2014 09:46:44] "GET
> /designer/elements/designer-element/elements/designer-element/components/platform/platform.js
> HTTP/1.1" 200 10193
> [19/Nov/2014 09:46:44] "GET
> /designer/elements/designer-element/elements/designer-element/elements/designer-element/designer-element.html
> HTTP/1.1" 200 10194
>
> ...
>
> it continues until timeout and probably forever until the server runs out
> of memory.
>
> Anyway, I have no idea what this is telling me.
>
> Any hints as to where the problem is and/or how to fix it?
>
> Thanks,
> Tim
>
>
>
>
>
>
> ​
>
>
>
> 
> Timothy Cook
> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
> MLHIM http://www.mlhim.org
>
>  --
> 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%2B%3DOU3XdmJmaPmjpGQe0UMXBwk0mhsawbdk3qynxRHwQhW6rsw%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/CAFWa6tK4oru4vu9ZL-OXsfq74rQiiaETuUE5zV4rCR29Udg7ag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Webcomponents in Django

2014-11-19 Thread Timothy W. Cook
At the top of the both the main file where designer is called from and at
the top of designer.html I have:
{% load staticfiles i18n %}

The call to the designer template is in a list with other calls that work
fine:

designer

Thanks,
Tim


On Wed, Nov 19, 2014 at 10:54 AM, Avraham Serour  wrote:

> looks like the html rendered is making the recursive requests, are you
> using {% static %} and {% url 'designer' %} ?
>
> On Wed, Nov 19, 2014 at 1:53 PM, Timothy W. Cook  wrote:
>
>>
>> I have a Django app that I want to include a UI similar to the Polymer
>> designer https://www.polymer-project.org/tools/designer/
>> Source code here:  https://github.com/twcook/TdV-app-designer/tree/tdv
>>  plus the components installed via bower.
>>
>>
>> I have built this designer as a standalone app and it works great
>> using  python -m SimpleHTTPServer
>>
>> I have the code included in the Django app templates directory, renamed
>> index.html to designer.html
>>
>> I have a url entry:
>>
>> url(r'^designer/', (DesignerView.as_view()), name='designer')
>>
>> I have a view:
>>
>> class DesignerView(TemplateView):
>> template_name = 'TdV-app-designer/designer.html'
>>
>>
>> and I have tried using the {% verbatim %} {% endverbatim %} tags to wrap
>> the code (the entire file, just the body, just the > id="designer"> tags, etc.) all to no success.
>>
>> What happens is that the server begins recursively calling the custom
>> element.
>>
>> ​So I get:
>>
>> [19/Nov/2014 09:46:41] "GET / HTTP/1.1" 200 12867
>> [19/Nov/2014 09:46:43] "GET /designer/ HTTP/1.1" 200 10193
>> [19/Nov/2014 09:46:43] "GET /designer/components/platform/platform.js
>> HTTP/1.1" 200 10196
>> [19/Nov/2014 09:46:44] "GET
>> /designer/elements/designer-element/designer-element.html HTTP/1.1" 200
>> 10193
>> [19/Nov/2014 09:46:44] "GET
>> /designer/elements/designer-element/components/platform/platform.js
>> HTTP/1.1" 200 10193
>> [19/Nov/2014 09:46:44] "GET
>> /designer/elements/designer-element/elements/designer-element/designer-element.html
>> HTTP/1.1" 200 10193
>> [19/Nov/2014 09:46:44] "GET
>> /designer/elements/designer-element/elements/designer-element/components/platform/platform.js
>> HTTP/1.1" 200 10193
>> [19/Nov/2014 09:46:44] "GET
>> /designer/elements/designer-element/elements/designer-element/elements/designer-element/designer-element.html
>> HTTP/1.1" 200 10194
>>
>> ...
>>
>> it continues until timeout and probably forever until the server runs out
>> of memory.
>>
>> Anyway, I have no idea what this is telling me.
>>
>> Any hints as to where the problem is and/or how to fix it?
>>
>> Thanks,
>> Tim
>>
>>
>>
>>
>>
>>
>> ​
>>
>>
>>
>> 
>> Timothy Cook
>> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
>> MLHIM http://www.mlhim.org
>>
>>  --
>> 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%2B%3DOU3XdmJmaPmjpGQe0UMXBwk0mhsawbdk3qynxRHwQhW6rsw%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/CAFWa6tK4oru4vu9ZL-OXsfq74rQiiaETuUE5zV4rCR29Udg7ag%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 


Timothy Cook
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
MLHIM http://www.mlhim.org

-- 
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%2B%3DOU3Uay07UiOOcJVCEOpG%3Dyhk0-Uvn2qgi9CL8

Re: Webcomponents in Django

2014-11-19 Thread Avraham Serour
the line you posted is not a call to any template, it translates to a url
address given the view name.

the top line means that the staticfiles module is loaded, you need that in
order to use it in the template below, my question is if you actually use
it, how do you point to the js file for example?

On Wed, Nov 19, 2014 at 3:02 PM, Timothy W. Cook  wrote:

> At the top of the both the main file where designer is called from and at
> the top of designer.html I have:
> {% load staticfiles i18n %}
>
> The call to the designer template is in a list with other calls that work
> fine:
>
> designer
>
> Thanks,
> Tim
>
>
> On Wed, Nov 19, 2014 at 10:54 AM, Avraham Serour 
> wrote:
>
>> looks like the html rendered is making the recursive requests, are you
>> using {% static %} and {% url 'designer' %} ?
>>
>> On Wed, Nov 19, 2014 at 1:53 PM, Timothy W. Cook  wrote:
>>
>>>
>>> I have a Django app that I want to include a UI similar to the Polymer
>>> designer https://www.polymer-project.org/tools/designer/
>>> Source code here:  https://github.com/twcook/TdV-app-designer/tree/tdv
>>>  plus the components installed via bower.
>>>
>>>
>>> I have built this designer as a standalone app and it works great
>>> using  python -m SimpleHTTPServer
>>>
>>> I have the code included in the Django app templates directory, renamed
>>> index.html to designer.html
>>>
>>> I have a url entry:
>>>
>>> url(r'^designer/', (DesignerView.as_view()), name='designer')
>>>
>>> I have a view:
>>>
>>> class DesignerView(TemplateView):
>>> template_name = 'TdV-app-designer/designer.html'
>>>
>>>
>>> and I have tried using the {% verbatim %} {% endverbatim %} tags to wrap
>>> the code (the entire file, just the body, just the >> id="designer"> tags, etc.) all to no success.
>>>
>>> What happens is that the server begins recursively calling the custom
>>> element.
>>>
>>> ​So I get:
>>>
>>> [19/Nov/2014 09:46:41] "GET / HTTP/1.1" 200 12867
>>> [19/Nov/2014 09:46:43] "GET /designer/ HTTP/1.1" 200 10193
>>> [19/Nov/2014 09:46:43] "GET /designer/components/platform/platform.js
>>> HTTP/1.1" 200 10196
>>> [19/Nov/2014 09:46:44] "GET
>>> /designer/elements/designer-element/designer-element.html HTTP/1.1" 200
>>> 10193
>>> [19/Nov/2014 09:46:44] "GET
>>> /designer/elements/designer-element/components/platform/platform.js
>>> HTTP/1.1" 200 10193
>>> [19/Nov/2014 09:46:44] "GET
>>> /designer/elements/designer-element/elements/designer-element/designer-element.html
>>> HTTP/1.1" 200 10193
>>> [19/Nov/2014 09:46:44] "GET
>>> /designer/elements/designer-element/elements/designer-element/components/platform/platform.js
>>> HTTP/1.1" 200 10193
>>> [19/Nov/2014 09:46:44] "GET
>>> /designer/elements/designer-element/elements/designer-element/elements/designer-element/designer-element.html
>>> HTTP/1.1" 200 10194
>>>
>>> ...
>>>
>>> it continues until timeout and probably forever until the server runs
>>> out of memory.
>>>
>>> Anyway, I have no idea what this is telling me.
>>>
>>> Any hints as to where the problem is and/or how to fix it?
>>>
>>> Thanks,
>>> Tim
>>>
>>>
>>>
>>>
>>>
>>>
>>> ​
>>>
>>>
>>>
>>> 
>>> Timothy Cook
>>> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
>>> MLHIM http://www.mlhim.org
>>>
>>>  --
>>> 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%2B%3DOU3XdmJmaPmjpGQe0UMXBwk0mhsawbdk3qynxRHwQhW6rsw%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/CAFWa6tK4oru4vu9ZL-OXsfq74rQiiaETuUE5zV4rCR29Udg7ag%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
>
> 
> Timothy Cook
> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
> MLHIM http://ww

Re: Webcomponents in Django

2014-11-19 Thread Timothy W. Cook
What I am looking for is not necessarily an answer, since there is probably
very few people that have tried this.  I am hoping that someone can give me
an idea 'how to troubleshoot' this issue.  How do I break this down into
steps to even see what is happening?  Since platform.js and
designer-element.html are both returning 200 even though the url gets
longer with each recursion; seems strange to me.

Thanks,
Tim


On Wed, Nov 19, 2014 at 11:02 AM, Timothy W. Cook  wrote:

> At the top of the both the main file where designer is called from and at
> the top of designer.html I have:
> {% load staticfiles i18n %}
>
> The call to the designer template is in a list with other calls that work
> fine:
>
> designer
>
> Thanks,
> Tim
>
>
> On Wed, Nov 19, 2014 at 10:54 AM, Avraham Serour 
> wrote:
>
>> looks like the html rendered is making the recursive requests, are you
>> using {% static %} and {% url 'designer' %} ?
>>
>> On Wed, Nov 19, 2014 at 1:53 PM, Timothy W. Cook  wrote:
>>
>>>
>>> I have a Django app that I want to include a UI similar to the Polymer
>>> designer https://www.polymer-project.org/tools/designer/
>>> Source code here:  https://github.com/twcook/TdV-app-designer/tree/tdv
>>>  plus the components installed via bower.
>>>
>>>
>>> I have built this designer as a standalone app and it works great
>>> using  python -m SimpleHTTPServer
>>>
>>> I have the code included in the Django app templates directory, renamed
>>> index.html to designer.html
>>>
>>> I have a url entry:
>>>
>>> url(r'^designer/', (DesignerView.as_view()), name='designer')
>>>
>>> I have a view:
>>>
>>> class DesignerView(TemplateView):
>>> template_name = 'TdV-app-designer/designer.html'
>>>
>>>
>>> and I have tried using the {% verbatim %} {% endverbatim %} tags to wrap
>>> the code (the entire file, just the body, just the >> id="designer"> tags, etc.) all to no success.
>>>
>>> What happens is that the server begins recursively calling the custom
>>> element.
>>>
>>> ​So I get:
>>>
>>> [19/Nov/2014 09:46:41] "GET / HTTP/1.1" 200 12867
>>> [19/Nov/2014 09:46:43] "GET /designer/ HTTP/1.1" 200 10193
>>> [19/Nov/2014 09:46:43] "GET /designer/components/platform/platform.js
>>> HTTP/1.1" 200 10196
>>> [19/Nov/2014 09:46:44] "GET
>>> /designer/elements/designer-element/designer-element.html HTTP/1.1" 200
>>> 10193
>>> [19/Nov/2014 09:46:44] "GET
>>> /designer/elements/designer-element/components/platform/platform.js
>>> HTTP/1.1" 200 10193
>>> [19/Nov/2014 09:46:44] "GET
>>> /designer/elements/designer-element/elements/designer-element/designer-element.html
>>> HTTP/1.1" 200 10193
>>> [19/Nov/2014 09:46:44] "GET
>>> /designer/elements/designer-element/elements/designer-element/components/platform/platform.js
>>> HTTP/1.1" 200 10193
>>> [19/Nov/2014 09:46:44] "GET
>>> /designer/elements/designer-element/elements/designer-element/elements/designer-element/designer-element.html
>>> HTTP/1.1" 200 10194
>>>
>>> ...
>>>
>>> it continues until timeout and probably forever until the server runs
>>> out of memory.
>>>
>>> Anyway, I have no idea what this is telling me.
>>>
>>> Any hints as to where the problem is and/or how to fix it?
>>>
>>> Thanks,
>>> Tim
>>>
>>>
>>>
>>>
>>>
>>>
>>> ​
>>>
>>>
>>>
>>> 
>>> Timothy Cook
>>> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
>>> MLHIM http://www.mlhim.org
>>>
>>>  --
>>> 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%2B%3DOU3XdmJmaPmjpGQe0UMXBwk0mhsawbdk3qynxRHwQhW6rsw%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/CAFWa6tK4oru4vu9ZL-OXsfq74rQiiaETuUE5zV4rCR29Udg7ag%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
>
> ===

Re: Webcomponents in Django

2014-11-19 Thread Timothy W. Cook
On Wed, Nov 19, 2014 at 12:10 PM, Avraham Serour  wrote:

> the line you posted is not a call to any template, it translates to a url
> address given the view name.
>
> the top line means that the staticfiles module is loaded, you need that in
> order to use it in the template below, my question is if you actually use
> it, how do you point to the js file for example?
>
>
​Ah, okay.  The js file is ​called in the header of designer.html


then the designer-element.html is imported:


The code is the same as
https://github.com/twcook/TdV-app-designer/blob/tdv/index.html

except the file is named designer.html vs. index.html

Thanks,
Tim








> On Wed, Nov 19, 2014 at 3:02 PM, Timothy W. Cook  wrote:
>
>> At the top of the both the main file where designer is called from and at
>> the top of designer.html I have:
>> {% load staticfiles i18n %}
>>
>> The call to the designer template is in a list with other calls that work
>> fine:
>>
>> designer
>>
>> Thanks,
>> Tim
>>
>>
>> On Wed, Nov 19, 2014 at 10:54 AM, Avraham Serour 
>> wrote:
>>
>>> looks like the html rendered is making the recursive requests, are you
>>> using {% static %} and {% url 'designer' %} ?
>>>
>>> On Wed, Nov 19, 2014 at 1:53 PM, Timothy W. Cook  wrote:
>>>

 I have a Django app that I want to include a UI similar to the Polymer
 designer https://www.polymer-project.org/tools/designer/
 Source code here:  https://github.com/twcook/TdV-app-designer/tree/tdv
  plus the components installed via bower.


 I have built this designer as a standalone app and it works great
 using  python -m SimpleHTTPServer

 I have the code included in the Django app templates directory, renamed
 index.html to designer.html

 I have a url entry:

 url(r'^designer/', (DesignerView.as_view()), name='designer')

 I have a view:

 class DesignerView(TemplateView):
 template_name = 'TdV-app-designer/designer.html'


 and I have tried using the {% verbatim %} {% endverbatim %} tags to
 wrap the code (the entire file, just the body, just the >>> id="designer"> tags, etc.) all to no success.

 What happens is that the server begins recursively calling the custom
 element.

 ​So I get:

 [19/Nov/2014 09:46:41] "GET / HTTP/1.1" 200 12867
 [19/Nov/2014 09:46:43] "GET /designer/ HTTP/1.1" 200 10193
 [19/Nov/2014 09:46:43] "GET /designer/components/platform/platform.js
 HTTP/1.1" 200 10196
 [19/Nov/2014 09:46:44] "GET
 /designer/elements/designer-element/designer-element.html HTTP/1.1" 200
 10193
 [19/Nov/2014 09:46:44] "GET
 /designer/elements/designer-element/components/platform/platform.js
 HTTP/1.1" 200 10193
 [19/Nov/2014 09:46:44] "GET
 /designer/elements/designer-element/elements/designer-element/designer-element.html
 HTTP/1.1" 200 10193
 [19/Nov/2014 09:46:44] "GET
 /designer/elements/designer-element/elements/designer-element/components/platform/platform.js
 HTTP/1.1" 200 10193
 [19/Nov/2014 09:46:44] "GET
 /designer/elements/designer-element/elements/designer-element/elements/designer-element/designer-element.html
 HTTP/1.1" 200 10194

 ...

 it continues until timeout and probably forever until the server runs
 out of memory.

 Anyway, I have no idea what this is telling me.

 Any hints as to where the problem is and/or how to fix it?

 Thanks,
 Tim






 ​



 
 Timothy Cook
 LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
 MLHIM http://www.mlhim.org

  --
 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%2B%3DOU3XdmJmaPmjpGQe0UMXBwk0mhsawbdk3qynxRHwQhW6rsw%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.co

Re: What on earth is causing this "naive datetime" warning?

2014-11-19 Thread Russell Keith-Magee
Hi Daniel,

A naïve datetime is a datetime that doesn't have a timezone. If you have
USE_TZ=True enabled in your settings file (which is the default for new
projects), Django expects you to fully specify datetime objects with a
timezone; if you don't, you get the warning you've seen, because the
datetime you've provided is ambiguous. Django can guess, but there's no
guarantee that the guess will be correct.

The django.utils.timezone package provides a few utilities to convert naïve
datetimes to timezone-enabled datetimes. I'd also suggest looking into
pytz, which provides a regularly updated database of the world's timezones.

Yours,
Russ Magee %-)

On Wed, Nov 19, 2014 at 8:38 PM, Daniel Grace  wrote:

> Hi,
>
> Here is my model:
> class Flow(models.Model):
> ref = models.CharField(max_length=32)
> state = models.ForeignKey(State)
> flow_type = models.ForeignKey(Type)
> created = models.DateTimeField(db_index=True, auto_now_add=True)
> modified = models.DateTimeField(db_index=True, auto_now=True)
> version = models.IntegerField()
> def __str__(self):
> return str(self.id)
>
> Here is my test.py file:
> import warnings
> warnings.filterwarnings(
> 'error', r"DateTimeField .* received a naive datetime",
> RuntimeWarning, r'django\.db\.models\.fields')
>
>
> In settings.py:
> TIME_ZONE = 'Europe/London'
> USE_TZ = True
>
> Here is what happens when I run the test script:
> >python manage.py test flow
> Creating test database for alias 'default'...
> Traceback (most recent call last):
>   File "manage.py", line 10, in 
> execute_from_command_line(sys.argv)
>   File "C:\landy\lib\site-packages\django\core\management\__init__.py",
> line 385
> , in execute_from_command_line
> utility.execute()
>   File "C:\landy\lib\site-packages\django\core\management\__init__.py",
> line 377
> , in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File
> "C:\landy\lib\site-packages\django\core\management\commands\test.py", lin
> e 50, in run_from_argv
> super(Command, self).run_from_argv(argv)
>   File "C:\landy\lib\site-packages\django\core\management\base.py", line
> 288, in
>  run_from_argv
> self.execute(*args, **options.__dict__)
>   File
> "C:\landy\lib\site-packages\django\core\management\commands\test.py", lin
> e 71, in execute
> super(Command, self).execute(*args, **options)
>   File "C:\landy\lib\site-packages\django\core\management\base.py", line
> 338, in
>  execute
> output = self.handle(*args, **options)
>   File
> "C:\landy\lib\site-packages\django\core\management\commands\test.py", lin
> e 88, in handle
> failures = test_runner.run_tests(test_labels)
>   File "C:\landy\lib\site-packages\django\test\runner.py", line 147, in
> run_test
> s
> old_config = self.setup_databases()
>   File "C:\landy\lib\site-packages\django\test\runner.py", line 109, in
> setup_da
> tabases
> return setup_databases(self.verbosity, self.interactive, **kwargs)
>   File "C:\landy\lib\site-packages\django\test\runner.py", line 299, in
> setup_da
> tabases
> serialize=connection.settings_dict.get("TEST_SERIALIZE", True),
>   File "C:\landy\lib\site-packages\django\db\backends\creation.py", line
> 374, in
>  create_test_db
> test_flush=True,
>   File "C:\landy\lib\site-packages\django\core\management\__init__.py",
> line 115
> , in call_command
> return klass.execute(*args, **defaults)
>   File "C:\landy\lib\site-packages\django\core\management\base.py", line
> 338, in
>  execute
> output = self.handle(*args, **options)
>   File
> "C:\landy\lib\site-packages\django\core\management\commands\migrate.py",
> line 160, in handle
> executor.migrate(targets, plan, fake=options.get("fake", False))
>   File "C:\landy\lib\site-packages\django\db\migrations\executor.py", line
> 63, i
> n migrate
> self.apply_migration(migration, fake=fake)
>   File "C:\landy\lib\site-packages\django\db\migrations\executor.py", line
> 97, i
> n apply_migration
> migration.apply(project_state, schema_editor)
>   File "C:\landy\lib\site-packages\django\db\migrations\migration.py",
> line 107,
>  in apply
> operation.database_forwards(self.app_label, schema_editor,
> project_state, ne
> w_state)
>   File
> "C:\landy\lib\site-packages\django\db\migrations\operations\fields.py", l
> ine 131, in database_forwards
> schema_editor.alter_field(from_model, from_field, to_field)
>   File "C:\landy\lib\site-packages\django\db\backends\schema.py", line
> 509, in a
> lter_field
> self._alter_field(model, old_field, new_field, old_type, new_type,
> old_db_pa
> rams, new_db_params, strict)
>   File "C:\landy\lib\site-packages\django\db\backends\schema.py", line
> 612, in _
> alter_field
> new_default = self.effective_default(new_field)
>   File "C:\landy\lib\site-packages\django\db\backends\schema.py", line
> 183, in e
> ffective_default
> default = field.get_db_prep_save(default, self.connection)
>   File "C:\landy\lib\site-packag

Re: What on earth is causing this "naive datetime" warning?

2014-11-19 Thread Daniel Grace
I have already installed pytz (2014.17) and I have set USE_TZ=True.  I 
don't use any naive datetimes in my application.  This error is caused by 
something that the Django test command is doing automatically, if you look 
at the traceback you will see that it is something to do with migrations. 
 I am using Django 1.7.

-- 
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/091b1229-69c1-47aa-b0ba-ee986922a7c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What on earth is causing this "naive datetime" warning?

2014-11-19 Thread Carl Meyer
Hi Daniel,

On 11/19/2014 08:07 AM, Daniel Grace wrote:
> I have already installed pytz (2014.17) and I have set USE_TZ=True.  I
> don't use any naive datetimes in my application.  This error is caused
> by something that the Django test command is doing automatically, if you
> look at the traceback you will see that it is something to do with
> migrations.  I am using Django 1.7.

What is the default value for your Flow.created field?

Carl



signature.asc
Description: OpenPGP digital signature


Re: Warning / Error when testing with W flag

2014-11-19 Thread Carl Meyer
Hi Daniel,

On 11/18/2014 02:01 AM, Daniel Grace wrote:
> Hi,
> I get another warning / error with a test command as follows:
>>python -W error manage.py test flow
> Traceback (most recent call last):
>   File "manage.py", line 8, in 
> from django.core.management import execute_from_command_line
>   File "C:\landy\lib\site-packages\django\core\management\__init__.py",
> line 8,
> in 
> from django.apps import apps
>   File "C:\landy\lib\site-packages\django\apps\__init__.py", line 1, in
> 
> 
> from .config import AppConfig   # NOQA
>   File "C:\landy\lib\site-packages\django\apps\config.py", line 5, in
> 
> from django.utils.module_loading import module_has_submodule
>   File "C:\landy\lib\site-packages\django\utils\module_loading.py", line
> 4, in <
> module>
> import imp
>   File "C:\Python34\lib\imp.py", line 32, in 
> PendingDeprecationWarning)
> PendingDeprecationWarning: the imp module is deprecated in favour of
> importlib;
> see the module's documentation for alternative uses

This is an issue that needs to be fixed in Django; see
https://code.djangoproject.com/ticket/21628

Until it is fixed in Django, I'm afraid there's not much you can do
about it other than ignore these warnings for now.

Carl



signature.asc
Description: OpenPGP digital signature


Re: What on earth is causing this "naive datetime" warning?

2014-11-19 Thread Daniel Grace
On Wednesday, 19 November 2014 15:11:27 UTC, Carl Meyer wrote:
>
> Hi Daniel, 
>
> On 11/19/2014 08:07 AM, Daniel Grace wrote: 
> > I have already installed pytz (2014.17) and I have set USE_TZ=True.  I 
> > don't use any naive datetimes in my application.  This error is caused 
> > by something that the Django test command is doing automatically, if you 
> > look at the traceback you will see that it is something to do with 
> > migrations.  I am using Django 1.7. 
>
> What is the default value for your Flow.created field? 
>
> Carl 
>
>
Hi Carl,
I was not specifying one, so I changed my model and did a "makemigrations" 
and a "syncdb" :

class Flow(models.Model):
ref = models.CharField(max_length=32)
state = models.ForeignKey(State)
flow_type = models.ForeignKey(Type)
created = models.DateTimeField(db_index=True, auto_now_add=True, 
default=timezone.now)
modified = models.DateTimeField(db_index=True, auto_now=True, 
default=timezone.now)
version = models.IntegerField()

But I still get the exact same warning (see my original message in this 
thread) !

-- 
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/99783c9d-fe30-44cf-b407-53ad804e3ecb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Webcomponents in Django

2014-11-19 Thread Timothy W. Cook
Maybe I bit off too much to start.  IT looks like this may be a better
place to start.
http://themikelewis.com/2014/10/01/django-and-polymer-the-basics-and-vulcanizing/


... and not running the Django development server.


On Wed, Nov 19, 2014 at 12:18 PM, Timothy W. Cook  wrote:

>
> On Wed, Nov 19, 2014 at 12:10 PM, Avraham Serour 
> wrote:
>
>> the line you posted is not a call to any template, it translates to a url
>> address given the view name.
>>
>> the top line means that the staticfiles module is loaded, you need that
>> in order to use it in the template below, my question is if you actually
>> use it, how do you point to the js file for example?
>>
>>
> ​Ah, okay.  The js file is ​called in the header of designer.html
> 
>
> then the designer-element.html is imported:
> 
>
> The code is the same as
> https://github.com/twcook/TdV-app-designer/blob/tdv/index.html
>
> except the file is named designer.html vs. index.html
>
> Thanks,
> Tim
>
>
>
>
>
>
>
>
>> On Wed, Nov 19, 2014 at 3:02 PM, Timothy W. Cook  wrote:
>>
>>> At the top of the both the main file where designer is called from and
>>> at the top of designer.html I have:
>>> {% load staticfiles i18n %}
>>>
>>> The call to the designer template is in a list with other calls that
>>> work fine:
>>>
>>> designer
>>>
>>> Thanks,
>>> Tim
>>>
>>>
>>> On Wed, Nov 19, 2014 at 10:54 AM, Avraham Serour 
>>> wrote:
>>>
 looks like the html rendered is making the recursive requests, are you
 using {% static %} and {% url 'designer' %} ?

 On Wed, Nov 19, 2014 at 1:53 PM, Timothy W. Cook  wrote:

>
> I have a Django app that I want to include a UI similar to the Polymer
> designer https://www.polymer-project.org/tools/designer/
> Source code here:  https://github.com/twcook/TdV-app-designer/tree/tdv
>  plus the components installed via bower.
>
>
> I have built this designer as a standalone app and it works great
> using  python -m SimpleHTTPServer
>
> I have the code included in the Django app templates directory,
> renamed index.html to designer.html
>
> I have a url entry:
>
> url(r'^designer/', (DesignerView.as_view()), name='designer')
>
> I have a view:
>
> class DesignerView(TemplateView):
> template_name = 'TdV-app-designer/designer.html'
>
>
> and I have tried using the {% verbatim %} {% endverbatim %} tags to
> wrap the code (the entire file, just the body, just the  id="designer"> tags, etc.) all to no success.
>
> What happens is that the server begins recursively calling the custom
> element.
>
> ​So I get:
>
> [19/Nov/2014 09:46:41] "GET / HTTP/1.1" 200 12867
> [19/Nov/2014 09:46:43] "GET /designer/ HTTP/1.1" 200 10193
> [19/Nov/2014 09:46:43] "GET /designer/components/platform/platform.js
> HTTP/1.1" 200 10196
> [19/Nov/2014 09:46:44] "GET
> /designer/elements/designer-element/designer-element.html HTTP/1.1" 200
> 10193
> [19/Nov/2014 09:46:44] "GET
> /designer/elements/designer-element/components/platform/platform.js
> HTTP/1.1" 200 10193
> [19/Nov/2014 09:46:44] "GET
> /designer/elements/designer-element/elements/designer-element/designer-element.html
> HTTP/1.1" 200 10193
> [19/Nov/2014 09:46:44] "GET
> /designer/elements/designer-element/elements/designer-element/components/platform/platform.js
> HTTP/1.1" 200 10193
> [19/Nov/2014 09:46:44] "GET
> /designer/elements/designer-element/elements/designer-element/elements/designer-element/designer-element.html
> HTTP/1.1" 200 10194
>
> ...
>
> it continues until timeout and probably forever until the server runs
> out of memory.
>
> Anyway, I have no idea what this is telling me.
>
> Any hints as to where the problem is and/or how to fix it?
>
> Thanks,
> Tim
>
>
>
>
>
>
> ​
>
>
>
> 
> Timothy Cook
> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
> MLHIM http://www.mlhim.org
>
>  --
> 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%2B%3DOU3XdmJmaPmjpGQe0UMXBwk0mhsawbdk3qynxRHwQhW6rsw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

  --
 You

Re: What on earth is causing this "naive datetime" warning?

2014-11-19 Thread Carl Meyer
Hi Daniel,

On 11/19/2014 08:58 AM, Daniel Grace wrote:
> On Wednesday, 19 November 2014 15:11:27 UTC, Carl Meyer wrote:
> On 11/19/2014 08:07 AM, Daniel Grace wrote:
> > I have already installed pytz (2014.17) and I have set
> USE_TZ=True.  I
> > don't use any naive datetimes in my application.  This error is
> caused
> > by something that the Django test command is doing automatically,
> if you
> > look at the traceback you will see that it is something to do with
> > migrations.  I am using Django 1.7.
> 
> What is the default value for your Flow.created field?
> 
> Hi Carl,
> I was not specifying one, so I changed my model and did a
> "makemigrations" and a "syncdb" :

"syncdb" is a deprecated alias for "migrate" - may as well start getting
used to doing "migrate" instead.

> class Flow(models.Model):
> ref = models.CharField(max_length=32)
> state = models.ForeignKey(State)
> flow_type = models.ForeignKey(Type)
> created = models.DateTimeField(db_index=True, auto_now_add=True,
> default=timezone.now)
> modified = models.DateTimeField(db_index=True, auto_now=True,
> default=timezone.now)
> version = models.IntegerField()
> 
> But I still get the exact same warning (see my original message in this
> thread) !

If you have `auto_now_add=True`, then you don't actually want a default
(it won't have any effect).

But based on your traceback, it seems like at some point in the past
when you made a migration, the field might have had a default value
which was a naive datetime. Is that possible?

It might be necessary to look through your existing migrations for this
app to find the culprit.

Carl



signature.asc
Description: OpenPGP digital signature


Re: Webcomponents in Django

2014-11-19 Thread Timothy W. Cook
Progress:  I moved the Polymer code tree to my static directory and
replaced the URL with

designer

This at least lets me load the designer.

Now on to see if I can build ajax calls to class based views or maybe there
is another way?



Cheers,
Tim


On Wed, Nov 19, 2014 at 1:59 PM, Timothy W. Cook  wrote:

> Maybe I bit off too much to start.  IT looks like this may be a better
> place to start.
>
> http://themikelewis.com/2014/10/01/django-and-polymer-the-basics-and-vulcanizing/
>
>
> ... and not running the Django development server.
>
>
> On Wed, Nov 19, 2014 at 12:18 PM, Timothy W. Cook  wrote:
>
>>
>> On Wed, Nov 19, 2014 at 12:10 PM, Avraham Serour 
>> wrote:
>>
>>> the line you posted is not a call to any template, it translates to a
>>> url address given the view name.
>>>
>>> the top line means that the staticfiles module is loaded, you need that
>>> in order to use it in the template below, my question is if you actually
>>> use it, how do you point to the js file for example?
>>>
>>>
>> ​Ah, okay.  The js file is ​called in the header of designer.html
>> 
>>
>> then the designer-element.html is imported:
>> > href="elements/designer-element/designer-element.html">
>>
>> The code is the same as
>> https://github.com/twcook/TdV-app-designer/blob/tdv/index.html
>>
>> except the file is named designer.html vs. index.html
>>
>> Thanks,
>> Tim
>>
>>
>>
>>
>>
>>
>>
>>
>>> On Wed, Nov 19, 2014 at 3:02 PM, Timothy W. Cook  wrote:
>>>
 At the top of the both the main file where designer is called from and
 at the top of designer.html I have:
 {% load staticfiles i18n %}

 The call to the designer template is in a list with other calls that
 work fine:

 designer

 Thanks,
 Tim


 On Wed, Nov 19, 2014 at 10:54 AM, Avraham Serour 
 wrote:

> looks like the html rendered is making the recursive requests, are you
> using {% static %} and {% url 'designer' %} ?
>
> On Wed, Nov 19, 2014 at 1:53 PM, Timothy W. Cook 
> wrote:
>
>>
>> I have a Django app that I want to include a UI similar to the
>> Polymer designer https://www.polymer-project.org/tools/designer/
>> Source code here:
>> https://github.com/twcook/TdV-app-designer/tree/tdv  plus the
>> components installed via bower.
>>
>>
>> I have built this designer as a standalone app and it works great
>> using  python -m SimpleHTTPServer
>>
>> I have the code included in the Django app templates directory,
>> renamed index.html to designer.html
>>
>> I have a url entry:
>>
>> url(r'^designer/', (DesignerView.as_view()), name='designer')
>>
>> I have a view:
>>
>> class DesignerView(TemplateView):
>> template_name = 'TdV-app-designer/designer.html'
>>
>>
>> and I have tried using the {% verbatim %} {% endverbatim %} tags to
>> wrap the code (the entire file, just the body, just the > id="designer"> tags, etc.) all to no success.
>>
>> What happens is that the server begins recursively calling the custom
>> element.
>>
>> ​So I get:
>>
>> [19/Nov/2014 09:46:41] "GET / HTTP/1.1" 200 12867
>> [19/Nov/2014 09:46:43] "GET /designer/ HTTP/1.1" 200 10193
>> [19/Nov/2014 09:46:43] "GET /designer/components/platform/platform.js
>> HTTP/1.1" 200 10196
>> [19/Nov/2014 09:46:44] "GET
>> /designer/elements/designer-element/designer-element.html HTTP/1.1" 200
>> 10193
>> [19/Nov/2014 09:46:44] "GET
>> /designer/elements/designer-element/components/platform/platform.js
>> HTTP/1.1" 200 10193
>> [19/Nov/2014 09:46:44] "GET
>> /designer/elements/designer-element/elements/designer-element/designer-element.html
>> HTTP/1.1" 200 10193
>> [19/Nov/2014 09:46:44] "GET
>> /designer/elements/designer-element/elements/designer-element/components/platform/platform.js
>> HTTP/1.1" 200 10193
>> [19/Nov/2014 09:46:44] "GET
>> /designer/elements/designer-element/elements/designer-element/elements/designer-element/designer-element.html
>> HTTP/1.1" 200 10194
>>
>> ...
>>
>> it continues until timeout and probably forever until the server runs
>> out of memory.
>>
>> Anyway, I have no idea what this is telling me.
>>
>> Any hints as to where the problem is and/or how to fix it?
>>
>> Thanks,
>> Tim
>>
>>
>>
>>
>>
>>
>> ​
>>
>>
>>
>> 
>> Timothy Cook
>> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
>> MLHIM http://www.mlhim.org
>>
>>  --
>> 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 djan

Re: What on earth is causing this "naive datetime" warning?

2014-11-19 Thread Daniel Grace

>
>
> But based on your traceback, it seems like at some point in the past 
> when you made a migration, the field might have had a default value 
> which was a naive datetime. Is that possible? 
>
> It might be necessary to look through your existing migrations for this 
> app to find the culprit. 
>
>
Yes Carl you were right, I cleared out my migrations folder except for the 
"__init__.py" file and the problem went away. 

-- 
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/c5bf130d-4715-4bf1-ba8a-5267f983ec7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Deploying Django project

2014-11-19 Thread Daniel Roseman
On Wednesday, 19 November 2014 10:22:25 UTC, termopro wrote:
>
> I have created a Django 1.7 project and would like to deploy it. I am 
> reading about how to do it right and i have some questions.
>
> If i understand correctly deployment should contain the following steps:
>
> 1) Initial remote machine set up:
>
>- a) install os / server / database / cache ...
>- b) install Django and required modules
>- c) update database with real data
>
> 2) Upload code/ database changes to remote machine:
>
>- a) upload changed Django project
>- b) upload changes in Database tables (model migrations)
>
> Most tutorials/articles about deployment do not cover 1.c and 2.b. Also 
> the tasks 1.b. and 2.a. are solved using revision control tools 
> (Git/Mercurial)
>
> So i'd like to know:
>
>- 
>
>1) How do i install Django project or it's updates without revision 
>control tools ? Should i simply upload my project using FTP/SSH ? Is there 
>a good way to automate it ?
>- 
>
>2) How do i automate the task of uploading required database changes 
>(like model migrations) ?
>
>
Why would you do 1 without version control tools? You do it *with* version 
control tools, that's part of the point of them.

For 2, you're making a strange distinction. Model migrations are part of 
your code, and are deployed along with it; you simply need to run them when 
the project is deployed.
--
DR. 

-- 
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/fc3fedd9-b788-4760-8f07-ce3d06a2a55d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Deploying Django project

2014-11-19 Thread termopro
Thank you for your reply Daniel.



On Wednesday, November 19, 2014 9:07:31 PM UTC+2, Daniel Roseman wrote:
>
> On Wednesday, 19 November 2014 10:22:25 UTC, termopro wrote:
>>
>> I have created a Django 1.7 project and would like to deploy it. I am 
>> reading about how to do it right and i have some questions.
>>
>> If i understand correctly deployment should contain the following steps:
>>
>> 1) Initial remote machine set up:
>>
>>- a) install os / server / database / cache ...
>>- b) install Django and required modules
>>- c) update database with real data
>>
>> 2) Upload code/ database changes to remote machine:
>>
>>- a) upload changed Django project
>>- b) upload changes in Database tables (model migrations)
>>
>> Most tutorials/articles about deployment do not cover 1.c and 2.b. Also 
>> the tasks 1.b. and 2.a. are solved using revision control tools 
>> (Git/Mercurial)
>>
>> So i'd like to know:
>>
>>- 
>>
>>1) How do i install Django project or it's updates without revision 
>>control tools ? Should i simply upload my project using FTP/SSH ? Is 
>> there 
>>a good way to automate it ?
>>- 
>>
>>2) How do i automate the task of uploading required database changes 
>>(like model migrations) ?
>>
>>
> Why would you do 1 without version control tools? You do it *with* version 
> control tools, that's part of the point of them.
>
> For 2, you're making a strange distinction. Model migrations are part of 
> your code, and are deployed along with it; you simply need to run them when 
> the project is deployed.
> --
> DR. 
>

-- 
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/f3ef0692-075b-4ea3-934c-e366904d40cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError: cannot import name 'GEOSException'

2014-11-19 Thread Carl Meyer
Hello,

On 11/18/2014 09:53 AM, jogaserbia wrote:
> I just realized something.  
> 
>  
> This are all the files in django.contrib.gis.geos:
>  
> Notice there is no GEOSException, nor is there GEOSGeometry.   There is
> however geometry.py (which as the class GEOSGeometry in it) and error.py
> (which has the class GEOSException in it). 
>  
> I am not sure what to do with this information as I am new to
> Python/Django.

Sorry, this error message is obscure. I have filed a ticket to improve
it: https://code.djangoproject.com/ticket/23873

The cause of the error message is that you do not have an installation
of GEOS that is on your `sys.path` and importable. (That is, something
in
https://docs.djangoproject.com/en/1.7/ref/contrib/gis/install/#osgeo4w
or the following step didn't work correctly.)

If you look in django/contrib/gis/geos/__init__.py, you'll see that
GEOSException is only imported there if HAS_GEOS is True. That is why
importing GEOSException from django.contrib.gis.geos will succeed if you
have GEOS installed, but fails otherwise.

Carl

-- 
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/546D0E22.6070806%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: ImportError: cannot import name 'GEOSException'

2014-11-19 Thread jogaserbia
Hi Carl,

Thanks very much for the response.  

I am trying to get GeoDjango up and running (for a couple of days now) and 
am having a really hard time.  

I came across another question on the internet (that does not specifically 
have to do with my issue) that suggested putting this path variable into 
the project setting (today):

GEOS_LIBRARY_PATH = r'C:\Program Files\OSGeo4W64\bin\geos_c.dll'

Sadly, I do not know why this would work to rectify the initial problem. 

I think it gets past the GEOSException error, but another error is coming 
up:

*OSError: [WinError 126] The specified module could not be found*

Since I am new to all of these particular technologies (Django, Python, 
GeoDjango) I do not know where to begin troubleshooting these.  I am not 
even clear on how to read the below traceback (i.e. where the block of code 
are delineated.  I am assuming each time I see *File*, that is a new code 
block that is being run).  

Ivan 


  File 
"C:\Python34\lib\site-packages\django\contrib\gis\forms\__init__.py", lin
e 2, in 
from .fields import (GeometryField, GeometryCollectionField, 
PointField,  #
NOQA
  File "C:\Python34\lib\site-packages\django\contrib\gis\forms\fields.py", 
line
8, in 
from django.contrib.gis.geos import GEOSException, GEOSGeometry
  File "C:\Python34\lib\site-packages\django\contrib\gis\geos\__init__.py", 
line
 9, in 
from .libgeos import geos_version, geos_version_info  # NOQA: flake8 
detects
 only the last __all__
  File "C:\Python34\lib\site-packages\django\contrib\gis\geos\libgeos.py", 
line
61, in 
lgeos = CDLL(lib_path)
  File "C:\Python34\lib\ctypes\__init__.py", line 351, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found

-- 
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/0fa27af4-f7d9-43d9-a522-881d228d9769%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImportError: cannot import name 'GEOSException'

2014-11-19 Thread Carl Meyer
Hi Ivan,

On 11/19/2014 02:58 PM, jogaserbia wrote:
> Hi Carl,
> 
> Thanks very much for the response.  
> 
> I am trying to get GeoDjango up and running (for a couple of days now)
> and am having a really hard time.  

Sorry about that :/ I know the dependencies for GeoDjango can be hard to
set up in general, and it may well be worse on Windows (at the very
least, I'm sure the process is less well-tested, since I think most
users and developers of GeoDjango use OS X or Linux). Unfortunately
since I'm not an expert on GeoDjango, and I know even less about
Windows, I'm not sure I'll be able to help.

> I came across another question on the internet (that does not
> specifically have to do with my issue) that suggested putting this path
> variable into the project setting (today):
> 
> GEOS_LIBRARY_PATH = r'C:\Program Files\OSGeo4W64\bin\geos_c.dll'
> 
> Sadly, I do not know why this would work to rectify the initial problem. 
> 
> I think it gets past the GEOSException error, but another error is
> coming up:
> 
> *OSError: [WinError 126] The specified module could not be found*

This error is still related to being unable to load the GEOS libraries -
but that's about all I can tell you.

> Since I am new to all of these particular technologies (Django, Python,
> GeoDjango) I do not know where to begin troubleshooting these.  I am not
> even clear on how to read the below traceback (i.e. where the block of
> code are delineated.  I am assuming each time I see *File*, that is a
> new code block that is being run).  

Yes, each "File ..." line represents a stack frame.

Carl

-- 
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/546D1551.3030004%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: ImportError: cannot import name 'GEOSException'

2014-11-19 Thread jogaserbia
Thanks for the help Carl.  Also, thanks for filing the ticket. 

Every bit of info helps.  I really do like Python and Django so far.  

I am just wondering whether I should just quit trying to make GeoDjango 
work on my windows machine (at work).  I will be setting up a linux machine 
at home in the next couple of months, and can try it out again.  

As a workaround, what I could probably do (if I can figure it out) is call 
the postgres fuctions for distance between Lon Lat points that will serve 
as the basis for the application that I am building.  

What I am in effect trying to do in the Django app I am building is:

find the closets 3 locations (from a list of locations in a postgres 
database) to the address location that will be passed via input box (and 
might be run through a Google to get the Lon Lat info).  

Thanks again, 

Ivan

-- 
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/f6da3ce0-88a0-436d-b6ea-6fb6c3f8505c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Advice needed: Adaptive/Responsive Images in Django?

2014-11-19 Thread ThomasTheDjangoFan
Hi guys,

do you have a tip for implementing adaptive (responsive) images in django?

Basically I want to server smaller images to mobile-users and bigger images 
to desktop users.
I don't really now about best practices for SEO and Siteload-Performance.

Are there any apps that you can recon for this?

Thanks a lot for your tips!

Kind regards
Thomas

-- 
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/71b23537-2264-4f44-9d67-841c6276f10b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.