Re: Logging CSRF errors and other HTTP errors by Django

2017-03-08 Thread Web Architect
Thanks for your response. We do use logging but missed the part of django.request. Thanks for pointing it. On Wednesday, March 8, 2017 at 9:31:21 PM UTC+5:30, Melvyn Sopacua wrote: > > On Wednesday 08 March 2017 06:15:42 Web Architect wrote: > > > > > Is there a way to log CSRF errors? Like

Re: Redirection to SSO using Django

2017-03-08 Thread Arun S
Using the django_allauth package, i could see it supports most of the social accounts that can use used for redirection. But what if i want to add a custom link within a corporate account.??? On Wednesday, March 8, 2017 at 9:10:33 PM UTC+5:30, Melvyn Sopacua wrote: > > On Wednesday 08 March 2017

Re: Redirection to SSO using Django

2017-03-08 Thread Arun S
The Login_redirect comes into picture when SSO redirects the Login back with a response. But i am still unable to redirect my Login page to the Third party page using django_settings. I tried setting LOGIN_URL but, always gets redirected to the django login page. Basically, using Djanog, i

Django FormPreview: Save form data to database

2017-03-08 Thread jthewriter
Probably a simple question but having trouble implementing a form preview page using django-formtools. I've configured everything per the docs. I'm stuck on what to add to the done() method to save the data to db. forms.py class JobForm(ModelForm): class Meta: model = Job

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

2017-03-08 Thread carlos
ludovic and Vijay i need put in index page sidebar the most visits or popular page that people saw, you understand me? Thank ludovic I'm going to read about piwik maybe help me. Cheers On Wed, Mar 8, 2017 at 6:38 AM, Vijay Khemlani wrote: > Maybe I'm missing something, but

"trans" template tag using wrong language

2017-03-08 Thread Joan Perals
I have a site using Django 1.10 with German and English as available languages, where German is the source language. Dynamic content is translated with django-modeltranslation and for static strings I am using Django's built-in `trans` template tag. I want Django to return the page in the

Re: Simple Join with no matching primary keys

2017-03-08 Thread ayshalab
Tables are coming from different sources, for each single datetime value there is a different url, in order to tie up the single source data it must live inside its own table. On Wednesday, March 8, 2017 at 9:11:42 AM UTC-7, Matthew Pava wrote: > > Why are there no better design options to

Re: Error running Django tutorial

2017-03-08 Thread Daniel Bess
Hello! Daniel > On Mar 8, 2017, at 12:51 AM, Melvyn Sopacua wrote: > > Hi, > > On Tuesday 07 March 2017 01:24:02 Vanja Falck wrote: > > > > urlpatterns = [ > > url(r'ˆpolls/', include('polls.urls')), > > url(r'^admin/', admin.site.urls), > > ] > > Easy

RE: Simple Join with no matching primary keys

2017-03-08 Thread Matthew Pava
Why are there no better design options to implement them? Are the tables being used in another software that you have no control over? I would just merge the two tables and use one model. From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of aysha...@gmail.com

Re: Logging CSRF errors and other HTTP errors by Django

2017-03-08 Thread Melvyn Sopacua
On Wednesday 08 March 2017 06:15:42 Web Architect wrote: > Is there a way to log CSRF errors? Like whenever an user visits my > site and faces a CSRF error, I would like Django to log it in a file. Did you read the logging documentation[1]? -- Melvyn Sopacua [1]

Re: Redirection to SSO using Django

2017-03-08 Thread Melvyn Sopacua
On Wednesday 08 March 2017 05:26:02 Arun S wrote: > My Project, i would want to redirect login page to a SSO page. > and handle redirection in Django. Don't solve what others already did for you: https://djangopackages.org/packages/p/django-allauth/ -- Melvyn Sopacua -- You received this

Re: Simple Join with no matching primary keys

2017-03-08 Thread Melvyn Sopacua
On Wednesday 08 March 2017 06:23:44 aysha...@gmail.com wrote: > Thanks for your answer, the models represent two different tables, > identical structure but have to be segregated, there is no better > design options to implement them. Any leads on how to do the join? Think about what the join

Re: Redirection to SSO using Django

2017-03-08 Thread Jani Tiainen
Hi, You probably need to set LOGIN_REDIRECT_URL [1] to point correct url. What happens next depends your SSO tools and how they handle passing logged in user information to your app. [1] https://docs.djangoproject.com/en/1.10/ref/settings/#login-redirect-url On 08.03.2017 15:26, Arun S

