Re: QuerySet for related models

2016-08-05 Thread M Hashmi
Thanks Todor/Constantine for your help, I've added a field in my Product models with generic relations like: hitcounts = GenericRelation(HitCount, content_type_field='content_type', object_id_field='object_pk',) In my view: object_list = Product.objects.order_by('-hitcounts__hits')[:6] In my tem

Re: How to start Django app with apache server

2016-08-05 Thread Tim Graham
Are you following these instructions? https://docs.djangoproject.com/en/stable/howto/deployment/wsgi/modwsgi/ On Friday, August 5, 2016 at 3:44:27 PM UTC-4, Terry Sankar wrote: > > apache2.4 working , postgresql working , the django app is working - how > do I start the app in apache instead of

list item names in ForiegnKey tab ?

2016-08-05 Thread Terry Sankar
Adding an entity : .. Adding connected foriegnkey iems : --- Adding connected foriegnkey iems : --- Would like to see: item name instead of after adding -- You received this message because you are subscribed to the Google Groups "Django users" grou

How to start Django app with apache server

2016-08-05 Thread Terry Sankar
apache2.4 working , postgresql working , the django app is working - how do I start the app in apache instead of the test server -- 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,

Re: Django table with checkboxes

2016-08-05 Thread Mikulas Peksa
Hi Sophie, I have just solved very similar problem. Thx you thousand times!!! Mikuláš Dne pondělí 1. srpna 2011 23:34:06 UTC+2 Sophie Hume napsal(a): > > Hi Stanislav > > I think there's two ways you can do this... if you want to go down the > Forms route you actually want to be looking at For

Re: QuerySet for related models

2016-08-05 Thread M Hashmi
Todor, You have access to my complete repo but still I will post answer here for others to learn. Regards, Mudassar On Fri, Aug 5, 2016 at 6:06 AM, Todor Velichkov wrote: > Honestly, now Idea why you get this error, can you paste some more code? > And maybe some stack trace? > > On Friday, Aug

Re: redirect NoReverseMatch Django error

2016-08-05 Thread Sergiy Khohlov
Also please add your templates. Looks like you are using URLs in the templates 5 серп. 2016 14:05 "ludovic coues" пише: > Have you added your app to the INSTALLED_APPS setting ? > > 2016-08-05 10:05 GMT+02:00 Dimitris Tsiktsiris : > > Here are my view and urls > > app url > > app_name = 'profs'

Re: QuerySet for related models

2016-08-05 Thread Todor Velichkov
Honestly, now Idea why you get this error, can you paste some more code? And maybe some stack trace? On Friday, August 5, 2016 at 2:20:25 PM UTC+3, M Hashmi wrote: > > 1.8.13 as its LTS. > > On Fri, Aug 5, 2016 at 3:54 AM, Todor Velichkov > wrote: > >> Whats your Django version? >> >> On Friday,

Re: Django migrations taking all the memory on Django 1.9

2016-08-05 Thread Markus Holtermann
Thanks Andrea, this is a known issue. Let me give you a bit of a history on this: In 1.7 Django didn't do any caching. That was awfully slow for huge projects like yours. In 1.8 Django introduced heavy caching. Things improved speed wise but failed horrifically when you were altering relations

Re: QuerySet for related models

2016-08-05 Thread M Hashmi
1.8.13 as its LTS. On Fri, Aug 5, 2016 at 3:54 AM, Todor Velichkov wrote: > Whats your Django version? > > On Friday, August 5, 2016 at 1:42:48 PM UTC+3, M Hashmi wrote: >> >> I did the same thing while working with the contenttype except I did used >> default filters .all(), .filter(), .get(),

Re: redirect NoReverseMatch Django error

2016-08-05 Thread ludovic coues
Have you added your app to the INSTALLED_APPS setting ? 2016-08-05 10:05 GMT+02:00 Dimitris Tsiktsiris : > Here are my view and urls > app url > app_name = 'profs' > urlpatterns = [ > url(r'^$', views.index, name='index'), > url(r'^contact/', views.contact, name='contact'), > url(r'^ch

Re: Edx LDAP Auth setting

2016-08-05 Thread piglesias
Hi guys, I'm having some problems to add LDAP auth to my edx app. I've follow your steps but I'm not getting any exit in edx log... I can connect and make querys against my ldap server using shell. Could you help me? I'm using fullstack dogwood environment El jueves, 26 de febrero de 2015, 10:

redirect NoReverseMatch Django error

2016-08-05 Thread Dimitris Tsiktsiris
Here are my view and urls app url app_name = 'profs' urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^contact/', views.contact, name='contact'), url(r'^check_login/', views.check_login, name='check_login'), url(r'^(?P[a-zA-Z]+)/edit_news/$', views.edit_news, name= 'edit

Re: QuerySet for related models

2016-08-05 Thread Todor Velichkov
Whats your Django version? On Friday, August 5, 2016 at 1:42:48 PM UTC+3, M Hashmi wrote: > > I did the same thing while working with the contenttype except I did used > default filters .all(), .filter(), .get(), annotations and aggregations > etc. Todor each product shows multiple hits if I log

Re: QuerySet for related models

2016-08-05 Thread M Hashmi
I did the same thing while working with the contenttype except I did used default filters .all(), .filter(), .get(), annotations and aggregations etc. Todor each product shows multiple hits if I log out and hit it and login back to hit it shows more than one hits. Hits are being recoreded for each

Re: QuerySet for related models

2016-08-05 Thread Todor Velichkov
Constantine Covtushenko, HitCount is a model from a 3rd party app, so the OP can't change it. However the way HitCount is implemented I don't think one there is a way for one product to have more than one `HitCount` objects. So I don't think any aggregations are needed. Lets the Product cla