Re: Problem with testing on Travis CI

2019-01-16 Thread אורי
Thank you Michal, I was not aware of this issue. I fixed it and committed again - https://github.com/speedy-net/speedy-net/commit/6570e00edb9d58c8d855f8b7ea6a8129c774eb33. Thanks for your help! Thanks, אורי (Uri) u...@speedy.net On Wed, Jan 16, 2019 at 11:39 AM Michal Petrucha < michal.pe

Re: Can a class which inherits from factory.DjangoModelFactory use Django TestCase asserts?

2019-01-16 Thread אורי
days ago to fix a bug in the models. In another factory, I also created another object called `_test_case` to assert other things where the mixin is not needed: https://github.com/speedy-net/speedy-net/blob/staging/speedy/match/accounts/test/user_factories.py Thanks, אורי (Uri) u...@speedy.net

modeltranslation

2019-01-16 Thread אורי
-modeltranslation/issues/488 I didn't check all the 124 open issues there if other issues are also related. Thanks, אורי (Uri) u...@speedy.net -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving e

Problem with testing on Travis CI

2019-01-15 Thread אורי
tests fail on Travis CI? Thanks, אורי (Uri) u...@speedy.net -- 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...@googl

Can I define classes in Django settings, and how can I override such settings in tests?

2018-12-27 Thread אורי
https://github.com/speedy-net/speedy-net/blob/uri_merge_with_master_2018-12-26_a/speedy/core/friends/tests/test_views.py. But if `MAX_NUMBER_OF_FRIENDS_ALLOWED` would be defined in the class `UserSettings`, how do I override it? Thanks, אורי (Uri) u...@speedy.net -- You received this message b

Translation with context

2018-12-25 Thread אורי
it possible to define the context "other" as default, so if a different context (or none) is passed and there is no translation with the given context, "other" will be used? By the way, did someone ask this question before? Is there any solution I don't know? Thanks, אורי (Uri) u...@speedy.net

Re: Overriding settings in Django when used by the models

2019-01-04 Thread אורי
I don't understand why is it relevant to my question? It's not what I asked. אורי u...@speedy.net On Mon, Dec 31, 2018 at 3:12 PM Jason wrote: > Sounds like what you want is something in > https://djangopackages.org/grids/g/live-setting/ > > This will let you change settings

Logging debug & error messages to file

2019-01-12 Thread אורי
do I configure the server to write messages to '/var/log/speedy_net_django.log'? We use Ubuntu and nginx. Our logging settings: https://github.com/speedy-net/speedy-net/blob/staging/speedy/core/settings/base.py By the way, are there friendlier ways to view logging messages than with text files? או

Can a class which inherits from factory.DjangoModelFactory use Django TestCase asserts?

2019-01-12 Thread אורי
/master/speedy/core/accounts/tests/test_factories.py staging (under development): https://github.com/speedy-net/speedy-net/blob/staging/speedy/core/accounts/tests/test_factories.py Thanks, אורי (Uri) u...@speedy.net -- You received this message because you are subscribed to the Google Groups

Overriding settings in Django when used by the models

2018-12-30 Thread אורי
uch values since they are only evaluated the first time the module is imported. Which I understand are relevant in this case, but how do I define the settings in such a way that I can override them? Thanks, אורי (Uri) u...@speedy.net אורי u...@speedy.net -- You received this message because yo

Re: Upgrading Django from 1.11 to 2.2

2019-04-02 Thread אורי
feature release, use the latest patch release (A.B.C). The same incremental upgrade approach is recommended when upgrading from one LTS to the next." So it's written there. It's recommended to upgrade through each feature release incrementally and not directly from LTS to the next LTS. אורי u.

Re: Upgrading Django from 1.11 to 2.2

2019-04-02 Thread אורי
I accept Tim's advice to upgrade from one major version to the next. Even if I want to upgrade from 1.11 to 2.2, I have to upgrade first to 2.0 and then 2.1 and only then 2.2. It makes sense. אורי u...@speedy.net On Tue, Apr 2, 2019 at 4:44 PM Derek wrote: > I agree; and the reason for Dja

Re: Remove username field

