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

2018-08-17 Thread Ángel Gabriel Morales Acosta
Hi Rohit, I think this can help you : https://stackoverflow.com/questions/40206569/django-model-doesnt-declare-an-explicit-app-label Check the arrowed solution. *---* *Ángel Gabriel Morales Acosta* Email: angel.gabriel...@gmail.com On Fri, Aug 17, 2018 at 4:53 PM Rohit Rana wrote: > I have cr

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

2018-08-17 Thread Mike Dewhirst
On 17/08/2018 10:44 PM, 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 huge number and we were planning to clean it up. I know that there is a djan

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

2018-08-17 Thread Ángel Gabriel Morales Acosta
Hi Bro.·. If I understand you, you can this: def any_func(..., *request*): ... .filter(created_user=*request*.user) more about : https://docs.djangoproject.com/en/2.1/ref/request-response/ Cheers Bro.·. *---* *Ángel Gabriel Morales Acosta* Email: angel.gabriel...@gmail.com On Fri, Aug

How to filter *every* query on django?

2018-08-17 Thread Fellipe Henrique
Hello guys... I have several model with FK with Django User so, I need to filter each query using: .filter(created_user=current)user) I do it, manually... how can do it, automatically? Thanks T.·.F.·.A.·. S+F *Fellipe Henrique P. Soares* e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe

Re: Django database problem

2018-08-17 Thread Mikhailo Keda
You could generate models from sqlite database - https://docs.djangoproject.com/en/2.1/howto/legacy-databases/ Than switch to PostgresQL -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails fr

Re: Django database problem

2018-08-17 Thread Okware Aldo
Mikko, Check out this link below, it will help you understand how to connect you Django project to any DB manager. https://docs.djangoproject.com/en/2.1/intro/tutorial02/ On Fri, Aug 17, 2018 at 6:55 PM Mikko Meronen wrote: > Hi, > > I'm quite new with django and python and I wish someone coul

Re: Django database problem

2018-08-17 Thread Anirudh Jain
You will have to create a database on your system first (it is better to use mysql instead of sqlite) and then run commands :- 1. python manage.py makemigrations 2. python manage.py migrate Also you will have to create forms (forms.ModelForm or forms.Forms) for taking input. On Fri, 17 Aug 2018,

Django database problem

2018-08-17 Thread Mikko Meronen
Hi, I'm quite new with django and python and I wish someone could help me. I'm building a webpage where my python program/bot collects data from webpages. Is there a way that I can use my python program to store the data to django's database? At the moment when I run my program, I collect the d

Re: template tag help please?

2018-08-17 Thread Mikhailo Keda
"Then in the template any number of arguments, separated by spaces, may be passed to the template tag." from the Documentation -- 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, sen

Re: template tag help please?

