How to see every activity in logs of Django 2.0.6?

2018-07-25 Thread prateek gupta
Hi Experts, I am facing a strange issue in my Django2.0.6+Mysql application. In my settings ,py I have set Debug=True, but in logs I am not seeing any info/warning/error. Currently I am merging two products into one to remove duplicate products from Django admin panel but when I click on

Django2.0.7 generate SQL query function is wrong(REGEXP_LIKE).

2018-07-25 Thread Hiroyuki Yamashita
My name is Hiroyuki Yamashia. Create SQL query function is wrong by Django2.0.7. I using MariaDB and using "__regex". Django2.0.7 is generate this SQL query. SELECT `scanner_tmpresponse_07`.`id` FROM `scanner_tmpresponse_07` WHERE (`scanner_tmpresponse_07`.`audit_history_id` = 225 AND

Re: Oracle Connection Problem

2018-07-25 Thread Md. Razibul Hasan Mithu
In oracle database ,what does NAME and HOST mean? Can you tell me in details? -- 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

Re: Prevent Django tests from accessing internet (except localhost)

2018-07-25 Thread Gene
By the way, another approach which is quite convenient is to run unit tests in docker during build stage (you will need to use settings with sqlite) Quite convenient in combination with pipeline or CI framework, for example bitbucket pipelines Or even on localhost On Monday, 23 July 2018

Re: Prevent Django tests from accessing internet (except localhost)

2018-07-25 Thread Gene
Preventing code from using networking is a common approach for unit tests Firewall is a completely different story and has nothing common with this matter On Thursday, 26 July 2018 04:50:58 UTC+8, Melvyn Sopacua wrote: > > On dinsdag 24 juli 2018 04:21:07 CEST Kum wrote: > > Is there a way to

geodjango raster field display on leaflet

2018-07-25 Thread Xristos Xristoou
in the new django version support raster field and i follow this manual for geodjango raster field and this questions

Re: Some Doubts on Session Expiries

2018-07-25 Thread Melvyn Sopacua
On woensdag 25 juli 2018 21:05:27 CEST vineeth sagar wrote: > Hi, > > I have been going crazy for the past few days trying to understand > sessions, my settings.py file as the following, > > SESSION_SAVE_EVERY_REQUEST=True > SESSION_COOKIE_AGE=2*60 > > Now whenever a request is initiated

Re: Prevent Django tests from accessing internet (except localhost)

2018-07-25 Thread Melvyn Sopacua
On dinsdag 24 juli 2018 04:21:07 CEST Kum wrote: > Is there a way to prevent people from accidentally doing so? To prevent network access, there are firewalls. Django isn't the thing for it. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups

Re: how to find activities dues for today and tommorow

2018-07-25 Thread Julio Biason
Hi Deepak, You could set up another model to track when something should be done to the tree; something like this: class Tree(models.Model): ... planted_date = models.DateField() class Reminder(models.Model): tree = models.ForeignKey(tree) when = models.DateField() what =

Some Doubts on Session Expiries

2018-07-25 Thread vineeth sagar
Hi, I have been going crazy for the past few days trying to understand sessions, my settings.py file as the following, SESSION_SAVE_EVERY_REQUEST=True SESSION_COOKIE_AGE=2*60 Now whenever a request is initiated shoudn't the expiry date of the cookie i.e the one that holds the session id

find difference of dates between today and filter list[dates]

2018-07-25 Thread deepak madan
HOW to find the difference between a list of dates and today and find the difference matches some days difference. Help -- 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

how to find activities dues for today and tommorow

2018-07-25 Thread deepak madan
suppose a model for the tree which is planted on some days. The second model has activities dues to be done after some regular interval like 1) giving fertilizer A after 5 days 2) giving fertilizer B after 15 days. My question is when this 5th or 15th days arrives, to design a reminder page to

Re: invalid literal for int() with base 10: ''

2018-07-25 Thread Jorge Gimeno
Can you please post your view? On Tue, Jul 24, 2018 at 9:02 PM, Nitesh Chaudhary wrote: > I got the error on "Writinh your first Django app, part4, in the view of > vote. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe

Re: syntax error

2018-07-25 Thread deepali pandey
The problem was I was using code in command prompt instead of windows powershell.. now the code is working when I am using it in shell On Wed 25 Jul, 2018, 5:09 PM akash kandpal, < 9654263057akashkand...@gmail.com> wrote: > In the she'll try this > python > import django > print (django.VERSION)

Re: Oracle Connection Problem

2018-07-25 Thread Julio Biason
Hi Razibul, Have you tried to add the host and port? IIRC, the default port is 1521 and you need to fill the host value, otherwise the driver won't know where to connect to. Also, are you getting any specific errors? On Wed, Jul 25, 2018 at 10:50 AM, Md. Razibul Hasan Mithu <

Oracle Connection Problem