2019-04-02 Thread אורי
/accounts/models.py#L160 https://github.com/speedy-net/speedy-net/blob/master/speedy/core/accounts/models.py#L215 https://github.com/speedy-net/speedy-net/blob/master/speedy/core/settings/base_with_login.py#L26 אורי u...@speedy.net On Wed, Apr 3, 2019 at 12:12 AM Soumen Khatua wrote: > Hi fo

Re: How to deploy migrations to production

2019-04-02 Thread אורי
/deploy.sh אורי u...@speedy.net On Tue, Apr 2, 2019 at 3:51 PM Simon A wrote: > There is a workflow section in the migration page from the django project > documentation. But there are somethings I am confused about, > > It says that the migrations need to be created in the non production &

Re: How to deploy migrations to production

2019-04-03 Thread אורי
You can read about collectstatic here: https://docs.djangoproject.com/en/dev/howto/static-files/deployment/ I think you should run it every time there is a change in the static files. If you want to make sure, run it every time you deploy a new version. אורי u...@speedy.net On Wed, Apr 3, 2019

django-translated-fields

2019-03-27 Thread אורי
, and django-modeltranslation defines 3 fields - one of them (the main field without any language) seems to me not necessary at all. Take a look at: https://github.com/deschler/django-modeltranslation/issues/488 Thanks! אורי u...@speedy.net -- You received this message because you are subscribed

Re: google chrome extension

2019-04-03 Thread אורי
is the default and easiest way to create an extension. אורי u...@speedy.net On Wed, Apr 3, 2019 at 2:32 PM Abhineet Baranwal < suabhineetbaran...@gmail.com> wrote: > > *Can i create a chrome extension in django or flask ? I have already > created an extension in javascript but i

Re: Django validation

2019-04-04 Thread אורי
and views. In the forms I think you can also add your own validators before the default validators, if you want to keep the default validators but show your own error messages instead of the error messages of the default validators. אורי u...@speedy.net On Fri, Apr 5, 2019 at 8:10 AM veera nagaraja sankar

Re: Migration auth.0011_update_proxy_permissions from Django 2.2 fails to apply

2019-04-05 Thread אורי
Hi Julien, Sounds like a bug in Django 2.2. Try to report it on https://code.djangoproject.com/ and/or by email to django-develop...@googlegroups.com . In which table the exception occurs? Did you try to upgrade to Django 2.1 and then to 2.2? אורי u...@speedy.net On Thu, Apr 4, 2019 at 2:07

Re: Migration auth.0011_update_proxy_permissions from Django 2.2 fails to apply

2019-04-05 Thread אורי
Hi Julien, Also, try to install a new - either local or remote - environment with your code and then try to upgrade Django there. There might be a problem specific with this deployment. This exception, on which environment did you receive it? Local or remote? אורי u...@speedy.net On Thu, Apr 4

Re: Overriding settings in Django when used by the models

2019-03-30 Thread אורי
with functions which start with 2 or more underlines.) 4. By the way, `validators` may be a property since it's only used per instance, but I'm not sure about settings. Maybe I can use the settings differently in `validators` and define it there as a property? אורי u...@speedy.net On Thu, Jan 24, 2019

Upgrading Django from 1.11 to 2.2

2019-03-29 Thread אורי
. Thanks! אורי u...@speedy.net -- 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

Re: Django security releases issued: 2.2.2, 2.1.9 and 1.11.21

2019-06-03 Thread אורי
wanbao Did you read https://www.djangoproject.com/weblog/2019/jun/03/security-releases/ ? אורי u...@speedy.net On Mon, Jun 3, 2019 at 4:42 PM wanbao jin wrote: > What were those security issues? Could you briefly explain about it? > > Thanks > > On Mon, Jun 3, 2019 at 7:17 PM

Re: Customising django user model

2019-05-22 Thread אורי
/base_with_login.py#L26 אורי u...@speedy.net On Sun, May 19, 2019 at 8:13 PM Sipum wrote: > Hello Friends, > > I want to customise django default user table and which should consist of > name,phone, email and gender. > And after that when every time a user logs in, he/she should able to l

Re: Website slowed down drasticaly

2019-05-02 Thread אורי
Why don't you upgrade Django at least to 1.11? Django 1.8 extended support ended last year. https://www.djangoproject.com/download/ אורי u...@speedy.net On Thu, May 2, 2019 at 2:39 PM Saurabh Adhikary wrote: > Hello , > > I'm using Django version 1.8.1 and Python version 2.7.12 .