2018-08-17 Thread MikeKJ
Yes For example, in the filter {{ var|foo:"bar" }}, the filter foo would be passed the variable var and the argument "bar". I want to pass 2 (maybe 3) variables and correct me if I am wrong but Custom filters are just Python functions that take one or two arguments: So could do {

RE: template tag help please?

2018-08-17 Thread Mike Jones
Yes For example, in the filter {{ var|foo:"bar" }}, the filter foo would be passed the variable var and the argument "bar". I want to pass 2 (maybe 3) variables and correct me if I am wrong but Custom filters are just Python functions that take one or two arguments: So could do {{ v

Re: template tag help please?

2018-08-17 Thread Mikhailo Keda
Check the documentation - https://docs.djangoproject.com/ko/2.1/howto/custom-template-tags/ -- 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+unsubsc

How to delete least recently used not expired django sessions?

2018-08-17 Thread Web Architect
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 huge number and we were planning to clean it up. I know that there is a django management command 'clearsessions' and we are

Re: Google Api Client

2018-08-17 Thread madhusona
In Django I implemented social login using the social auth app and I followed this link to configure it. Goolge OAuth is working good; google-oauth2 access token is stored in extra data field. Now I want to list google dr

Re: Google Api Client

2018-08-17 Thread Jason
"not working" is a very vague description of your problem and not helpful at all in diagnosing the issue. give some details. when asking for help, the your job is to describe your problem in such a way that it gives enough information for others to identify possible things you're doing wrong..

Re: Help me with this, plz

2018-08-17 Thread Jason
the problem is 'NAME': os.path.join(BASE_DIR, 'Django_TestingDB'), you just want the db name, eg Django_TestingDB. No base_dir, no path, nothing. just the database name. https://docs.djangoproject.com/en/2.1/ref/settings/#std:setting-NAME > > -- You received this message because

template tag help please?

2018-08-17 Thread MikeKJ
I want to pass 2 variables to a templatetag from within a template, a name and a date (eg, John 29/09/2018) to output the result of the templatetag def. The reason I want to do this is: >From a list of all names: The name comes from a model that has a foreign key to another model that has act

Wrting rtl templates for my web site

2018-08-17 Thread Mohamed El-sayed
Hello Guys, I have a question related to rtl templates what i need is making a web site with heading rtl (Arabic language) and i don't know how to make it First i used the RTL boot strap version with out integrating with django just a normal HTML file and the output was as expected [image: Cap

Google Api Client

2018-08-17 Thread madhusona
Hi Am trying to implement Google API client for Django. I am following the link https://developers.google.com/api-client-library/python/guide/django but it was not working. Amusing python 3.5 and Django 2.0. It is very helpful if there is a new user manual to implement Django google API client.

Re: Unrecognizable error

2018-08-17 Thread Gerald Brown
I used to get this error if I was NOT in my virtual environment. On Friday, 17 August, 2018 12:54 PM, Vikrant Gupta wrote: I'm trying to migrate two Classes in Django using Pycharm. The error is as follow python manage.py makemigrations --name initial polls   File "manage.py", line 16     )fr

Apache runs wsgi module twice in case of public router ip and internal server ip ?

2018-08-17 Thread HEMENDRA SINGH HADA
We've below netwrok setup Internal server ip : 192.168.153.20:443 Public router ip : 111.93.87.11:26060 We've port forwarding in router : 111.93.87.11:26060 to 192.168.153.20:443 So when we first access 192.168.153.20:443(Internal server ip) it runs/execute django application ( First time ) Now

Re: Help me with this, plz

2018-08-17 Thread mazz ahmed
what do you want to do? if you want to learn use youtube and udemy stuff On Fri, Aug 17, 2018 at 12:44 PM, mazz ahmed wrote: > use pycharm to work with django > > On Fri, Aug 17, 2018 at 12:06 PM, Vikrant Gupta > wrote: > >> Man, I don’t know what to do now. Creating new projects many times. >

Re: Help me with this, plz

2018-08-17 Thread mazz ahmed
use pycharm to work with django On Fri, Aug 17, 2018 at 12:06 PM, Vikrant Gupta wrote: > Man, I don’t know what to do now. Creating new projects many times. Trying > to solve the problem in many ways. How to do? I’m looking for a way to do > it on Visual studio 2017 for Mac. Unfortunately, Pytho

Re: Help me with this, plz

2018-08-17 Thread Vikrant Gupta
Man, I don’t know what to do now. Creating new projects many times. Trying to solve the problem in many ways. How to do? I’m looking for a way to do it on Visual studio 2017 for Mac. Unfortunately, Python is not available build in VS for Mac. Is there any way to do it. > On Aug 17, 2018, at 12:

Re: Help me with this, plz

2018-08-17 Thread mazz ahmed
On Fri, Aug 17, 2018 at 11:30 AM, mazz ahmed wrote: > it is related to your database configure in the setting.py > > On Fri, Aug 17, 2018 at 11:28 AM, Vikrant Gupta > wrote: > >> I tried it. Showing following error… >> >> >> Python manage.py migrate >> >> Traceback (most recent call last): >>