Re: Django Microsoft Authentication Backend not succeeding on new deployments

2021-01-23 Thread Ryan Nowakowski
On Sat, Jan 23, 2021 at 11:05:14AM -0800, Larry Martell wrote:
> On Sat, Jan 23, 2021 at 8:14 AM Ryan Nowakowski  wrote:
> >
> > A couple of places to look:
> >
> > 1. Different domains on the new boxes? You'll need to add the new callback 
> > urls on the Microsoft side.
> > 2. Different version of Python on the new boxes?
> 
> Same domain name, same version of python and all python packages.
> There are some minor revision differences in a bunch of OS level
> packages. Could that be a factor?
> 

Did you create your virtualenv with --system-site-packages?  If not then
I don't think the OS packages will be a factor.

-- 
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 visit 
https://groups.google.com/d/msgid/django-users/20210124034136.GF9805%40fattuba.com.


Re: Django Microsoft Authentication Backend not succeeding on new deployments

2021-01-23 Thread Larry Martell
On Sat, Jan 23, 2021 at 8:14 AM Ryan Nowakowski  wrote:
>
> A couple of places to look:
>
> 1. Different domains on the new boxes? You'll need to add the new callback 
> urls on the Microsoft side.
> 2. Different version of Python on the new boxes?

Same domain name, same version of python and all python packages.
There are some minor revision differences in a bunch of OS level
packages. Could that be a factor?

>
> On January 22, 2021 2:51:30 PM CST, Larry Martell  
> wrote:
>>
>> I have an app deployed in many places and it uses Django Microsoft 
>> Authentication Backend. Starting yesterday when we deploy the app the auth 
>> is now not working. We get back Failed to authenticate you for an unknown 
>> reason. Please try again later. We can see in the azure logs that the login 
>> was successful. We have the same version of Django Microsoft Authentication 
>> Backend installed, but for some reason on newly built boxes it is failing 
>> but older ones it is succeeding. What could be causing this? What can we 
>> check to track down what the issue may be?
>
> --
> 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 visit 
> https://groups.google.com/d/msgid/django-users/963BCE7D-841C-4433-9081-55906AE11F31%40fattuba.com.

-- 
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 visit 
https://groups.google.com/d/msgid/django-users/CACwCsY6A-tBxEVFWLp5TWju2BgZPtp_vh0bVKJ1aCtJENEOWiw%40mail.gmail.com.


Django Accountancy Desktop App Inspired By Xero

2021-01-23 Thread Ross Meredith


Hi guys,

I have just finished my first ever full stack web app, which is built with 
django of course. It is an open source accountancy app based partly on 
Xero, one of the leading products in the market, but with some differences. 
It is by no means a complete accountancy system but I hope it would serve 
as a good basis for one.

The live demo (also on the github repo mentioned below) is at - 
https://django-accounts-1.herokuapp.com/ 
 if 
you want to check it out. There is no need to supply your email address to 
sign up.

There is also the option to deploy to our own dyno on Heroku if don't want 
to share data with randomers. Again the link is in the github repo below.

I welcome any constructive feedback. Especially since I would like to 
switch careers to web development sooner rather than later.

Hope you enjoy it!

Github repo - https://github.com/rossm6/accounts

P.S.

Please view the website in the latest Chrome, Firefox or Edge browser. 
Safari has not been tested but probably works. It is also built for the 
desktop and not smaller screens.

-- 
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 visit 
https://groups.google.com/d/msgid/django-users/bf92c304-1893-435b-ba07-876d63857cd0n%40googlegroups.com.


Getting error "undefined symbol: OGR_F_GetFieldAsInteger64"

2021-01-23 Thread Kavindu Gimhan Zoysa
Hi all,

After I install *psycopg2, *I am getting below error. My package list is 
shown below. Really appreciate the support of the community to fix this 
issue.
*python: 3.6.5*

*packages:*
PackageVersion
-- ---
asgiref3.3.1
Django 3.1.5
django-leaflet 0.27.1
pip20.3.4
psycopg2   2.7.3
pytz   2020.5
setuptools 51.3.3
sqlparse   0.4.1
wheel  0.36.2

*error:*
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/site-packages/django/contrib/auth/models.py",
 
line 2, in 
from django.contrib.auth.base_user import AbstractBaseUser, 
BaseUserManager
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/site-packages/django/contrib/auth/base_user.py",
 
line 48, in 
class AbstractBaseUser(models.Model):
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/site-packages/django/db/models/base.py",
 
line 122, in __new__
new_class.add_to_class('_meta', Options(meta, app_label))
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/site-packages/django/db/models/base.py",
 
line 326, in add_to_class
value.contribute_to_class(cls, name)
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/site-packages/django/db/models/options.py",
 
line 206, in contribute_to_class
self.db_table = truncate_name(self.db_table, 
connection.ops.max_name_length())
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/site-packages/django/db/__init__.py",
 
line 28, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/site-packages/django/db/utils.py",
 
line 214, in __getitem__
backend = load_backend(db['ENGINE'])
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/site-packages/django/db/utils.py",
 
line 111, in load_backend
return import_module('%s.base' % backend_name)
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/importlib/__init__.py",
 
line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/site-packages/django/contrib/gis/db/backends/postgis/base.py",
 
line 6, in 
from .features import DatabaseFeatures
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/site-packages/django/contrib/gis/db/backends/postgis/features.py",
 
line 1, in 
from django.contrib.gis.db.backends.base.features import 
BaseSpatialFeatures
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/site-packages/django/contrib/gis/db/backends/base/features.py",
 