Running tests creates many unnecessary files

2019-06-28 Thread אורי
not sure which of our tests created these files and folders. Most of these files are either .jpg or .dat files. Is it possible to delete all these files automatically after the tests end? Thanks, אורי u...@speedy.net -- You received this message because you are subscribed to the Google Groups "D

Can I override __new__ in Django ModelForm?

2019-07-10 Thread אורי
lds are saved in another model (there are 2 models but only one form). I still didn't commit the migrations because of this error when running make_migrations. (I defined a command make_migrations which only does makemigrations) Thanks! אורי u...@speedy.net -- You received this message because you are s

Re: DeprecationWarning in Django 1.11.22 with Python 3.7

2019-07-08 Thread אורי
been fixed in https://github.com/django/django/commit/aba9763b5117494ca1ef1e420397e3845ad5b262, but I'm not sure which versions of Django are using this commit. אורי u...@speedy.net On Tue, Jul 9, 2019 at 12:04 AM Joe Reitman wrote: > Looks like a bug in pyparsing.py > > https://g

Re: DeprecationWarning in Django 1.11.22 with Python 3.7

2019-07-08 Thread אורי
>From the branches it looks like all Django versions above 2.1 are using this commit and therefore are fixed. אורי u...@speedy.net On Tue, Jul 9, 2019 at 12:04 AM Joe Reitman wrote: > Looks like a bug in pyparsing.py > > https://github.com/pyparsing/pyparsing/pull/16 > >

DeprecationWarning in Django 1.11.22 with Python 3.7

2019-07-08 Thread אורי
' is deprecated, and in 3.8 it will stop working Is this known that Django 1.11 doesn't work with Python 3.7 with deprecation warnings enabled? Does this problem exist with other versions of Django too? By the way, running tests without deprecation warnings enabled works (the tests pass). אורי u

Re: DeprecationWarning in Django 1.11.22 with Python 3.7

2019-07-08 Thread אורי
I found out that the same DeprecationWarning occurs with Django versions 2.0 and 2.0.13. אורי u...@speedy.net ‪On Mon, Jul 8, 2019 at 9:08 PM ‫אורי‬‎ wrote:‬ > Hi, > > I tested Django 1.11.22 (or any version from 1.11.17 to 1.11.22) with > Python 3.7, and found out that when r

Re: Running tests creates many unnecessary files

2019-06-29 Thread אורי
Hi, I run the tests with manage.py test and there is a local virtualenv I created. I noticed that only specific tests create files in media and not all of them. I'm not sure where the code that creates these files come from, we are using a lot of third party code. אורי u...@speedy.net On Fri

Re: Installation of django

2019-08-22 Thread אורי
I recommend Python 3.6 or 3.5. Some things are deprecated with Python 3.7. For example Django 1.11 runs DeprecationWarnings with Python 3.7. אורי u...@speedy.net On Thu, Aug 22, 2019 at 1:37 PM o1bigtenor wrote: > On Thu, Aug 22, 2019 at 3:35 AM Abu Yusuf > wrote: > > > > F

Access a form method from generic.UpdateView

2019-08-07 Thread אורי
the current instance. https://github.com/speedy-net/speedy-net/blob/staging/speedy/match/matches/views.py#L54 Thanks, אורי u...@speedy.net -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiv

Re: Overriding methods in models of other developers

2019-07-27 Thread אורי
quest from user {} to {}".format(self.from_user, self.to_user) Friend.__str__ = Friend1.__str__ FriendshipRequest.__str__ = FriendshipRequest1.__str__ אורי u...@speedy.net ‪On Sat, Jul 27, 2019 at 9:26 AM ‫אורי‬‎ wrote:‬ > Django users, > > I want to override def __str__ of mod

Overriding methods in models of other developers

2019-07-27 Thread אורי
uch a clean way to override a method (but it works). But I have to use the model itself, because there is a lot of code in the package I'm using that uses the model itself. (We are using our own Block model which I think we developed before they developed a similar model. We are not using their

Re: Problem with running Django with nginx and uwsgi in Ubuntu

