Re: Custom Django Admin Pages

2018-08-20 Thread Vineet Kothari
It will be a bad practise you can disable dango admin and create a new app admin but it will require effortsSent from my Huawei Mobile Original Message Subject: Custom Django Admin PagesFrom: 'Kyle Mulka' via Django users To: Django users CC: Hi there,It seems like Django Admin is d

Custom Django Admin Pages

2018-08-20 Thread 'Kyle Mulka' via Django users
Hi there, It seems like Django Admin is designed to work with Django models. But, I'm wondering what the best way is to create custom admin pages that don't revolve around Django models. Like, maybe there's a third party API that I want admins to be able to call from the Django admin. What's th

Re: problems with order by month

2018-08-20 Thread Osvaldo Ruso Olea
You are a genius, thank you very much, it worked perfectly, I just made one more modification def cardio (request): now = timezone.now () cardio = Alumno.objects.filter ( fechanacimiento __month = now.month) context = {'cardio': cardio} return render (request, 'cardio.html', co

Problems with AbstractUser

2018-08-20 Thread Richard Pacheco
Hello Goodnight. I need to create a custom user model to be used in my django application, this in order to be able to place the fields that I need and in addition to be able to use the basic authentication methods that django already incorporates. The problem is that I do not clearly understa

RE: problems with order by month

2018-08-20 Thread Matthew Pava
Try this: cardio = Alumno.objects.filter(fechanacimiento__month=timezone.now().month) From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Osvaldo Ruso Olea Sent: Monday, August 20, 2018 2:58 PM To: Django users Subject: problems with order by month Hi how are

problems with order by month

2018-08-20 Thread Osvaldo Ruso Olea
Hi how are you, I have problems filtering and sorting by date, precisely per month. my intention is to filter the database for birthdays in the current month. def cardio(request): cardio = Alumno.objects.order_by('fechanacimiento') contexto = {'cardio':cardio} return render(request

Re: Django database problem

2018-08-20 Thread Jani Tiainen
Hi, Instead of doing everything by hand I would recommend doing a custom management command in Django. Because management commands live inside Django ecosystem you get full benefits of Django. Migrations to setup database tables from model definitions. Models and ORM to interact with database. (M

Re: Django database problem

2018-08-20 Thread Mikko Meronen
Hi and thanks for your help. I have tried postgress and now I have a problem using it. Here's my code following an error. I appreciate any help. def do(): x = 1 while x == 1: create_table() print('finding data') find_data() time.sleep(120) def create_table

Re: ValueError at /news/ Value: None must be instance of Model:

2018-08-20 Thread Mikhailo Keda
rest_framework_mongoengine was updated 1 year ago, according to djongo docs they have integration with Django Rest Framework, try to use Django Rest Framework instead of rest_framework_mongoengine. And you need debug the error. понеділок, 20 серпня 2018 р. 14:36:15 UTC+3 користувач Sagar написав

Re: ValueError at /news/ Value: None must be instance of Model:

2018-08-20 Thread Jason
> > We want to use NoSQL database insted of SQL database > Is your data relational, and are you going to be doing alot of joins? If so, using mongo will be a pain in your application for performance. I really hope you have a solid technical reason why to use mongo rather than "ITS WEBSCALE!!

Re: ValueError at /news/ Value: None must be instance of Model:

2018-08-20 Thread Sagar
Hi Mikhailo Yes you are right, but I didn't used django-nonrel or djangotoolbox. Those were totally outdated. I have used djongo which is updated as far as I know. About MongoDB, I'm working on project in which we used MongoDB. We want to use NoSQL database insted of SQL database. Did you work w

Re: regarding the installation

2018-08-20 Thread Irenge Mufungizi
You can simply type pip install django and it will download for you the required modules On Thursday, August 16, 2018 at 5:10:29 AM UTC-7, muthu sabarish wrote: > > how to download django ???can any one help me out ... > -- You received this message because you are subscribed to the Google Grou

Re: Possible bug: Querying a model with an IntegerField value of 0 using mysql-connector/python returns a queryset where the field value becomes a NoneType 2.0.3.0

2018-08-20 Thread Jason
rather than having your dev environment exist on two separate operating systems, you should use virtual machines with docker or vagrant for development. That way, your environment is identical through dev, staging and prod environments, except for env-specific settings. Consider this case, if

Re: How to filter *every* query on django?

2018-08-20 Thread Andréas Kühne
I don't know how django-tools solves it - but it usually is set for every request to the server. When running django you have 1 or more threads that run the server. Each thread can handle one request at a time - others get queued (you don't usually see this). So when the request is done the middle

Re: How to delete least recently used not expired django sessions?

2018-08-20 Thread Michal Petrucha
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On Fri, Aug 17, 2018 at 05:44:22AM -0700, Web Architect wrote: > Hi, > > We are using persistent django sessions for our website where in the > session information is stored in MySQL. Over last couple of years, the > session data has grown to a hu

Re: How to delete least recently used not expired django sessions?

2018-08-20 Thread Avraham Serour
maybe something like this could be useful for your use case: https://pypi.org/project/django-session-timeout/ it has an option for SESSION_EXPIRE_AFTER_LAST_ACTIVITY maybe this could also be useful for you: https://django-session-security.readthedocs.io/en/latest/ On Mon, Aug 20, 2018 at 8:34

Re: Possible bug: Querying a model with an IntegerField value of 0 using mysql-connector/python returns a queryset where the field value becomes a NoneType 2.0.3.0

2018-08-20 Thread Marcus Grass
Yeah I know it's recommended, but I can't for the life of my get that connector to work in windows. I program my project both in places where I only have windows and only Linux. On Mon, Aug 20, 2018 at 2:20 AM, Jason wrote: > that is indeed weird, but suggests its an issue with python-mysql-conn

Re: Fail to create Django registration form with email and password only

2018-08-20 Thread Mikhailo Keda
No need to change Django registration/authentication, you need to use it. Check this example - https://chat.mkeda.me/login?next=/ source code for registration/authentication - https://bitbucket.org/voron-raven/chat/src/f78b6531652f866109dbfa2f8aeffac6c0f1bb32/core/views.py#lines-247:283 Just set