custom filter tag I can't get to work

2018-12-05 Thread Rookies DJ
I create my own custom filter tags to using in my project but every time i put in my HTML it just product this errors Invalid filter: I don't where i do wrong, I try putting the {%load tag%} with child templates, it didn't work I try name it differently @register.filter("multiply", multiply)

Re: Use an aggregation function's filter with aggregate of a value from an annotation with a subquery

2018-12-05 Thread Simon Charette
Hello Daniel, It's hard to tell was causes the exception without digging a bit more but based on your mention of multiple sums I assume you are trying to work around the cross join of multiple table annotations? I understand you simplified your query but from what I can see right now it can be ex

Re: How to extract a number from a url

2018-12-05 Thread Sourajit Mohanty
I am using Model forms.. class CreateSong(CreateView) model=Song fields=['song_title'] So this class is gonna call the model Song class..how can i pass the album_id?? On Thu 6 Dec, 2018, 9:13 AM Pankaj Kumar Try using regular expression (?P[0-9]+) > similar to this: > > url(r'^m

Re: How to extract a number from a url

2018-12-05 Thread Pankaj Kumar
Try using regular expression (?P[0-9]+) similar to this: url(r'^music/(?P[0-9]+)/newsongs$', views.your_view_function()) cheers! On 12/6/18, Sourajit Mohanty wrote: > I am working with Class based Views..so I dont think this is gonna work > > On Thu 6 Dec, 2018, 2:33 AM shiva kumar wrote: >

RE: Use an aggregation function's filter with aggregate of a value from an annotation with a subquery

2018-12-05 Thread Matthew Pava
Though I can’t address the issue of whether it is a bug, there is a note in the documentation: https://docs.djangoproject.com/en/2.1/topics/db/aggregation/#filtering-on-annotations “Avoid using the filter argument…” You may want to consider conditional expressions (Case … When) to achieve your

Use an aggregation function's filter with aggregate of a value from an annotation with a subquery

2018-12-05 Thread Daniel Gilge
Hi, I think I've found a bug. But I'm not sure and I never opened a ticket for Django before. So, I first wanted to ask here. I'm using Django 2.0 and this doesn't work: subquery = Subquery( Vote.objects .filter(comment=OuterRef('pk')) .values('value')[:1] ) Comment.objects.annotat

Generar PDF con Django 2.1 (Portrait y Landscape, Vertical y Horizontal)

2018-12-05 Thread Ing.Daniel Bojorge
https://debsconsultores.blogspot.com/2018/12/generar-pdf-con-django-21-vertical-y.html Dios L@s Bendiga Saludos, [image: --] daniel.bojorge [image: http://]about.me/daniel.bojorge *Curso Desarrollo Web con Python usando Django 2.1 Para Princi

Re: How to extract a number from a url

2018-12-05 Thread Sourajit Mohanty
I am working with Class based Views..so I dont think this is gonna work On Thu 6 Dec, 2018, 2:33 AM shiva kumar Use > > in place of number > > An add extra parameter in views which u will relate this to > > On Thu 6 Dec, 2018 2:18 am Sourajit Mohanty >> I want to extract the number from this u

Re: How to extract a number from a url

2018-12-05 Thread shiva kumar
Use in place of number An add extra parameter in views which u will relate this to On Thu 6 Dec, 2018 2:18 am Sourajit Mohanty I want to extract the number from this url 'music/6/newsongs/' so that I > can use that number to redirect it to another page.. > How can I do that?? > > -- > You rec

How to extract a number from a url

2018-12-05 Thread Sourajit Mohanty
I want to extract the number from this url 'music/6/newsongs/' so that I can use that number to redirect it to another page.. How can I do that?? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: Dango Im,voip and video calls

2018-12-05 Thread Henry U
Thanks I am already considering webrtc, however how to configure it to work with Django is where I'm having challenges. Any suggestions will help -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receivi

Re: left join with and condition

2018-12-05 Thread Mark Phillips
Take a look at 'Q objects' in the django documentation - https://docs.djangoproject.com/en/2.1/ref/models/querysets/#django.db.models.Q Perhaps F objects will help. https://docs.djangoproject.com/en/2.1/ref/models/expressions/#django.db.models.F Mark On Wed, Dec 5, 2018 at 9:12 AM Arnaldo Díaz M

left join with and condition

2018-12-05 Thread Arnaldo Díaz Molina
Hello and thanks in advanced, I am using Django 1.11 ORM. I need to make this SQL query: SELECT model1.field1, sum(model2.field1), sum(model2.field2) FROM model1 LEFT JOIN model2 on model2.model1_id=model1.id and model2.date='2018-12-02' group by model1.field1 I have used annotations for this ki

Re: django.core.exceptions.ImproperlyConfigured: Requested setting AUTH_USER_MODEL, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call sett

2018-12-05 Thread Ryan Nowakowski
I'm not quite sure what you're trying to do. Are you trying to run views.py? On December 5, 2018 6:21:06 AM CST, Tushar Khairnar wrote: >C:\Python\python.exe "D:/Python/django reset >framework/secondtestdjrstapi/users/views.py" >Traceback (most recent call last): > File "D:/Python/django reset

Re: Integrating ml in django

2018-12-05 Thread kennedy kay
Yes friend...You can always preprocess you data with a python script at the backend. You can as well use machine predictive modeling, clustering and classification algorithms using sklearn, pandas and numpy libraries. This is no problem at all so long it is all in python. Django can output it a

Re: Integrating ml in django

2018-12-05 Thread Ryan Nowakowski
You can use any Python library with Django so you can use numpy and tensorflow. On December 4, 2018 11:55:08 AM CST, shiva kumar wrote: >I have one doubt regarding django. That, can we use ml concepts and >packages in django as our backend technology >That is by using ml concepts like numpy, ten

Re: Problem

2018-12-05 Thread Ryan Nowakowski
Perhaps go back through the tutorial carefully double checking each step. Did you add polls to settings.py? Is your polls/urls.py file named correctly? On December 5, 2018 6:30:50 AM CST, David Figueroa wrote: > >David Figueroa *por * >

Re: Dango Im,voip and video calls

2018-12-05 Thread Ryan Nowakowski
Wow, that's quite an advanced project for a beginner! For instant messaging I'd look at websockets and Django channels. For VoIP and video, take a look at webrtc. On December 5, 2018 2:18:00 AM CST, Henry U wrote: >Hi >I'm new to Django and programming in general. As a learner, I am >working on

Re: Problem

2018-12-05 Thread kennedy kay
Hi David, I suggest you look at this git project Perhaps it could help https://github.com/divio/django-polls/tree/master/polls Cheers! On Wednesday, December 5, 2018 at 1:30:50 PM UTC+1, David Figueroa wrote: > > > David Figueroa *por * >

Re: Problem Basic

2018-12-05 Thread Thiago Brito
Cara, tenta usar esta versão https://docs.djangoproject.com/pt-br/2.1/intro/tutorial01/ A que você está utilizando é antiga Em ter, 4 de dez de 2018 às 23:55, David Figueroa < davidfigueroalaf...@gmail.com> escreveu: > > > *Na criação de meu primeiro projeto django- estou tentando criar minha > p

Re: About due date update Issue.

2018-12-05 Thread Jason
I would suggest you read https://stackoverflow.com/help/how-to-ask and restructure your original question. What you've provided above is not enough for anyone to give quality suggestions to your problem. -- You received this message because you are subscribed to the Google Groups "Django use

django.core.exceptions.ImproperlyConfigured: Requested setting AUTH_USER_MODEL, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings

2018-12-05 Thread Tushar Khairnar
C:\Python\python.exe "D:/Python/django reset framework/secondtestdjrstapi/users/views.py" Traceback (most recent call last): File "D:/Python/django reset framework/secondtestdjrstapi/users/views.py", line 2, in from rest_framework.authtoken.models import Token File "C:\Python\lib\site-pa

Re: Problem Basic

2018-12-05 Thread David Figueroa
fiz a mudança que sugeristes e nada, continua dando o mesmo erro! Em quarta-feira, 5 de dezembro de 2018 09:16:41 UTC-3, Thiago Brito escreveu: > > Fala David, conseguiu? > > tenta mudar o caminho > url(r'^polls/', include('polls.urls')), > url(r'^admin/', admin.site.urls), > > pra isso > > fro

About due date update Issue.

2018-12-05 Thread Pawan Acharya
When i tried to update due date for ex:(12/31/2018) where due date is evaluated through algorithm. The array of due date is created and latest due date should match to given due date in column.. So can anyone help in this ASAP.. Attached screen shot. [image: Capture.PNG] -- You received this

Dango Im,voip and video calls

2018-12-05 Thread Henry U
Hi I'm new to Django and programming in general. As a learner, I am working on a dating site project that will require instant messaging, voip and video calls. However I don't know how to implement this into my Django project. Please can you explain how I can achieve this. Also if possible rec

Re: Problem Basic

2018-12-05 Thread Thiago Brito
Fala David, conseguiu? tenta mudar o caminho url(r'^polls/', include('polls.urls')), url(r'^admin/', admin.site.urls), pra isso from django.urls import path path('polls/', include('polls.urls')), path('admin/', admin.site.urls), Em ter, 4 de dez de 2018 às 23:55, David Figueroa < davidfiguer

Re: from django.urls import include , path ImportError: cannot import name include

2018-12-05 Thread رهام صادقی
Hi, note that path is only works on django with version > 2.0 for more information about path check following link: https://docs.djangoproject.com/en/2.1/ref/urls/ ‫‪Dheeraj Kumar‬‏ <‪talk...@gmail.com‬‏> در تاریخ چهارشنبه ۵ دسامبر ۲۰۱۸ ساعت ۱۱:۳۳ نوشت:‬ > It won't work. > now i changed here is a

Re: How to get queryset from get method

2018-12-05 Thread Thiago Luiz Parolin
Thanks!! This site is awesome and will help me a lot > Em 4 de dez de 2018, às 16:05, Gerson David Vizquel Alemán > escreveu: > > Hello Thiago, review this link: http://ccbv.co.uk/ > > El martes, 4 de diciembre de 2018, 8:38:24 (UTC-4), thiago.parolin escribió: >> >> I have a class (Update

Re: from django.urls import include , path ImportError: cannot import name include

2018-12-05 Thread Dheeraj Kumar
It won't work. now i changed here is and working fine.. from django.contrib import admin from django.conf.urls import url, include urlpatterns = [ url (r'^boadts/', include ('boadts.urls')), url (r'^admin/',admin.site.urls), ] and in apps from django.conf.urls import url from .import vi