2019-07-27 Thread אורי
Thanks for your suggestions, I'll try it. אורי u...@speedy.net > > -- 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...@

Custom error messages not working in Django ModelForm - help needed

2019-08-09 Thread אורי
help: https://github.com/speedy-net/speedy-net/issues אורי u...@speedy.net -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-user

How do I setup email from address from logging to the admins?

2019-08-09 Thread אורי
mas...@speedy.net.2.speedy-technologies.com>) https://github.com/speedy-net/speedy-net/blob/staging/speedy/core/settings/staging_utils.py#L8 How do I change the from address of email sent to admins from logging? Thanks, אורי u...@speedy.net -- You received this message because you are subs

Re: How do I setup email from address from logging to the admins?

2019-08-09 Thread אורי
Hi, I found out there is a separate setting: https://code.djangoproject.com/ticket/30692 אורי u...@speedy.net ‪On Fri, Aug 9, 2019 at 1:44 PM ‫אורי‬‎ wrote:‬ > Django Users, > > I'm using AdminEmailHandler in Speedy Net to send mail to the admins. My > log file contains the fol

How do I override default date formats per locale in Django?

2019-07-24 Thread אורי
%} {% endif %} {% endif %} And I want it to display the dates in these formats in each language. How do I do it? אורי u...@speedy.net -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: How do I override default date formats per locale in Django?

2019-07-25 Thread אורי
et/speedy-net/blob/uri_main_branch_2019-07-26_c/speedy/core/locale/en/formats.py#L4>, but it doesn't work. It shows dates like Jan. 1, 2018 and not as I expect. I also don't know if DATE_FORMAT should be preceded by settings. in the template, but it doesn't show anything without it. אורי u..

Re: convert python 3 to python2

2019-09-24 Thread אורי
On Sat, Sep 21, 2019 at 8:32 PM Ankita Gupta wrote: > Not related to Django... > Then write to python-l...@python.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

Re: calling index.html

2019-09-29 Thread אורי
templates and usually it's better not to load a static HTML page. אורי u...@speedy.net On Sun, Sep 29, 2019 at 1:26 AM Tato Müller wrote: > Hi everyone. > > How can i call an html page when i request the root of my app, like > http://127.0.0.1:8000/app. > I want index.html loads when

Upgrading Django from 2.1 to 2.2 - strings are not translated

2019-11-01 Thread אורי
Hi, Take a look at this ticket: https://code.djangoproject.com/ticket/30939 This issue prevents me from upgrading Django to 2.2. Currently everything works with Django 2.1 but not with Django 2.2. אורי u...@speedy.net -- You received this message because you are subscribed to the Google

Re: pip install Django==3.0

2019-12-02 Thread אורי
On Mon, Dec 2, 2019 at 9:24 PM Simon Charette wrote: > Dear Uri, > > > When I use pip to install a package, does it depend on the version of > Python I'm using? > > Yes, it does. > > > I noticed that Django 3.0 doesn't support Python 3.5. But why does pip > fail? > > Pip will respect the

Re: Django 3.0 Released.

2019-12-05 Thread אורי
have already been released. Anyway right now, as far as I know, all the packages we use support Django 2.2 LTS but not all of them support Django 3.0. אורי u...@speedy.net On Thu, Dec 5, 2019 at 5:12 PM Jonathan Morgan < jonathan.morgan@gmail.com> wrote: > Another thing to consider i

FileNotFoundError when users try to upload a photo

2019-12-16 Thread אורי
website and upload photos. But it failed for some specific users recently. Thanks, אורי u...@speedy.net -- 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 dj

Set-Cookie is not working in Chrome

2019-12-11 Thread אורי
to set the cookie. But it doesn't set the cookie on the other website (the website I'm not browsing now). Is there any solution to this problem? I think this is due to recent changes in Chrome. אורי u...@speedy.net -- You received this message because you are subscribed to the Google Groups "D

Re: Set-Cookie is not working in Chrome

2019-12-11 Thread אורי
Hi, I want to add, the users login or logout or sign up to one website, and I want them to login or logout from the other website too, automatically. Currently if they login or logout to one website, it doesn't affect the other website. אורי u...@speedy.net ‪On Thu, Dec 12, 2019 at 7:45 AM

Re: Set-Cookie is not working in Chrome