2018-07-25 Thread Md. Razibul Hasan Mithu
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.oracle', 'NAME': 'orcl', # my sid is orcl. is this sid or something else?? 'USER': 'hr', # my instalation user is hr 'PASSWORD': 'hr', # Instalation Pass also hr 'HOST': '',

Re: authenticate issues with custom backends in 2.1rc1

2018-07-25 Thread Dirk B.
Thanks! That was it! But no, I dont remeber ever seeing a deprecation warning about this. Am Do., 19. Juli 2018 um 23:06 Uhr schrieb Tim Graham : > Do you have deprecation warnings with Django 2.0.x? > https://docs.djangoproject.com/en/dev/howto/upgrade-version/#resolving-deprecation-warnings >

Re: error in coding

2018-07-25 Thread mounikesh mintu
post your urls patterns On Wed, Jul 25, 2018 at 5:40 PM, Rohit Sharma wrote: > I am very new to Django. I have started a project and created my first app > but whenever i start editing the app i always get this error. i have > attached the screenshot of the error. > please help me out in a

Re: error in coding

2018-07-25 Thread Neil Haria
check the urls.py file, it might be empty or you have not added any urls in that file On Wed, Jul 25, 2018 at 5:45 PM Rohit Sharma wrote: > I am very new to Django. I have started a project and created my first app > but whenever i start editing the app i always get this error. i have >

Re: error in coding

2018-07-25 Thread Julio Biason
Hi Rohit, The problem is that you have `urlpatterns = ` (an assignment without value) which is invalid Python code. Either you need to finish the line (add the value that should be assigned to urlpatterns) or add a "\" to mark that the line continues in the line below. (As a last resort, you can

Re: Django makemigration polls error

2018-07-25 Thread Okware Aldo
I think he should share screenshot of his setting.py file, but from what I can see -- if he is running django 1.10 and above apps should be 'polls' not *'polls.apps.PollsConfig'* On Wed, Jul 25, 2018 at 2:23 PM theAloneOne wrote: > You may have missed a comma after *'polls.apps.PollsConfig'*

Re: Django makemigration polls error

2018-07-25 Thread mottaz hejaze
just add 'polls' to the end of your installed apps in your settings.py On Wed, 25 Jul 2018, 13:23 Okware Aldo, wrote: > Did you include Polls app in INCLUDE_APPS section in settings. > > On Wed, 25 Jul 2018, 06:34 Ashish Kumar, wrote: > >> I am trying to follow the latest Django tutorial at

Re: syntax error

2018-07-25 Thread akash kandpal
In the she'll try this python import django print (django.VERSION) On Wed, Jul 25, 2018, 4:54 PM Akhil Reddy wrote: > So what is the solution for this pblm.. > > > On Wed 25 Jul, 2018 7:38 am deepali pandey, > wrote: > >> $ python -m django --version showing syntax error? also i am unable to

Re: Django makemigration polls error

2018-07-25 Thread Okware Aldo
Did you include Polls app in INCLUDE_APPS section in settings. On Wed, 25 Jul 2018, 06:34 Ashish Kumar, wrote: > I am trying to follow the latest Django tutorial at the documentation and > I faced the following error when I enter python manage.py makemigrations > polls > Traceback (most recent

Re: syntax error

2018-07-25 Thread Akhil Reddy
So what is the solution for this pblm.. On Wed 25 Jul, 2018 7:38 am deepali pandey, wrote: > $ python -m django --version showing syntax error? also i am unable to > create a file.. i am using python 3.7 and django is already installed in my > system, version of django is 2.0.7(which is

Re: Django makemigration polls error

2018-07-25 Thread theAloneOne
You may have missed a comma after *'polls.apps.PollsConfig'* in your settings.py file in the *INSTALLED_APPS* list so check it again and you may not be using the same django-version as used in documentation so get the latest if you are following latest docs release. -- You received this

Cannot pickle queryset with Subquery and OuterRef

2018-07-25 Thread mozinda
I am not able to cache or even pickle a queryset that has a Subquery or OuterRef. Getting the error: ValueError: This queryset contains a reference to an outer query and may only be used in a subquery. Here is my queryset: qs = self.queryset.filter(

Re: Optimizing Prefetch for Postgres IN Limit

2018-07-25 Thread Jason
Where do you get that in the pg documentation? I can't find that anywhere (google-fu may be failing me), and we do have some queries with more than 100 values using IN. On Tuesday, July 24, 2018 at 11:00:48 PM UTC-4, Ram Jayaraman wrote: > > Is there a prescribed pattern to optimize Prefetches

Re: Prevent Django tests from accessing internet (except localhost)

2018-07-25 Thread Gene
There is no such config, but you can make it through socket interface mocking https://stackoverflow.com/questions/18601828/python-block-network-connections-for-testing-purposes You can also split all tests into two groups: - unit tests - should run without internet and all required requests