line 3, in 
from django.contrib.gis.db import models
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/site-packages/django/contrib/gis/db/models/__init__.py",
 
line 3, in 
import django.contrib.gis.db.models.functions  # NOQA
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/site-packages/django/contrib/gis/db/models/functions.py",
 
line 3, in 
from django.contrib.gis.db.models.fields import BaseSpatialField, 
GeometryField
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/site-packages/django/contrib/gis/db/models/fields.py",
 
line 3, in 
from django.contrib.gis import forms, gdal
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/site-packages/django/contrib/gis/forms/__init__.py",
 
line 3, in 
from .fields import (  # NOQA
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/site-packages/django/contrib/gis/forms/fields.py",
 
line 2, in 
from django.contrib.gis.gdal import GDALException
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/site-packages/django/contrib/gis/gdal/__init__.py",
 
line 28, in 
from django.contrib.gis.gdal.datasource import DataSource
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/site-packages/django/contrib/gis/gdal/datasource.py",
 
line 39, in 
from django.contrib.gis.gdal.driver import Driver
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/site-packages/django/contrib/gis/gdal/driver.py",
 
line 5, in 
from django.contrib.gis.gdal.prototypes import ds as vcapi, raster as 
rcapi
  File 
"/home/kavindu/Projects/map-engine/map-engine/lib/python3.6/site-packages/django/contrib/gis/gdal/prototypes/ds.py",
 
line 71, in 
get_field_as_integer64 = int64_output(lgdal.OGR_F_GetFieldAsInteger64, 
[c_void_p, c_int])
  File "/home/kavindu/anaconda3/lib/python3.6/ctypes/__init__.py", line 
361, in __getattr__
func = self.__getitem__(name)
  File "/home/kavindu/anaconda3/lib/python3.6/ctypes/__init__.py", line 
366, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/lib/libgdal.so.1: undefined symbol: 
OGR_F_GetFieldAsInteger64


Thank you in advance,
Kavindu

-- 
You received this message because you are 

Re: Django Microsoft Authentication Backend not succeeding on new deployments

2021-01-23 Thread Ryan Nowakowski
A couple of places to look:

1. Different domains on the new boxes? You'll need to add the new callback urls 
on the Microsoft side.
2. Different version of Python on the new boxes?

On January 22, 2021 2:51:30 PM CST, Larry Martell  
wrote:
>I have an app deployed in many places and it uses Django Microsoft
>Authentication Backend. Starting yesterday when we deploy the app the
>auth
>is now not working. We get back Failed to authenticate you for an
>unknown
>reason. Please try again later. We can see in the azure logs that the
>login
>was successful. We have the same version of Django Microsoft
>Authentication
>Backend installed, but for some reason on newly built boxes it is
>failing
>but older ones it is succeeding. What could be causing this? What can
>we
>check to track down what the issue may be?
>
>-- 
>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 visit
>https://groups.google.com/d/msgid/django-users/CACwCsY7LB6ZUHfCDYRZJVHquFp1ZcMajUggCNWASLHLkwT2q_w%40mail.gmail.com.

-- 
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 visit 
https://groups.google.com/d/msgid/django-users/963BCE7D-841C-4433-9081-55906AE11F31%40fattuba.com.


Re: Classifieds page loading is to slow

2021-01-23 Thread Ryan Nowakowski
I recommend profiling the app to figure out exactly what part is slowing you 
down before you do any optimization.

On January 14, 2021 9:17:46 PM CST, Salima Begum  
wrote:
>Hi all,
>
>We are building a Web application, We have a classifieds page that is
>loading too slow. How to fix this issue. how to reduce loading time of
>classifieds page.
>
>Thanks
>~Salima
>
>-- 
>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 visit
>https://groups.google.com/d/msgid/django-users/CAMSz6bnvP51oD_dfhY0YEWiGHGq3DbZ04u%2Bz6Vg_9sBPGvjgOw%40mail.gmail.com.

-- 
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 visit 
https://groups.google.com/d/msgid/django-users/812D6B42-F048-4153-AC7A-D58C37C7C3B7%40fattuba.com.


Re: SonarQube and Python/Django Code Analysis

2021-01-23 Thread Ryan Nowakowski
We use SonarCube for Python although not Django. Our QA team seems to like it.

On January 21, 2021 6:46:32 AM CST, Sachin Kumar  
wrote:
>Hi Experts,
>
>I am trying to do code analysis through Sonarqube. Please if anything 
>better that SonarQube to Analysis Python/Django  Code. Please advise. 
>
>
>-- 
>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 visit
>https://groups.google.com/d/msgid/django-users/b3c8b778-3ab7-4454-87ae-3eb486b4ca68n%40googlegroups.com.

-- 
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 visit 
https://groups.google.com/d/msgid/django-users/221B700D-7265-4B79-8DA8-E23A7E309FBF%40fattuba.com.


Re: Django django_filters DateFilter customization

2021-01-23 Thread Kasper Laudrup

Hi Mayank,

On 22/01/2021 23.43, _M_A_Y_A_N_K_ wrote:

Thanks Kasper,

I utilized the suggestion you shared, and implemented it with a custom 
template tag, and now am able to restrict it.




You are very welcome. Glad to hear it worked for you and thanks for 
sharing your solution.


All the best.

Kasper Laudrup

--
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 visit 
https://groups.google.com/d/msgid/django-users/63445a26-8c67-8e68-ffc1-ae64808fd4de%40stacktrace.dk.