2019-12-11 Thread אורי
Hi, I asked a question on Stack Overflow: https://stackoverflow.com/questions/59298548/set-cookie-is-not-working-in-chrome-with-two-websites אורי u...@speedy.net ‪On Thu, Dec 12, 2019 at 7:45 AM ‫אורי‬‎ wrote:‬ > Django users, > > I have a problem with Set-Cookie not working in

Re: Set-Cookie is not working in Chrome

2019-12-11 Thread אורי
Hi, On Thu, Dec 12, 2019 at 8:07 AM Mike Dewhirst wrote: > On 12/12/2019 4:48 pm, אורי wrote: > > Hi, > > > > I want to add, the users login or logout or sign up to one website, > > and I want them to login or logout from the other website too, > > autom

pip install Django==3.0

2019-12-02 Thread אורי
Python 3.5. But why does pip fail? אורי u...@speedy.net -- 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.co

Re: Django security releases issued: 2.2.8 and 2.1.15.

2019-12-02 Thread אורי
Bugfixes is empty on https://docs.djangoproject.com/en/2.2/releases/2.1.15/ אורי u...@speedy.net On Mon, Dec 2, 2019 at 11:12 AM Carlton Gibson wrote: > Today the Django team issued 2.2.8 and 2.1.15 as part of our security > process. These releases address security issues, and we enc

Re: Link a .css to a Html template

2019-12-01 Thread אורי
/match/templates/accounts/edit_profile/activate.html#L13-L18 אורי u...@speedy.net On Mon, Dec 2, 2019 at 3:26 AM Leó Horváth wrote: > Hi guys, I am experiencing an error while trying to Link a .css file to a > Html template of one of my Views. What is the correct way to do it? > &

Re: Username as email

2019-11-23 Thread אורי
address). אורי u...@speedy.net On Sun, Nov 24, 2019 at 7:55 AM Soumen Khatua wrote: > Hi Folks, > Any have any idea in real time how programmers manage email id as username > only. Because django provide different fields for username and email id. So > how I can overcome to

Re: How to generate a unique 9 digit random id for every registered user?

2019-10-04 Thread אורי
/blob/master/speedy/core/base/utils.py https://github.com/speedy-net/speedy-net/blob/master/speedy/core/base/models.py#L33-L48 https://github.com/speedy-net/speedy-net/blob/master/speedy/core/accounts/models.py אורי u...@speedy.net On Fri, Oct 4, 2019 at 5:53 PM yashwanth .k wrote: > He

Re: Django security releases issued: 3.0.1, 2.2.9, and 1.11.27

2019-12-18 Thread אורי
self.send_mail(subject_template_name, email_template_name, context, from_email, user_email, html_email_template_name=html_email_template_name) else: logger.error("PasswordResetForm::User doesn't have a matching email address, site_name={site_name}, user={user}, ema

Re: Hosting a django website

2020-01-26 Thread אורי
Personally I host droplets on digitalocean, you have root and sudo but it's some effort to setup the server. Starting from $5/month. אורי u...@speedy.net On Sat, Jan 25, 2020 at 8:41 PM Perceval Maturure wrote: > dear all > 1.what is the best way to host a django website on a share

Re: Upgrading django from 1.8 to 2.2.0

2020-02-02 Thread אורי
d here, you can also use 2.2 etc.) אורי u...@speedy.net On Fri, Jan 31, 2020 at 12:53 PM Santhosh sridhar wrote: > Hi, > Im upgrading my django project from 1.8 to 2.2.0. I have done the below > changes. > > 1. Added on_delete to all the Foreign Key fields > 2. Changed the url

Re: Upgrading django from 1.8 to 2.2.0

2020-02-02 Thread אורי
ime to upgrade Django and it's an average of about half a day per version. And if it's 6 versions you're upgrading, it can take you around 3 days to upgrade. אורי u...@speedy.net On Fri, Jan 31, 2020 at 12:53 PM Santhosh sridhar wrote: > Hi, > Im upgrading my django project from 1.8 to 2.2.0. I

Re: Upgrading django from 1.8 to 2.2.0

