Re: Increasing iteration count for the PBKDF2 password hasher

2024-05-23 Thread Mike Dewhirst
On 23/05/2024 6:12 pm, Shaheed Haque wrote: Hi, As happens from time-to-time, I see the 5.1 alpha recently announced has increased the iteration count for the PBKDF2 password hasher (from 720k to 870k), and the putative release notes for 5.2 mention a further increase (to 1M). I assume

Increasing iteration count for the PBKDF2 password hasher

2024-05-23 Thread Shaheed Haque
Hi, As happens from time-to-time, I see the 5.1 alpha recently announced has increased the iteration count for the PBKDF2 password hasher (from 720k to 870k), and the putative release notes for 5.2 mention a further increase (to 1M). I assume this iteration count has something to do with the

Django-annotate(),Count()

2023-01-12 Thread Priya
Hi Everyone, This is the output i get used this code https://groups.google.com/d/msgid/django-users/95dedc5d-5f24-4b57-b525-248c01953bddn%40googlegroups.com.

Queryset for get all objects with count of some of them.

2022-07-25 Thread Sencer Hamarat
Hi, Is there a way to get all model objects, but including count of some of them within one db transaction. Say, I have this model: class AModel(models.Model): field_choices = ( (0, "a"), (1, "b"), (2, "c") ) field_one =

Re: After user click on like button page should not refresh(redirect) and update count of likes

2021-05-05 Thread Aadil Rashid
:30:59 UTC+2 sali...@rohteksolutions.com > wrote: > >> When user click to like a post the web page should not refresh(redirect) >> and count of the likes should be updated. >> How can I achieve this please help me. >> >> Here is my block of code >> ``` >> &g

Re: After user click on like button page should not refresh(redirect) and update count of likes

2021-05-05 Thread Derek
You'll need to use javascript for this - have a look at https://data-flair.training/blogs/ajax-in-django/ for an example. On Wednesday, 5 May 2021 at 05:30:59 UTC+2 sali...@rohteksolutions.com wrote: > When user click to like a post the web page should not refresh(redirect) > and c

After user click on like button page should not refresh(redirect) and update count of likes

2021-05-04 Thread Salima Begum
When user click to like a post the web page should not refresh(redirect) and count of the likes should be updated. How can I achieve this please help me. Here is my block of code ``` ``` views.py ``` def post_comment_like(request, id): if

how to store count value in python(django)?

2021-02-07 Thread Shailesh Yadav
Hi Everyone, Can you please look into below Stackoverflow question and let me know how I can define count list in *DB *and use it in view and reset it based on some time duration. Now I have defined it globally and it is working fine but the problem is when else block is executing it is not

Django Aggregate(annotate, count) is working differently.

2020-06-17 Thread Himanshu Pharawal
ts.annotate(key=Lower('keyword')).values('key' )) sponsored_books = models.SponsoredBook.objects.annotate(tit=Lower( 'keywords__title')).filter(tit__in=sub).annotate(points=Count('id')). order_by('points')[:6] all_sponsored_books = models.SponsoredBook

Re: How to create a function like Count

2020-05-26 Thread Kushal Neupane
I think this in template will help you. Total Table Numbers {{tableNumber_total}} On Tue, May 26, 2020 at 10:50 AM Saurabh Adhikary wrote: > I want to create a custom function which will get modified into a sql > querry and will work like Count ...i.e. for every row of the qu

How to create a function like Count

2020-05-25 Thread Saurabh Adhikary
I want to create a custom function which will get modified into a sql querry and will work like Count ...i.e. for every row of the queryset -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: How to count total number of student to display in template

2020-04-30 Thread lumwakapuku
Okeyy you are welcomeSent from Samsung tablet. Original message From: Kushal Neupane Date: 30/04/2020 16:43 (GMT+03:00) To: django-users@googlegroups.com Subject: Re: How to count total number of student to display in template Thank you sir.😊On Thu, Apr 30, 2020, 19:28

Re: How to count total number of student to display in template

2020-04-30 Thread Kushal Neupane
;:Tt_student } > Return render(request, "your templete here", context) > > In you templete render it as > {{ Tt_student }} > > > > Sent from Samsung tablet. > > > Original message > From: Kushal Neupane > Date: 30/04/2020 1

