HI,
I'm trying to migrate an application from *Django1.8.5/Python2.7* to *Django
1.10/Python3.6* and having problems with code below:
def clean_password(self):
username = self.cleaned_data.get('username')
password = self.cleaned_data.get('password')
On Mon, Mar 12, 2018 at 5:44 PM, Craig de Stigter <
craig.destig...@koordinates.com> wrote:
> Thanks for the reply.
>
> So I guess there are actually now two types of templates, and they have
> incompatible API. Neither is deprecated.
>
> Has this confused anyone else? Is this a desirable/necessar
On 13/03/2018 4:55 PM, Craig de Stigter wrote:
Cheers Mike
That deprecation notice says to me that Context itself is not
deprecated, but the `current_app` argument is. I don't think that's a
problem for us as I don't think we've ever used it.
Perhaps I can clarify. As far as I can tell, acco
Cheers Mike
That deprecation notice says to me that Context itself is not deprecated,
but the `current_app` argument is. I don't think that's a problem for us as
I don't think we've ever used it.
Perhaps I can clarify. As far as I can tell, according to the errors and
deprecation warnings I'm rec
On 13/03/2018 11:44 AM, Craig de Stigter wrote:
Thanks for the reply.
So I guess there are actually now two types of templates, and they
have incompatible API. Neither is deprecated.
Craig
I don't think your guess is correct. Or at least I'm missing something
if it is!
I remember bringing
Thanks for the reply.
So I guess there are actually now two types of templates, and they have
incompatible API. Neither is deprecated.
Has this confused anyone else? Is this a desirable/necessary situation?
I think in order to have consistent template usage in our project we really
need to jus
On Sunday, 11 March 2018 21:06:51 UTC, Craig de Stigter wrote:
>
> Hi folks
>
> I'm upgrading a large app from 1.8 to 1.11 and coming up against this as I
> traverse through django 1.9:
>
> >>> from django.template import engines, Context
> ... t = engines['django'].from_string('')
> ... t.render(
Hi folks
I'm upgrading a large app from 1.8 to 1.11 and coming up against this as I
traverse through django 1.9:
>>> from django.template import engines, Context
... t = engines['django'].from_string('')
... t.render(Context({}))
...
/path/to/bin/django-admin.py:3: RemovedInDjango110Warning: rend
length=255L, blank=True)
>
>
> class Book(models.Model):
> author = models.ForeignKey(Author)
>
>
> I want to do:
>
>
> author = Author('Robert Frost')
>
> book = Book(author)
>
> book.save()
>
> Can this be done in Django 1.10 ?
>
&g
Model):
name = models.CharField(max_length=255L, blank=True)
class Book(models.Model):
author = models.ForeignKey(Author)
I want to do:
author = Author('Robert Frost')
book = Book(author)
book.save()
Can this be done in Django 1.10 ?
Regards,
Priyanka
--
You receiv
Hi,
Unless you have applied ordering, either in model Meta, or in your query
clause, results are really "in no particular order". Most of the
databases do return results in order the data is read from the disk, but
that's not quaranteed.
If you require ordering, add .order_by() to your query
Hi,
if you don't specifically ask for the query results to be sorted, their order
will be undefined. Differences in your Django version or the RDBMS version or
the OS or the environment or anything may result in a different sort order. If
you want the query to be sorted, you must either use the or
Hi,
As part of migration to Django 1.10.4 from 1.7, I have noticed that
queryset results are unsorted, compared to previous version.
Has same behaviour been observed by anyone?
Regards,
Priyanka
--
You received this message because you are subscribed to the Google Groups
"Django users" grou
El 03/06/17 a les 16:27, Simon Charette ha escrit:
Hello Alexis,
As you've noticed Django 1.8 changed values()/values_list() to
converts values returned
from the database just like any other ORM method[0].
If you want to use the json module to serialize your horari.Horari
instances you'll ha
2017 08:44:07 UTC-4, Alexis Roda a écrit :
>
> Hi,
>
> I have a custom ModelField (HorariField, a simple weekly timetable)
> written for django 1.7 and I'm trying to upgrade it to work with django
> 1.10, so I have removed the SubfieldBase metaclass and added the
>
Hi,
I have a custom ModelField (HorariField, a simple weekly timetable)
written for django 1.7 and I'm trying to upgrade it to work with django
1.10, so I have removed the SubfieldBase metaclass and added the
from_db_value method. The field inherits from CharField and stores
Horari inst
03:18 PM UTC-4, Robert Rollins wrote:
>
> I've got code that expects Form.changed_data to include the Groups to
> which a User belongs when the User edit form I wrote changes them. It works
> in Django 1.9.13, but tests fails in Django 1.10.
>
> Is there a known change to
I've got code that expects Form.changed_data to include the Groups to which
a User belongs when the User edit form I wrote changes them. It works in
Django 1.9.13, but tests fails in Django 1.10.
Is there a known change to Django that would cause this? I don't see any
Found the problem, a old wrongly set DJANGO_SETTINGS_MODULE pointing to the
offending module.
On 30 January 2017 at 22:49, Alan wrote:
> So I installed django 1.10 and then when I try to do this;
>
> python3.5 -m django --version
>
> Traceback (most recent call last):
&g
So I installed django 1.10 and then when I try to do this;
python3.5 -m django --version
Traceback (most recent call last):
File "/sw/lib/python3.5/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/sw/lib/python3.5/runpy.py", line
I do not think that
"Each view is responsible for doing one of two things: Returning an
> HttpResponse object containing the content for the requested page, or
> raising an exception such as Http404. The rest is up to you."
>
is easy for a beginner to understand. Also the tutorial directly ask
> A quick one is e.g. that there is no explanation of what a view is and what
>
> its purpose is.
"The code above maps URLs, as simple regular expressions, to the
location of Python callback functions (“views”)"
"Each view is responsible for doing one of two things: Returning an
HttpResponse obje
If I could I would gladly rewrite the tutorial. But sadly I do not have
enough time to do so.
However I think it is bad since it not only completely disregards the zen
of py but also its own principles (DRY etc.) If you need concrete examples
I can name you tons.
A quick one is e.g. that there
https://github.com/django/django/pulls
The tutorial has a very logical order, going from the database abstraction up
to the
template layer and beyond. But feel free to rewrite it and submit it to the
project.
I never follow tutorials to the letter - for example back when I did it in
Django 1.
What do you mean by PR?
Am Freitag, 27. Januar 2017 18:32:23 UTC+1 schrieb Melvyn Sopacua:
>
> On Monday 16 January 2017 07:49:00 'Peter Müller' via Django users wrote:
>
>
>
> > Also I used the tutorial just that I abstracted the concept since I
>
> > think the tutorial is more than bad.
>
>
On Monday 16 January 2017 07:49:00 'Peter Müller' via
Django users wrote:
> Also I used the tutorial just that I abstracted the
concept since I
> think the tutorial is more than bad.
Awaiting your PRs.
--
Melvyn Sopacua
--
You received this message because you are subscribed to the Google Gr
But if I do a direct import via python's import statement. it will execute
the content of the file before loading apps and that raises that error.
No matter what you import you *have* to use django's import system. Also it
just works fine now.
Am Dienstag, 17. Januar 2017 23:05:10 UTC+1 schrieb
The only "custom include" in Django is for loading other url files
The rest of the imports are typical Python module / packages
On 1/17/17, 'Peter Müller' via Django users
wrote:
> Ah I now see the problem. However I tried to remove the entry in the
> __init__.py file
> Python is then unable to
Ah I now see the problem. However I tried to remove the entry in the
__init__.py file
Python is then unable to find *any *module in that directory. Don't ask me
why that is.
Also I noticed that django has its completely own import ecosystem.
So I used django.conf.urls.include to include a new ur
On Mon, Jan 16, 2017 at 12:23:09PM -0800, 'Peter Müller' via Django users wrote:
> Am Montag, 16. Januar 2017 21:20:53 UTC+1 schrieb Daniel Roseman:
> > The traceback shows that you are importing your views module in the
> > __init__.py of your app. Don't do that.
>
> Well else python doesn't fi
e views file.
>
>
>
> *From:* 'Peter Müller' via Django users [mailto:django...@googlegroups.com
> ]
> *Sent:* Monday, January 16, 2017 2:23 PM
> *To:* Django users
> *Subject:* Re: Am I stupid or is there an essential error in Django 1.10
> Docs?
>
>
>
>
.com]
Sent: Monday, January 16, 2017 2:23 PM
To: Django users
Subject: Re: Am I stupid or is there an essential error in Django 1.10 Docs?
Well else python doesn't find the view.py file?
Am Montag, 16. Januar 2017 21:20:53 UTC+1 schrieb Daniel Roseman:
On Monday, 16 January 2017 15:53:56 UTC, Pet
Stranvr ist the project made with startproject and db_testing is an app
made with startapp.
So:
ProjectRoot
-StranvrProject
--urls.py
--settings.py
--wsgi.py
-db_testing
--views.py
--__init__.py
--models.py
--admin.py
--apps.py
also the app is added to settings.py
Am Montag, 16. Januar 2017 22
What does the project structure look like?
Is Stranvr the name of the project?
It looks to me like you haven't created an app - or have you called your
app "db_testing" and the project "Stranvr"?
Because you first have to create you project with "django-admin.py
startproject " and then within th
Well else python doesn't find the view.py file?
Am Montag, 16. Januar 2017 21:20:53 UTC+1 schrieb Daniel Roseman:
>
> On Monday, 16 January 2017 15:53:56 UTC, Peter Müller wrote:
>>
>> For the traceback: http://pastebin.com/Wy7And6M
>> And the views configuration: http://pastebin.com/q0V3bQay
>>
>
On Monday, 16 January 2017 15:53:56 UTC, Peter Müller wrote:
>
> For the traceback: http://pastebin.com/Wy7And6M
> And the views configuration: http://pastebin.com/q0V3bQay
>
>
> thanks
>
> Peter
>
The traceback shows that you are importing your views module in the
__init__.py of your app. Don't
y.
>>
>>
>> I just began learning how to use django. So I wanted to include data from
>> the database in a testwebsite.
>> Therefore I made a new app and created a model called "user" and a view
>> that should fill a template with data from that model.
cts before tackling a major one so just going with the standard
> User model should be no impediment in the early stages. Then maybe look
> through the docs to see how to customise/replace that User model.
>
> Cheers
>
> Mike
>
> > a view that should fill a template
nd a view
> that should fill a template with data from that model.
> To do this (according to Django 1.10 Docs/Tutorial) I need to import the
> model class into the view file and for example use models.user.all().
> However on import of the view Django complains about
> django.core.exce
ew that should fill a template with data from that model.
To do this (according to Django 1.10 Docs/Tutorial) I need to import
the model class into the view file and for example use models.user.all().
However on import of the view Django complains about
|
django.core.exceptions.AppRegistryNotReady:Ap
Hello everybody.
I just began learning how to use django. So I wanted to include data from
the database in a testwebsite.
Therefore I made a new app and created a model called "user" and a view
that should fill a template with data from that model.
To do this (according to Django
Thank you very much Simone and Michal for your timely response. I made all
the fields those are part of primary keys as unique and added a dummy
auto-increment ID for these tables and did migrations.
So far so good.
Thanks,
Ramesh.
On Tuesday, January 3, 2017 at 5:35:07 PM UTC+5:30, ramesh wro
On Tue, Jan 03, 2017 at 01:56:00PM +0100, Simone Federici wrote:
> Hi,
>
> from compositekey import db
>
> On my compositekey project the development is stopped on 1.5 django release.
> https://github.com/simone/django-compositekey
>
> The Django 1.6 release, with an huge ORM refactoring and a h
Hi,
from compositekey import db
On my compositekey project the development is stopped on 1.5 django release.
https://github.com/simone/django-compositekey
The Django 1.6 release, with an huge ORM refactoring and a huge testing
refactoring, let my work hard to maintains. What I understand after t
Hi,
Below is the model generated for one of the table from the legacy database
using "inspectdb"
class Test(models.Model):
field1 = models.AutoField(db_column='Field1') # Field name made
lowercase.
field2 = models.ForeignKey('Field2', models.DO_NOTHING,
db_column='Field2') # Field n
On Thursday 03 November 2016 12:11:29 Luc Jean wrote:
> (SSL error: called a function you should not call)
> It seems to occur while querying the database.
>
> # django/db/backends/utils.py line 64
> return self.cursor.execute(sql, params)
This would only make sense if you use SSL to connect to
Hello,
I have a Python 3.5/Django 1.10 app served by Apache/mod_wsgi over SSL. It is
connected to a Postgres 9.5.2 database (with psycopg2==2.6.2) and is running on
a server at AlwaysData
It works fine most of time but I have sometimes an error that I don't
understand.
(SSL error: cal
Try bisecting to find the commit in Django where the behavior changed:
https://docs.djangoproject.com/en/dev/internals/contributing/triaging-tickets/#bisecting-a-regression
On Saturday, October 29, 2016 at 9:57:53 AM UTC-4, in...@lucasvandijk.nl
wrote:
>
> Hi all,
>
> I have a simple model which
Hi all,
I have a simple model whichs acts as custom many-to-many association table
with additional data.
```
class NetworkLinkAssociation(models.Model):
"""
We use our own many-to-many association table, because we want to keep
track which links are added, and which links are deleted
o 1.9.9:
> SELECT (left(start, 10)) AS `day`, SUM((UNIX_TIMESTAMP(`TaskLog`.`stop`) -
> UNIX_TIMESTAMP(`TaskLog`.`start`))) AS `sum` FROM `TaskLog` WHERE
> (`TaskLog`.`user_id` = 22) GROUP BY UNIX_TIMESTAMP(`TaskLog`.`stop`),
> UNIX_TIMESTAMP(`TaskLog`.`start`), (left(start, 10)) ORDER BY NULL
&
RE
(`TaskLog`.`user_id` = 22) GROUP BY UNIX_TIMESTAMP(`TaskLog`.`stop`),
UNIX_TIMESTAMP(`TaskLog`.`start`), (left(start, 10)) ORDER BY NULL
Django 1.10:
SELECT (left(start, 10)) AS `day`, SUM(TIMESTAMPDIFF(MICROSECOND,
UNIX_TIMESTAMP(`TaskLog`.`start`), UNIX_TIMESTAMP(`TaskLog`.`stop`))) AS
`sum
}
>
>
> (The script don't work as is but should give the general idea)
> This way, the user see instantly the effect of their change but your
> application only work with safe value.
>
> I hope I didn't go too far off-path and that will be useful to you :)
is way, the user see instantly the effect of their change but your
application only work with safe value.
I hope I didn't go too far off-path and that will be useful to you :)
2016-08-13 22:12 GMT+02:00 Paul Kudla :
> I am running django 1.10 and assume i will need to use java scripts, jqu
I am running django 1.10 and assume i will need to use java scripts, jquery
or angularjs
Simply put i have a decimal field that i want to add to another decimal
field and place the answer in a third decimal field.
I want this to be displayed on the fly as the form gets data inputed on the
I'm having two issues with "prefix_default_language" that I was hoping to
shed some insight on. My URL conf is as follows:
urlpatterns += i18n_patterns(
url(r'^(?P.+-parking)/?$', CityView.as_view()),
prefix_default_language=False
)
Issue #1: Prefixes
If a city that matches my regex ALS
6 at 3:44:33 PM UTC-4, Neto wrote:
>>>
>>> I'm trying to get number of records per month, but Django does not
>>> return correctly when there is "ordering" in class Meta Model.
>>>
>>> I have the Abc model, with 4 records
correctly when there is "ordering" in class Meta Model.
>>
>> I have the Abc model, with 4 records made this month, look what happens
>> (Django 1.10, PostgreSQL):
>>
>> class Abc(Base):
>>
>> class Meta:
>> ordering = ['-
Django does not return
> correctly when there is "ordering" in class Meta Model.
>
> I have the Abc model, with 4 records made this month, look what happens
> (Django 1.10, PostgreSQL):
>
> class Abc(Base):
>
> class Meta:
> ordering = [&
I'm trying to get number of records per month, but Django does not return
correctly when there is "ordering" in class Meta Model.
I have the Abc model, with 4 records made this month, look what happens
(Django 1.10, PostgreSQL):
class Abc(Base):
class Meta:
Remove the strings at the start of each urlpatterns, e.g.
'matricula.views.Auth'. That's obsolete from when you were using
patterns(). urlpatterns should be a list of url()s.
On Tuesday, August 9, 2016 at 11:57:09 AM UTC-4, ludovic coues wrote:
>
> What you are writing is not valid python syntax
What you are writing is not valid python syntax.
Here is the problematic code:
urlpatterns += urlpatterns['matricula.views.Courses',
url('^courses$', list_courses, name='courses'),
url('^course/(?P\d+)$', view_course,
name='course'),
On Tue, Aug 9, 2016 at 6:46 PM, wrote:
> view_course
Send definition of this function view_course
Many thanks,
Serge
+380 636150445
skype: skhohlov
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop
Hello I need to know what is my error gretting
this is my urls.py
from django.conf.urls import url, include
from matricula.views.Auth import *
from matricula.views.Courses import *
from .admin import admin_site
from matricula.views.Pages import PageDetail
from matricula.views.Enrollments import
Django 1.10 and a bug fix release for the 1.9 series (1.9.9) are now
available:
https://www.djangoproject.com/weblog/2016/aug/01/django-110-released/
With the release of Django 1.10, Django 1.9 has reach end of mainstream
support. It will continue to receive security and data loss fixes for
We've made the second release on the way to Django's next major release,
Django 1.10! With a month and a half until the scheduled final release,
we'll need timely testing from the community to ensure an on-time and
stable release. Check out the blog post:
https://www.djangopro
We've made the first release on the way to Django's next major release,
Django 1.10! With two and a half months until the scheduled final release,
we'll need timely testing from the community to ensure an on-time and
stable release. Check out the blog post:
https://www.djangopro
66 matches
Mail list logo