2020-02-02 Thread אורי
By the way, each time upgrade to the latest release of each version. So it's 2.2.9 you should use. And all the latest versions on https://www.djangoproject.com/download/ (1.9.13 etc.) אורי u...@speedy.net On Fri, Jan 31, 2020 at 12:53 PM Santhosh sridhar wrote: > Hi, > Im upgrading my

Re: contrib.sites Admin problem

2020-02-03 Thread אורי
Did you try `django_admin.site.unregister(Site)` before you register Site with your own admin? אורי u...@speedy.net On Tue, Feb 4, 2020 at 7:56 AM Mike Dewhirst wrote: > How do I control contrib.sites in the Admin? > > I want to make it invisible to everyone except the superuser. &

Re: contrib.sites Admin problem

2020-02-04 Thread אורי
How are your models defined in sites? אורי u...@speedy.net On Tue, Feb 4, 2020 at 9:24 AM Mike Dewhirst wrote: > On 4/02/2020 5:47 pm, אורי wrote: > > Did you try `django_admin.site.unregister(Site)` before you register > > Site with your own admin? > > Yes. > >

Re: Contractions in Django 3.0 and Django 2.2

2020-02-08 Thread אורי
You can check which Django version is used and assert accordingly. https://stackoverflow.com/a/6468505/1412564 אורי u...@speedy.net On Sat, Feb 8, 2020 at 3:48 PM One Above All < the.one.above.all.ti...@gmail.com> wrote: > i am working on a project which is adding support for Django 3

Re: Contractions in Django 3.0 and Django 2.2

2020-02-08 Thread אורי
For example in this case: if (django.VERSION >= (3, 0)): ... else: ... אורי u...@speedy.net On Sat, Feb 8, 2020 at 3:48 PM One Above All < the.one.above.all.ti...@gmail.com> wrote: > i am working on a project which is adding support for Django 3.0. While > doing so

Re: Request to disallow using django name in third party django packages name

2020-02-20 Thread אורי
It's very useful that packages that use Django also include "django" in their names. I don't think there is any reason to disallow it. בתאריך יום ה׳, 20 בפבר׳ 2020, 14:23, מאת Abhilash Nair ‏: > Hi everyone, > > I am new to Django. Whenever I try to search for way to implement certain > ideas

Re: Why can't Nginx find Django's static files?

2020-02-21 Thread אורי
, document_root=django_settings.MEDIA_ROOT) + urlpatterns אורי u...@speedy.net On Thu, Feb 20, 2020 at 6:36 PM Robert F. wrote: > I'm trying to understand how static files are served up by Django using a > project I've created on my Mac using Django 3, Gunicorn, and Nginx. The > website serves up

TextField

2020-01-05 Thread אורי
Django users, Is there a default max length for TextField which is enforced in the database? We are using PostgreSQL and I don't want users (hackers) to flood our database with megabytes of meaningless text. Thanks, Uri. אורי u...@speedy.net -- You received this message because you

Re: TextField

2020-01-06 Thread אורי
Sorry, I didn't see that you already wrote that. אורי u...@speedy.net On Mon, Jan 6, 2020 at 6:43 AM Abu Yusuf wrote: > > No, there is no limit for textfield. But you can do the hack using this: > > from django.core.validators import MaxLengthValidator > class Comme

Re: TextField

2020-01-06 Thread אורי
It's better to add a validator in the model: text = models.TextField(verbose_name=_('your message'), max_length=5, validators=[MaxLengthValidator(limit_value=5)]) אורי u...@speedy.net On Mon, Jan 6, 2020 at 6:11 AM Mike Dewhirst wrote: > On 6/01/2020 2:24 pm, אורי wrote: > &g

asgiref

2020-04-10 Thread אורי
Hi, What is asgiref and why is it automatically installed when I upgrade Django to 3.0 with pip? What does it do and is it required to be installed in production? אורי u...@speedy.net -- You received this message because you are subscribed to the Google Groups "Django users&q

Re: asgiref

2020-04-10 Thread אורי
On Fri, Apr 10, 2020 at 10:11 AM Mike Dewhirst wrote: > On 10/04/2020 4:55 pm, אורי wrote: > > Hi, > > > > What is asgiref and why is it automatically installed when I upgrade > > Django to 3.0 with pip? > > https://docs.djangoproject.com/en/3.0/topics/async/#

Django form fields order

2020-04-10 Thread אורי
. אורי u...@speedy.net -- 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 view this discussion on the web vi