RE: How to count total number of student to display in template

2020-04-30 Thread lumwakapuku
ete render it as {{ Tt_student  }}Sent from Samsung tablet. Original message From: Kushal Neupane Date: 30/04/2020 16:20 (GMT+03:00) To: Django users Subject: How to count total number of student to display in template The following are  the models and template where i w

How to count total number of student to display in template

2020-04-30 Thread Kushal Neupane
The following are the models and template where i wnat to display the count. The displayed is static. Now, i wanna make dynamic. Thank you. Help me. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

Re: user visit count

2020-04-16 Thread Motaz Hejaze
id and put >> number_of_visits column = 1 >> >> On Wed, Apr 15, 2020 at 2:29 PM shreehari Vaasistha L < >> shreeh...@gmail.com> wrote: >> >>> Thank you! >>> But can there be any simple implementation as i just want to count >>> number of tim

Re: user visit count

2020-04-15 Thread shreehari Vaasistha L
te: > >> Thank you! >> But can there be any simple implementation as i just want to count number >> of times a user has viewed a post >> >> On Wednesday, April 15, 2020 at 5:48:36 PM UTC+5:30, Tim Wilson wrote: >>> >>> I'm planning to use django

Re: user visit count

2020-04-15 Thread shreehari Vaasistha L
sits column = 1 > > On Wed, Apr 15, 2020 at 2:29 PM shreehari Vaasistha L > wrote: > >> Thank you! >> But can there be any simple implementation as i just want to count number >> of times a user has viewed a post >> >> On Wednesday, April 15, 2020 at 5:4

Re: user visit count

2020-04-15 Thread Motaz Hejaze
a new row with object.id and user.id and put number_of_visits column = 1 On Wed, Apr 15, 2020 at 2:29 PM shreehari Vaasistha L < shreehari9...@gmail.com> wrote: > Thank you! > But can there be any simple implementation as i just want to count number > of times a user has viewed a p

Re: user visit count

2020-04-15 Thread shreehari Vaasistha L
Thank you! But can there be any simple implementation as i just want to count number of times a user has viewed a post On Wednesday, April 15, 2020 at 5:48:36 PM UTC+5:30, Tim Wilson wrote: > > I'm planning to use django-hitcount too, but please be aware that it's not >

Re: user visit count

2020-04-15 Thread shreehari Vaasistha L
not > yet compatible with Django 3.x. There's a patch that needs to be applied > and a release forthcoming that should take care of it. > > -Tim > > On Wed, Apr 15, 2020, at 4:38 AM, Omkar Parab wrote: > > Django hit count package will help you.. > > On W

Re: user visit count

2020-04-15 Thread Tim Wilson
I'm planning to use django-hitcount too, but please be aware that it's not yet compatible with Django 3.x. There's a patch that needs to be applied and a release forthcoming that should take care of it. -Tim On Wed, Apr 15, 2020, at 4:38 AM, Omkar Parab wrote: > Django hit

Re: user visit count

2020-04-15 Thread Omkar Parab
Django hit count package will help you.. On Wed, Apr 15, 2020, 1:09 PM shreehari Vaasistha L wrote: > how can i get the number of views of an endpoint by a single user. > > -- > You received this message because you are subscribed to the Google Groups > "Django users"

user visit count

2020-04-15 Thread shreehari Vaasistha L
how can i get the number of views of an endpoint by a single user. -- 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

Re: Count the number of emails sent everyday

2020-03-13 Thread Santhosh Sridharan
ls to multiple email IDs in >> different scenarios, Is there a way to get the count of emails sent >> everyday instead of storing it in tables. >> >> Regards, >> Santhosh >> >> -- >> You received this message because you are subscribed to the Google Groups &g

Re: Count the number of emails sent everyday

2020-03-13 Thread Suraj Thapa FC
You can use some 3rd party apis On Fri, 13 Mar 2020, 4:42 pm Santhosh sridhar, wrote: > Hi, > I am working on django and I trigger emails to multiple email IDs in > different scenarios, Is there a way to get the count of emails sent > everyday instead of storing it in tables.

Count the number of emails sent everyday