Re: Full domain url subfolder redirected my django application with apache with mod_wsgi

2017-03-08 Thread Antonis Christofides
You say that you "run manage.py collectstatic and everything is fine when i use the root url. |http//10.184.2.231| it is ok and static files are served properly", and then you say that http://www.mydomain/static/images/giphy.gif gives 404 (Not Found). Is

Re: Simple Join with no matching primary keys

2017-03-08 Thread ayshalab
Thanks for your answer, the models represent two different tables, identical structure but have to be segregated, there is no better design options to implement them. Any leads on how to do the join? > > > > Models cannot be joined. There is no Model.join(). Models are objects you > can

Full domain url subfolder redirected my django application with apache with mod_wsgi

2017-03-08 Thread valerio orfano
I've been facing the following problem. I got django 1.9 integrated with apache 2.4+ via mod_wsgi application. I run manage.py collectstatic and everything is fine when i use the root url. http//10.184.2.231 it is ok and static files are served properly. Actually i will be redirected to my

Re: field = self.model._meta.get_field(self.field_name) returns self?

2017-03-08 Thread Brandon
This bug is *still* occurring... And seems to do so in waves. But after fighting it again and again, something struck me. The bug always occurs here: django/db/models/fields/reverse_related.py in get_related_field at line 244 So always in this function: def get_related_field(self):

Logging CSRF errors and other HTTP errors by Django

2017-03-08 Thread Web Architect
Hi, Is there a way to log CSRF errors? Like whenever an user visits my site and faces a CSRF error, I would like Django to log it in a file. I would like to know if my users are facing CSRF errors. Also, Can Django log HTTP error codes like 4xx or 5xx in a file? We are using Django 1.8.3

Not Root Url for my djano app integrated with apache with mod_swgi

2017-03-08 Thread valerio orfano
Hello guys i've been facing the following problem. I got django 1.9 integrated with apache 2.4+ via mod_wsgi application. i run manage.py collect and everythiong is fine when i use the root url. http//10.184.2.231 it is ok and static files are served properly. Actually i will be redirected

Redirection to SSO using Django

2017-03-08 Thread Arun S
Hi, My Project, i would want to redirect login page to a SSO page. and handle redirection in Django. I am using Apache Server. Whats the best way to implement this ? i was reading about django - remoteusermiddleware but could'nt quite figure out how to handle the redirection. Any help is

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

Re: Simple Join with no matching primary keys

2017-03-08 Thread Melvyn Sopacua
On Tuesday 07 March 2017 10:50:24 aysha...@gmail.com wrote: > Greetings, > > I am trying to do a join on the following 2 models (tables) Models cannot be joined. There is no Model.join(). Models are objects you can relate to eachother. Once you stop thinking in database terms, the problem is

Re: Postgres (sqlmigrate) FK to M2M without RunPython

2017-03-08 Thread Melvyn Sopacua
On Wednesday 08 March 2017 03:42:31 Maksym Mospanenko wrote: > Yes but I have to run on db server directly (via export sqlmigrate). No, you don't. > Djando's manage.py can generate sql only for schema migrations - not > for RunPython data migrations. But you're not *creating* migrations,

Re: Postgres (sqlmigrate) FK to M2M without RunPython

2017-03-08 Thread Maksym Mospanenko
We don't have access to db server (only via custom django backend driver) in our configuration (security reasons). So we have to export raw sql for schema migrations manually and we can't generate sql for data migrations (because it is python's logic). вівторок, 7 березня 2017 р. 11:18:01

Re: Postgres (sqlmigrate) FK to M2M without RunPython

2017-03-08 Thread Maksym Mospanenko
Yes but I have to run on db server directly (via export sqlmigrate). Djando's manage.py can generate sql only for schema migrations - not for RunPython data migrations. вівторок, 7 березня 2017 р. 13:14:31 UTC+2 користувач Daniel Roseman написав: > > Schema migrations don't run on the

Re: Error running Django tutorial

2017-03-08 Thread Melvyn Sopacua
Hi, On Tuesday 07 March 2017 01:24:02 Vanja Falck wrote: > urlpatterns = [ > url(r'ˆpolls/', include('polls.urls')), > url(r'^admin/', admin.site.urls), > ] Easy to see this way. You didn't type a caret but some unicode sign that looks like a caret. -- Melvyn Sopacua -- You

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