Re: Django form fields order

2020-04-10 Thread אורי
name but regarding the form, it doesn't matter what are the names of the fields, what matters is that they depend on the language, so one can have different (spellings of) names in different languages. For example I can write Uri in English, and אורי in Hebrew, which will be both saved to the database i

Re: Django form fields order

2020-04-10 Thread אורי
Hi, I want to add that I checked the Django 3.0 release notes [ https://docs.djangoproject.com/en/3.0/releases/3.0/ ] and also releases from 3.0.1 to 3.0.5 and I didn't find any documentation of this issue. אורי u...@speedy.net ‪On Fri, Apr 10, 2020 at 10:28 AM ‫אורי‬‎ wrote:‬ > Hi, >

Login cookies on my website

2020-04-14 Thread אורי
and then 3.0. אורי u...@speedy.net -- 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 view this discussion

Re: Looking for Django developers to work on a new and an existing project with our team

2020-04-07 Thread אורי
Hi, I'm also looking for work. I'm an experienced Django developer with 6 years of experience. You can find more information about me here: https://www.speedysoft.com/uri/en/ אורי u...@speedy.net On Sun, Mar 29, 2020 at 8:56 PM Lax Nayak wrote: > I am looking for a django developer who

Re: Django form fields order

2020-04-10 Thread אורי
On Fri, Apr 10, 2020 at 11:13 PM Jorge Gimeno wrote: > > By chance did you change Python versions as well? > > No, it's the same Python version (3.6). Anyway, I asked also on Stack Overflow and found a solution:

Re: New to Django to select between 3.0 and 2.2

2020-03-13 Thread אורי
, which is expected next month. So in general, the selection of which Django version you use depends on your dependencies. אורי u...@speedy.net On Thu, Mar 12, 2020 at 11:54 AM Mrinal Kamboj wrote: > Hello, > > I have just started the Python development, I am very new to the Python &

Re: Exception in tests when deleting users in Django

2020-05-17 Thread אורי
in bulk by .delete()? And if it does, how do I disable it so trying to delete users in bulk will raise an exception? אורי u...@speedy.net ‪On Sun, May 17, 2020 at 5:56 PM ‫אורי‬‎ wrote:‬ > Hi, > > I'm creating a new test and it has users and I delete them: > > User.objects.a

Exception in tests when deleting users in Django

2020-05-17 Thread אורי
-- Ran 1 test in 7.425s I think this exception is because the users I deleted. net_accounts_siteprofile refers to the SiteProfile model which should be deleted when deleting a user by on_delete=models.CASCADE . What is the problem and how do I fix it? אורי u...@speedy.ne

Templates in Django

2020-05-14 Thread אורי
edit_profile_links_1 %} {% if request.user.profile.is_active %} {% endif %} {% endblock %} Is this the correct way to do this? Or is there a better way to extend templates? Thanks, Uri. אורי u...@speedy.net -- You received this message because you are subscribed to the Google Groups

Re: Django 3.1 alpha 1 released

2020-05-14 Thread אורי
Hi, Is it possible to install Django 3.1 alpha 1 from pip and how? I want to test it locally and on Travis CI and the easiest way to install it for me is with pip. Thanks, Uri. אורי u...@speedy.net On Thu, May 14, 2020 at 12:44 PM Mariusz Felisiak < felisiak.mari...@gmail.com>

Re: Django 3.1 alpha 1 released

2020-05-14 Thread אורי
Hi, I found out that I can use: pip install --upgrade --pre django Thanks, Uri. אורי u...@speedy.net ‪On Thu, May 14, 2020 at 1:49 PM ‫אורי‬‎ wrote:‬ > Hi, > > Is it possible to install Django 3.1 alpha 1 from pip and how? I want to > test it locally and on Travis CI and the

Re: Django 3.1 alpha 1 released

2020-05-14 Thread אורי
Hi, Django 3.1 alpha 1 works for me and my project, I just had to change some imports. I ran all the unit tests and they all passed. Uri. אורי u...@speedy.net On Thu, May 14, 2020 at 12:44 PM Mariusz Felisiak < felisiak.mari...@gmail.com> wrote: > Details are available on the Djang

register_converter