2020-03-13 Thread Santhosh sridhar
Hi, I am working on django and I trigger emails to multiple email IDs in different scenarios, Is there a way to get the count of emails sent everyday instead of storing it in tables. Regards, Santhosh -- You received this message because you are subscribed to the Google Groups "Django

Re: How to write raw SQL or ORM for Count

2019-12-12 Thread Dvs Khamele
Hi We are worlds first affordable Python, Django Based Web Developement Startup. And can help you in this and related tasks / projects immidiately mere at $7 per hour. On Mon, 2 Dec 2019 at 19:13, xiaopeng luo wrote: > I am new to django ORM, I want query something like this: > > input: > AAA

Re: How to write raw SQL or ORM for Count

2019-12-02 Thread Luqman Shofuleji
You need to do some little reading about Django aggregation https://docs.djangoproject.com/en/2.2/topics/db/aggregation/#topics-db-aggregation Example from django.db.models import Max, Count, Sum Publisher.objects.values('name').annotate(*dcount*=Count('name')) As seen

Re: How to write raw SQL or ORM for Count

2019-12-02 Thread RONAK JAIN
What you want to hear please cear that one.. Thanks On Mon, 2 Dec 2019, 19:13 xiaopeng luo, wrote: > I am new to django ORM, I want query something like this: > > input: > AAAfemale1 > AAAfemale2 > BBBmale 1 > BBBmale 3 > AAAmale 2 > > > > output >

How to write raw SQL or ORM for Count

2019-12-02 Thread xiaopeng luo
I am new to django ORM, I want query something like this: input: AAAfemale1 AAAfemale2 BBBmale 1 BBBmale 3 AAAmale 2 output AAAfemale3 AAAmale 2 BBBmale 4 Sorry, my english is not good. Thanks for everyone help me. --

Increase Count Value

2019-08-22 Thread Soumen Khatua
Hi Folks, I want to increase count value of a record after ftech the record each time in django rest framework. *This is my model.py* *class Dataset(models.Model):name = models.CharField(max_length = 100) number = models.IntegerField()hits = models.IntegerField(default = 0)* *api

Re: Disable count admin

2019-06-13 Thread Michele Gatti
Thansk Il giorno sab 8 giu 2019 alle ore 09:03 Derek ha scritto: > Can you use: > > > https://docs.djangoproject.com/en/1.8/ref/contrib/admin/#django.contrib.admin.ModelAdmin.show_full_result_count > > > On Monday, 3 June 2019 14:48:23 UTC+2, Michele Gatti wrote: >> >> Hi i need to disable pagin

Re: Disable count admin

2019-06-08 Thread Derek
Can you use: https://docs.djangoproject.com/en/1.8/ref/contrib/admin/#django.contrib.admin.ModelAdmin.show_full_result_count On Monday, 3 June 2019 14:48:23 UTC+2, Michele Gatti wrote: > > Hi i need to disable paginato on django admin with not managed model. > Is possible? > -- You received th

Disable count admin

2019-06-03 Thread Michele Gatti
Hi i need to disable paginato on django admin with not managed model. Is possible? -- 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...@googl

Re: Channels thread count is increasing

2018-09-17 Thread Andrew Godwin
o python and django. > I am using Python 3.6.5, Django 2.1 and Channels 2.1.2. > My problem is when I switch to ASGI from WSGI server, in every request, > thread count is increasing. Same thing is happening when I use > sync_to_async function in consumers.py. Is this a normal behaviour? &

Re: Channels thread count is increasing

2018-09-16 Thread erkin kabataş
Hi, I followed the channels documentation, you can check from here: https://channels.readthedocs.io/en/latest/tutorial/part_1.html After completing this part, in every page refresh, thread count is increasing at top 23. 16 Eylül 2018 Pazar 06:05:02 UTC+3 tarihinde vs704263 yazdı: > > I

Re: Channels thread count is increasing

2018-09-15 Thread vishal sharma
n every request, > thread count is increasing. Same thing is happening when I use > sync_to_async function in consumers.py. Is this a normal behaviour? > > Thanks, > Erkin > > -- > You received this message because you are subscribed to the Google Groups > "Django use

Channels thread count is increasing