2020-05-06 Thread אורי
ected to "-"). for example the paths "/uri_rodberg/" and "/uri.rodberg/" will be redirected to "/uri-rodberg/". And not to use the Django-defined "slug". I also want to define "digits" as any sequence of digits 0-9, but it's a string -

I can't catch a URL in Django

2020-05-06 Thread אורי
starts with /about/ . Thanks, Uri. אורי u...@speedy.net -- 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.co

Re: register_converter

2020-05-06 Thread אורי
Hi, I checked and if I define a converter with a name of a default converter, such as "slug" - it overrides the default converter. The line that causes this is the line return {**DEFAULT_CONVERTERS, **REGISTERED_CONVERTERS} in get_converters() in Django. אורי u...@speedy.net On

Changing ordering of model in the admin views

2020-10-10 Thread אורי
- Speedy Net and Speedy Match, and in Speedy Match I want a different order ( ordering = ('-speedy_match_site_profile__last_visit',) ). How can I do this? Thanks, אורי u...@speedy.net -- You received this message because you are subscribed to the Google Groups "Django users&q

Re: Optimized Query

2020-05-29 Thread אורי
They both work for both. אורי u...@speedy.net On Fri, May 29, 2020 at 12:47 PM Sencer Hamarat wrote: > I thought select_related works for only FK/M2M and prefetch_related works > for only reverse relations, doesn't it? > > Saygılarımla, > Sencer HAMARAT > > > > ‪On F

Re: Templates vs. source code

2020-05-29 Thread אורי
Thank you. אורי u...@speedy.net On Fri, May 29, 2020 at 12:56 PM Sencer Hamarat wrote: > Hi Uri, > Never expose whole settings anytime. settings is always includes sensitive > data. At least DB access key and Django's secret value. > This attitude is highly vulnerable. Anyone

Templates vs. source code

2020-05-28 Thread אורי
consider safe? Thanks, Uri. אורי u...@speedy.net -- 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 view this

Re: Optimized Query

2020-05-28 Thread אורי
Hi Soumen, Sometimes prefetch_related is much faster and more efficient than select_related. I usually prefer to use prefetch_related. Uri. אורי u...@speedy.net On Thu, May 28, 2020 at 12:42 AM Soumen Khatua wrote: > Actually I want to fetch all users from User table and users location f

Re: filter on multiple tables

2020-05-28 Thread אורי
Hi Soumen, You can filter on another table by using __, for example: User.objects.filter(profile__profiles__institute_name="Example") Or: User.objects.filter(profile__profiles__institute_name__in=["Example 1", "Example 2"]) אורי u...@speedy.net On Thu, May 28,

Customizing Django built-in views such as LoginView

2020-05-29 Thread אורי
extra_context = None redirect_authenticated_user = True And then, define in urls.py: path(route='login/', view=views.LoginView.as_view(), name='login'), Will both ways work the same, and is one of them preferred from a software engineering / programming perspective? Thanks, Uri. אורי u

Re: Customizing Django built-in views such as LoginView

2020-05-29 Thread אורי
Thank you. אורי u...@speedy.net On Fri, May 29, 2020 at 3:57 PM Augusto Destrero wrote: > I would choose the second option and define a LoginView subclass in the > views.py module. > The outcome is exactly the same, but I'd prefer to have my views all > defined in views.py file.

Re: prefetch_related with slices

2020-09-19 Thread אורי
Thank you. אורי u...@speedy.net On Sat, Sep 19, 2020 at 6:14 PM misraX x wrote: > I believe you are searching for queryset and SQL limits, if so take a look > at > https://docs.djangoproject.com/en/2.2/topics/db/queries/#limiting-querysets > > On Fri, Sep 18, 2020 at 7:00

CSS problems

2020-09-16 Thread אורי
. אורי u...@speedy.net -- 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 view this discussion on the web vi

Re: CSS problems

2020-09-16 Thread אורי
Yes, thank you! אורי u...@speedy.net On Wed, Sep 16, 2020 at 8:14 PM Larry Martell wrote: > On Wed, Sep 16, 2020 at 10:04 AM ‫אורי‬‎ wrote:‬ > > > > Hi, > > > > My website, https://en.speedy.net/, the date of birth input is bordered > red with Firefox, and I ca

  1   2   >