2018-09-15 Thread erkin kabataş
Hi All, I am new to python and django. I am using Python 3.6.5, Django 2.1 and Channels 2.1.2. My problem is when I switch to ASGI from WSGI server, in every request, thread count is increasing. Same thing is happening when I use sync_to_async function in consumers.py. Is this a normal

RE: Validating count + property of a Many2Many with a through table

2018-07-31 Thread Matthew Pava
Subject: Validating count + property of a Many2Many with a through table Hello! This is more of a code organization question than a "something is not working" question - it might get slightly rambling, so if this kind of question is not your cup of tea, you have been warned :-) So

Validating count + property of a Many2Many with a through table

2018-07-31 Thread Sanjay Bhangar
Hello! This is more of a code organization question than a "something is not working" question - it might get slightly rambling, so if this kind of question is not your cup of tea, you have been warned :-) So - I have a set of models like this (highly simplified): class Item(models.Model): tit

Re: Issue with comparison of Count outcome in queryset

2018-07-05 Thread Magnus Ljungkrantz
Actually, I tried to do it that way but I never got it working. Not sure what is different now but this is what I have working for me now: qs = qs.values('make').annotate(model_count=Count('model', distinct=True)). annotate( more_than_one_model=Case( When(mod

Re: Issue with comparison of Count outcome in queryset

2018-07-05 Thread Jason
try making two separate annotates: one for count and one for the case-when qs.values('make') .annotate(count = Count('model', distinct = True)) .annotate(Case(When(count__gt = 1, then='yes', output_field=CharField()) Basically, you need to transform the c

Issue with comparison of Count outcome in queryset

2018-07-04 Thread Magnus Ljungkrantz
ther there is more than one model within each group of cars of a specific make. SELECT make, CASE WHEN COUNT(DISTINCT model) > 1 THEN 'yes' ELSE 'no' END AS more_than_one_model FROM myapp_car GROUP BY make I know how to group on make and count unique models s qs = Car

Re: importError: Count Not import Django inside Virtualenv

2018-02-14 Thread PASCUAL Eric
: PASCUAL Eric Cc: django-users@googlegroups.com Subject: Re: importError: Count Not import Django inside Virtualenv Hi Eric, Le 2018-02-14 à 03:44, PASCUAL Eric a écrit : Hi, Hard to say without knowing the exact context, but my gut feeling is that you've modified a system wide library

Re: importError: Count Not import Django inside Virtualenv

2018-02-14 Thread PASCUAL Eric
From: django-users@googlegroups.com on behalf of tango ward Sent: Wednesday, February 14, 2018 10:09:51 AM To: django-users@googlegroups.com Subject: Re: importError: Count Not import Django inside Virtualenv that's odd. Whenever I test a pacakge, it's always installe

Re: importError: Count Not import Django inside Virtualenv

2018-02-14 Thread Etienne Robillard
like this... ;-) Cheers, Etienne *From:* django-users@googlegroups.com on behalf of tango ward *Sent:* Wednesday, February 14, 2018 3:40:04 AM *To:* django-users@googlegroups.com *Subject:* Re: importError: Count Not imp

Re: importError: Count Not import Django inside Virtualenv

2018-02-14 Thread tango ward
for projects > related libs, for the same reasons. > > > Eric > -- > *From:* django-users@googlegroups.com on > behalf of tango ward > *Sent:* Wednesday, February 14, 2018 3:40:04 AM > *To:* django-users@googlegroups.com > *Subject:* Re: importError: Count Not impor

Re: importError: Count Not import Django inside Virtualenv

2018-02-14 Thread PASCUAL Eric
_ From: django-users@googlegroups.com on behalf of tango ward Sent: Wednesday, February 14, 2018 3:40:04 AM To: django-users@googlegroups.com Subject: Re: importError: Count Not import Django inside Virtualenv Hi Eric, I tried what you suggested and it works! I was just wondering why my exi

Re: importError: Count Not import Django inside Virtualenv

2018-02-13 Thread tango ward
the trick) and >> test your app again. >> >> >> Hoping you haven't already messed your system Python by installing stuff >> in sudo mode. The situation could be a little more complicated then. >> >> >> Best. >> >> >> Eric >> --

Re: importError: Count Not import Django inside Virtualenv

2018-02-13 Thread tango ward
messed your system Python by installing stuff > in sudo mode. The situation could be a little more complicated then. > > > Best. > > > Eric > -- > *From:* django-users@googlegroups.com on > behalf of tango ward > *Sent:* Tuesday, Febru

Re: importError: Count Not import Django inside Virtualenv

2018-02-13 Thread PASCUAL Eric
ated then. Best. Eric From: django-users@googlegroups.com on behalf of tango ward Sent: Tuesday, February 13, 2018 9:43:45 PM To: django-users@googlegroups.com Subject: importError: Count Not import Django inside Virtualenv Hi, I want to seek some advice about the error.

Re: importError: Count Not import Django inside Virtualenv

2018-02-13 Thread Jason
if pip freeze doesn't include django in the output, then the django package is not installed in the virtualenv. are you sure the virtualenv was active when you installed django? also, remember that if you installed latest django, eg *pip install django*, it won't install for python2 venvs. On

importError: Count Not import Django inside Virtualenv

2018-02-13 Thread tango ward
Hi, I want to seek some advice about the error. All of my pet projects in my desktop are getting the same error even though virtualenv is activated. I can confirm that when I started playing around with the projects, I have installed Django inside virtualenv without using "sudo". Now, I can't run

Saving the count of selected checkboxes

2018-01-23 Thread JSaa
apply and I want to save only the count of selected checkboxes and save it to the QuestionAnswer model. Form class MultiAnswerForm(forms.ModelForm): qanswer_answer = forms.MultipleChoiceField(choices=MULTIANSWER, required=True, widget=forms.CheckboxSelectMultiple) class Meta

Can I test for count of a many to many field, in a Q query, along with other filters?

2018-01-16 Thread Mark London
If I'm creating a query using Q, can I make one of Q tests, be a count of a manytomany field?I.e., one of the Q filters, should test to see if a specific manytomany field, has a count greater than 5, I know that I can use annotate to test for count. But can annotate be specified w

Re: Strange query when using annotate and count

2017-12-06 Thread Cristiano Coelho
t the side effects of it, nothing so far... class FasterCountQuerySet(QuerySet): > def count(self): > return super(FasterCountQuerySet, self.values('pk')).count() > Makes me wonder if the original count code can be made "smarter" in order to prevent the un

Re: Strange query when using annotate and count

2017-12-06 Thread Cristiano Coelho
s not possible since the query also sorts by the annotated value, so an annotation is required. This means that I would need to use a custom lookup for count queries, and annotation for result queries, which would mean a lot of duplicated code and also that the Django Paginator class can't be

Re: Strange query when using annotate and count

2017-11-24 Thread Cristiano Coelho
gt; way easier and provide help for users in the situation as you. > > Best, > Simon > > Le vendredi 24 novembre 2017 08:14:10 UTC-5, Cristiano Coelho a écrit : >> >> Hello Simon, >> >> That private API is good to know, but now that I think of it would still >

Re: Strange query when using annotate and count

2017-11-24 Thread Simon Charette
Le vendredi 24 novembre 2017 08:14:10 UTC-5, Cristiano Coelho a écrit : > > Hello Simon, > > That private API is good to know, but now that I think of it would still > not work for me, since my queryset is passed to a paginator and that's the > class that does both the count

Re: Strange query when using annotate and count

2017-11-24 Thread Cristiano Coelho
Hello Simon, That private API is good to know, but now that I think of it would still not work for me, since my queryset is passed to a paginator and that's the class that does both the count and actual queryset execution, so need a queryset that can have both the annotation but also clea

Re: Strange query when using annotate and count

2017-11-23 Thread Simon Charette
Hello Cristiano, > Isn't there a way (even if it's hackish) to simply clear the annotations (and order by)? I know querysets are smart enough to not include the order by clause if there's a count. The ordering is cleared on `count()` because it shouldn't interfere with

Re: Strange query when using annotate and count

2017-11-23 Thread Cristiano Coelho
Hello Simon, thanks for the response. The above code is just an example, the reason behind the annotate because there's some complicated code that builds a queryset and annotates it so it can easily be reused. It works fine 99% of the time except when there's a count involved and

Re: Strange query when using annotate and count

2017-11-23 Thread Simon Charette
are performing your `count()` because some annotations could interfere with grouping somehow. There is an open ticket[0] to add support for an `alias()` method that would allow the ORM to clear/ignore the specified expressions if it's not referenced in the query. In the mean time I think the

Re: Strange query when using annotate and count

2017-11-21 Thread Cristiano Coelho
Hmm, should I try with the dev mailing list? Guess it's something no one faced before? El martes, 14 de noviembre de 2017, 22:54:23 (UTC-3), Cristiano Coelho escribió: > > I'm getting some very odd query when combining annotate with count. See > the f

Strange query when using annotate and count

2017-11-14 Thread Cristiano Coelho
I'm getting some very odd query when combining annotate with count. See the following: >>> q = > Vulnerability.objects.annotate(score=WordTrigramCustomSimilarity('test','summary')) > >>> q.count() > 3094 > >>> print

Server side paging..How to sent the count of items??

2017-09-26 Thread Rakhee Menon
Hi , I was trying to do server side paging and wanted to send the totalcount of items along with itemPerPage..I have attached my code.Can anyone suggest how to do it?? Thanks in Advance. -- You received this message because you are subscribed to the Google Groups "Django users" group. To uns

Re: count the selected chechboxes in multipleselectfield

2017-07-05 Thread elloy
On Wednesday, July 5, 2017 at 3:59:41 PM UTC+3, bob gailer wrote: > > On Jul 5, 2017 6:55 AM, "elloy" > wrote: > > > > I need your help with a problem I'm trying to solve > > I'm making a questionnaire and I have to count the selected choices that

Re: count the selected chechboxes in multipleselectfield

2017-07-05 Thread Bob Gailer
On Jul 5, 2017 6:55 AM, "elloy" wrote: > > I need your help with a problem I'm trying to solve > I'm making a questionnaire and I have to count the selected choices that the user have checked in a certain question with 5 possible answers(choices) > The mod

count the selected chechboxes in multipleselectfield

2017-07-05 Thread elloy
I need your help with a problem I'm trying to solve I'm making a questionnaire and I have to count the selected choices that the user have checked in a certain question with 5 possible answers(choices) The model I'm using is: class Reuse(models.Model): REUSE_OPTIONS = (

count the selected checkboxes in a multipleselectfield

2017-07-05 Thread elloy
Please, I need your help because I'm trying to solve a problem I'm making a questionnaire and I want to count the number of the selected choices in a certain question The model I'm using is: class Reuse(models.Model): REUSE_OPTIONS = ( ('1', 'first c

Re: count from multiple tables in a single query?

2017-06-01 Thread Melvyn Sopacua
On Wednesday 31 May 2017 12:13:48 'Abraham Varricatt' via Django users wrote: > If I want to get the total count from both tables it can be done like > this, > > author_count = Author.objects.count() > publisher_count = Publisher.objects.count() > > My conc

Re: count from multiple tables in a single query?

2017-05-31 Thread James Schneider
supported database backends. In the case of a simple COUNT(*) query, even with multiple tables involved, the SQL statement is likely portable across any of the included backends. My intention was to say that using the ORM will better guarantee that the call is portable, not necessarily saying that raw

Re: count from multiple tables in a single query?

2017-05-31 Thread Alceu Rodrigues de Freitas Junior
Schneider escreveu: If I want to get the total count from both tables it can be done like this, | author_count =Author.objects.count() publisher_count =Publisher.objects.count() | My concern is that this results in two different queries to the database. Can it be d

Re: count from multiple tables in a single query?

2017-05-31 Thread 'Abraham Varricatt' via Django users
sure that it wouldn't be possible with the ORM. Thanks for replying! Looking into caches, Abraham V. On Wednesday, 31 May 2017 16:31:04 UTC-4, Matthew Pava wrote: > > Hi Abraham, > > If the models are related, you can use double underscore notation with the > Count

RE: count from multiple tables in a single query?

2017-05-31 Thread Matthew Pava
Hi Abraham, If the models are related, you can use double underscore notation with the Count aggregate function. If the models are unrelated, then I’m fairly certain that you can only use separate queries to get your results. From: 'Abraham Varricatt' via Django users [mailto:dj

Re: count from multiple tables in a single query?

2017-05-31 Thread James Schneider
> > > If I want to get the total count from both tables it can be done like this, > > author_count = Author.objects.count() > publisher_count = Publisher.objects.count() > > My concern is that this results in two different queries to the database. > Can it be do

count from multiple tables in a single query?

2017-05-31 Thread 'Abraham Varricatt' via Django users
Hello, Is it possible to get the count of entries from multiple tables in a single query call? I'm looking at the official docs on aggregation and I can't find anything. For example assume I have the following 2 tables, class Author(models.Model): name = models.CharField(max_

Re: Advice: count hits/pageview for high traffic website

2017-03-08 Thread carlos
hy not Google Analytics? > > On 3/8/17, ludovic coues wrote: > > Have you looked at an analytics solution like piwik ? > > > > 2017-03-08 6:40 GMT+01:00 carlos : > >> Daniel, no i say i used django for a website with high traffic maybe 70k > >> per > >&

Re: Advice: count hits/pageview for high traffic website

2017-03-08 Thread Vijay Khemlani
Maybe I'm missing something, but why not Google Analytics? On 3/8/17, ludovic coues wrote: > Have you looked at an analytics solution like piwik ? > > 2017-03-08 6:40 GMT+01:00 carlos : >> Daniel, no i say i used django for a website with high traffic maybe 70k >> per

Re: Advice: count hits/pageview for high traffic website

2017-03-08 Thread ludovic coues
Have you looked at an analytics solution like piwik ? 2017-03-08 6:40 GMT+01:00 carlos : > Daniel, no i say i used django for a website with high traffic maybe 70k per > days, but i need count visit page like > django-hitocunts but the problems like django-hitcount is not for a websi

Re: Advice: count hits/pageview for high traffic website

2017-03-07 Thread carlos
Daniel, no i say i used django for a website with high traffic maybe 70k per days, but i need count visit page like django-hitocunts but the problems like django-hitcount is not for a website high traffic, the database is very slow ans the website down my question is exist any method, third party

Re: Advice: count hits/pageview for high traffic website

2017-03-07 Thread Daniel Bess
Hi Carlos, You email is a little unclear. Are you suggesting I should not use Django for a web backend? Let me know! Thanks, Daniel > On Mar 7, 2017, at 3:38 PM, carlos wrote: > > Hi, > i try used django-hitcount but really not for website high traffic > any advice for co

Re: Advice: count hits/pageview for high traffic website

2017-03-07 Thread Shawn Milochik
On Tue, Mar 7, 2017 at 6:38 PM, carlos wrote: > Hi, > i try used django-hitcount but really not for website high traffic > any advice for count visits/hits page for 60k or 100k traffic for day > > thank any idea, link or whatever helps > > My vote would be for somethin

Advice: count hits/pageview for high traffic website

2017-03-07 Thread carlos
Hi, i try used django-hitcount but really not for website high traffic any advice for count visits/hits page for 60k or 100k traffic for day thank any idea, link or whatever helps -- att. Carlos Rocha -- You received this message because you are subscribed to the Google Groups "Django

Re: data must be QuerySet-like (have count() and order_by()) or support list(data) -- NoneType has neither

2017-01-11 Thread Vijay Khemlani
ango.contrib.flatpages.middleware.FlatpageFallbackMiddleware') >> > >> > Traceback: >> > File "C:\Python27\lib\site-packages\django\core\handlers\base.py" in >> > get_response >> > 132. response = wrapped_callback(requ

Re: data must be QuerySet-like (have count() and order_by()) or support list(data) -- NoneType has neither

2017-01-10 Thread Ali khan
n > > _wrapped_view > > 22. return view_func(request, *args, **kwargs) > > File "C:\Python27\lib\site-packages\django\views\generic\base.py" in > view > > 71. return self.dispatch(request, *args, **kwargs) > > File "C:\Python27\l

Re: data must be QuerySet-like (have count() and order_by()) or support list(data) -- NoneType has neither

2017-01-08 Thread Vijay Khemlani
t; in > dispatch > 89. return handler(request, *args, **kwargs) > File "C:\Python27\lib\site-packages\django\views\generic\base.py" in get > 158. context = self.get_context_data(**kwargs) > File "C:\Users\AliKhan\supermarket\market\dashboard\catalogue\views.py" i

data must be QuerySet-like (have count() and order_by()) or support list(data) -- NoneType has neither

2017-01-07 Thread Ali khan
ontext_data 77. ctx = super(ProductListView, self).get_context_data(**kwargs) File "C:\Python27\lib\site-packages\django_tables2\views.py" in get_context_data 107. table = self.get_table(**self.get_table_kwargs()) File "C:\Users\AliKhan\supermarket\market\dashboard\catalogue\

Re: How to hook into the admin site to count login attempts with REST API / proxy?

2016-11-20 Thread Luis Zárate
y. However the admin site is publicly available through an NGINX server. The REST API already has functionality to count failed login attempts and I would like to duplicate that functionality on the admin login page. How do I hook into the admin login page and add the appropriate code? Can I still

Re: How to hook into the admin site to count login attempts with REST API / proxy?

2016-11-20 Thread Reza Shalbafzadeh
wrote: > > Hello, I have a REST API which is not publicly accessible as it is behind > a proxy. However the admin site is publicly available through an NGINX > server. The REST API already has functionality to count failed login > attempts and I would like to duplicate that funct

Re: How to hook into the admin site to count login attempts with REST API / proxy?

2016-11-17 Thread T Thomas
proxy. However the admin site is publicly available through an NGINX > server. The REST API already has functionality to count failed login > attempts and I would like to duplicate that functionality on the admin > login page. How do I hook into the admin login page and add the > a

How to hook into the admin site to count login attempts with REST API / proxy?

2016-11-04 Thread Daniel Grace
Hello, I have a REST API which is not publicly accessible as it is behind a proxy. However the admin site is publicly available through an NGINX server. The REST API already has functionality to count failed login attempts and I would like to duplicate that functionality on the admin login

How in Django, made count objects in through model by condition, for using in the admin as sortable field?

2016-04-30 Thread Seti Volkylany
) class Meta: db_table = 'snippet_comment' verbose_name = "Comment of snippet" verbose_name_plural = "Comments of snippet" get_latest_by = 'date_created' ordering = ['snippet', '

What python package is accurate to detect languages and count words?

2016-02-08 Thread Allison
I am trying to detect languages, so far I have used langdetect, langid. I heard goslate is blocked by Google, is there any package as good as goslate? It was simple and direct? Or would you recommend a python package for detecting languages and counting words? Thanks in advance, Allison --

Re: Implement page view count without using database for Hit

2016-02-08 Thread sonu kumar
gt; wrote: > > > > Hi all, > > We have develop a site where we need to maintain page view count like > SO, Quora,YouTube etc. Current approach is based on number of retrieval > using view this leads to problem to user that they are seeing that when a > page is re

Re: Implement page view count without using database for Hit

2016-02-08 Thread James Schneider
On Feb 7, 2016 7:03 PM, "sonu kumar" wrote: > > Hi all, > We have develop a site where we need to maintain page view count like SO, Quora,YouTube etc. Current approach is based on number of retrieval using view this leads to problem to user that they are seeing that when a pa

Implement page view count without using database for Hit

2016-02-07 Thread sonu kumar
Hi all, We have develop a site where we need to maintain page view count like SO, Quora,YouTube etc. Current approach is based on number of retrieval using view this leads to problem to user that they are seeing that when a page is reloaded then count get's incremented see here

Re: count

2016-01-28 Thread sum abiut
test=ball.objects.filter(request="checked").count() > c = RequestContext(request, {'test': test}) > return HttpResponse(t.render(c)) > > > On Wednesday, January 27, 2016 at 11:12:19 PM UTC+2, suabiut wrote: >> >> Version 1.7 >> >>

Re: count

2016-01-28 Thread aspellip
from django.http import HttpResponse from django.template import loader, RequestContext def foreginexchange_view(request): t = loader.get_template("template.html") test=ball.objects.filter(request="checked").count() c = RequestContext(request, {'test':

  1   2   3   4   >