Re: Djnago User login

2017-03-01 Thread Constantine Covtushenko
+1 for CustomAuth Backend solution. In runtime Django checks all set backends in the order so I would suggest to put your backend at the beginning of backend's list. On Thu, Mar 2, 2017 at 12:05 AM, Shawn Milochik wrote: > It takes a little fiddling, but you can log in a

Re: database update after paypal payment

2017-03-01 Thread Agoulou Zegouna
Thanks all ! I tried to Use django-paypal. can you please give me a concrete example after from step 5 to 6? I have no idea of what to do? https://django-paypal.readthedocs.io/en/stable/standard/ipn.html On Wed, Mar 1, 2017 at 1:46 PM, Mario Gudelj wrote: > You should

Re: good 404 vs bad 404

2017-03-01 Thread Vinicius Assef
See suggestion below. On 1 March 2017 at 13:21, guettli wrote: > > Concrete example: we render HTML mails. They often contain broken links. > I don't want to report these. I would add a query string in these links to track them. E.g., "?autogenerated=1". So, links with

Re: Django Migrations?

2017-03-01 Thread Ed Sutherland
The problem surrounded a textfield that had no default. I added the default string and migrate complained it was an int. I changed the string and migrate still complains of the int default that no longer exists. On Wed, 01 Mar 2017 15:50:07 -0500 Melvyn

Re: Djnago User login

2017-03-01 Thread Shawn Milochik
It takes a little fiddling, but you can log in a user however you want. https://docs.djangoproject.com/en/1.10/topics/auth/default/#how-to-log-a-user-in In short, you can call django.contrib.auth.login(request, user) and force a login without any authentication if you really wanted to. Given

Re: Django Migrations?

2017-03-01 Thread Melvyn Sopacua
On Wednesday 01 March 2017 13:27:37 Ed Sutherland wrote: > I am a relatively new Django coder. I'm building a small custom CMS. > Whenever I get deep into development, I run into a migration problem: > an old error keeps halting newer migrations. I long ago fixed the > original error, but the

Re: Djnago User login

2017-03-01 Thread Constantine Covtushenko
Hi Hossein, I am not sure that understood you correctly. Are you asking about the way how to handle two types of authentication? One by user name and password, an other by just username? On Wed, Mar 1, 2017 at 4:05 PM, Hossein Torabi wrote: > is there any method that i

Re: django-mongo-angularJs

2017-03-01 Thread mohamed shawky
am using mongodb which the project that i work on it deal with mongo if you can help me thank ou in advance بتاريخ الأربعاء، 1 مارس، 2017 3:43:47 م UTC+2، كتب mohamed shawky: > > am new in django and mongodb > i want to develop a web app contain some > feature like log in > and log out and

Django Migrations?

2017-03-01 Thread Ed Sutherland
I am a relatively new Django coder. I'm building a small custom CMS. Whenever I get deep into development, I run into a migration problem: an old error keeps halting newer migrations. I long ago fixed the original error, but the migration continues to stop due to a now non-existent error. I

Djnago User login

2017-03-01 Thread Hossein Torabi
is there any method that i have two kind of users that once log in with user name and password and other one login with just with user name? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: django-mongo-angularJs

2017-03-01 Thread ludovic coues
Can you explain why using mongodb would be better than any SQL database ? Django have models, which make abstraction of the database. It's really nice for most usage, saving plenty of time and trouble most of the time. These models have no support for mongodb and as far as I know, nothing will

Re: good 404 vs bad 404

2017-03-01 Thread Melvyn Sopacua
On Wednesday 01 March 2017 08:21:34 guettli wrote: > Concrete example: we render HTML mails. They often contain broken > links. I don't want to report these. That depends if the rendering makes the link broken (for example you fold soft wraps in quoted-printable incorrectly). A different

Re: database update after paypal payment

2017-03-01 Thread Mario Gudelj
You should use Django-PayPal app. It has views for IPN and PDT, stores transaction details in DB, does TX verification and it fires of a signal when when a successful transaction comes in to your webhook. All you have to do is specify some URLs and settings. It'll even render that front end form

Re: good 404 vs bad 404

2017-03-01 Thread C. Kirby
There are lots of other status codes - perhaps your "good" or expected not found should be a 3xx code (Redirection) or a 4xx that isn't 404 https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html On Wednesday, March 1, 2017 at 6:22:27 PM UTC+2, guettli wrote: > > nice, I like this. Yes, an

Re: good 404 vs bad 404

2017-03-01 Thread guettli
nice, I like this. Yes, an additional header ... Thank you. Am Mittwoch, 1. März 2017 11:02:01 UTC+1 schrieb ludovic coues: > > I would tag the 404 in django and let the monitoring app do most of the > work. > The tag would simply be an extra header, x-reason for example. It would > take values

Re: good 404 vs bad 404

2017-03-01 Thread guettli
Am Mittwoch, 1. März 2017 10:54:38 UTC+1 schrieb Antonis Christofides: > > My gut feeling says you should treat this in monitoring, however here are > some questions: > > 1) Why do you monitor 404s at all? > > 2) Could you give some examples of 404s that are valid or should be > ignored? > > I

Re: good 404 vs bad 404

2017-03-01 Thread guettli
Am Mittwoch, 1. März 2017 10:42:44 UTC+1 schrieb Andréas Kühne: > > I think you should always report a 404 as a 404 regardless of the > situation. > > The application shouldn't have to know if it is a valid 404 or an > "invalid" - because from the applications point of view, the page (or

Re: Advice: django deploy vps error 502

2017-03-01 Thread carlos
Hello, Antonis i have debug = false, yes uwsgi dont write anything in the log :/ When i see the syslog i see error but not understand! i share this output http://pastebin.com/69yvC8Tz thak for you help On Wed, Mar 1, 2017 at 12:58 AM, Antonis Christofides < anto...@djangodeployment.com> wrote:

Re: Django context translations with dynamic variables

2017-03-01 Thread Jani Tiainen
In theory you just define genders to your PO file with translations and it should work. Not sure will that disable autogeneration and update for your PO file after that. On 01.03.2017 14:59, Gleb Tocarenco wrote: Hello, I am running in with an issue with Django translation tag in case

[ANNOUNCE] Django bugfix release: 1.10.6

2017-03-01 Thread Tim Graham
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2017/mar/01/bugfix-release/ -- 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

django-mongo-angularJs

2017-03-01 Thread mohamed shawky
am new in django and mongodb i want to develop a web app contain some feature like log in and log out and registration and, update profile and post a text and, make a comment for this post ,, front end working with angularJs please help me thank you in advance -- You received this

Django context translations with dynamic variables

2017-03-01 Thread Gleb Tocarenco
Hello, I am running in with an issue with Django translation tag in case context is present as a dynamic variable. {% trans 'You have new message' context user.gender %} In this case django.po files doesn't contains words related to gender context. My question is if there is possibility to

Re: group by 3 fields

2017-03-01 Thread marcin . j . nowak
On Wednesday, March 1, 2017 at 2:09:06 PM UTC+1, larry@gmail.com wrote: > > > I had thought of using a view, but that would have been a lot of > overhead on such a large table. I also considered adding a column and > running a one time script to update the existing rows, and modifying >

Re: group by 3 fields

2017-03-01 Thread Larry Martell
On Wed, Mar 1, 2017 at 8:01 AM, wrote: > >> >> As is so often the case, the requirements changed. Now what I had to >> do, if I was doing it in SQL would have been: >> >> (CASE >> WHEN TRIM(IFNULL(roiname, '')) IN ('', 'None') THEN CONCAT_WS('.', >>

Re: group by 3 fields

2017-03-01 Thread marcin . j . nowak
> > As is so often the case, the requirements changed. Now what I had to > do, if I was doing it in SQL would have been: > > (CASE > WHEN TRIM(IFNULL(roiname, '')) IN ('', 'None') THEN CONCAT_WS('.', > CONVERT(roi_type_id, CHAR), roi_id) > WHEN CONCAT_WS('.', CONVERT(roi_type_id, CHAR),

Re: group by 3 fields

2017-03-01 Thread Larry Martell
On Mon, Feb 27, 2017 at 3:41 AM, wrote: > > > On Monday, February 27, 2017 at 3:52:38 AM UTC+1, larry@gmail.com wrote: >> >> [SQL] That is a language I >> have worked in for over 20 years, and when I see a querying need that >> is how I think, and then I see how can

Re: Store Tabular Form Data to Database

2017-03-01 Thread Omar Abou Mrad
On Wed, Mar 1, 2017 at 1:52 PM, Aditya Khaund wrote: > Hello, > > In one of my application I have a form in tabular format. I have following > questions > > 1) How can I add a row dynamically in my form? > 2) While submitting how can I process multiple tables rows in

Store Tabular Form Data to Database

2017-03-01 Thread Aditya Khaund
Hello, In one of my application I have a form in tabular format. I have following questions 1) How can I add a row dynamically in my form? 2) While submitting how can I process multiple tables rows in view code and insert all of them to the database via model? -- You received this message

Hello

2017-03-01 Thread METRO DIARIES
I am new to Django and I shall we very glad to receive all sorts of help fro all of you in tackling problems while using Django. -- 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: database update after paypal payment

2017-03-01 Thread Melvyn Sopacua
On Tuesday 28 February 2017 21:13:39 agoulouzego...@gmail.com wrote: > hello! I am trying to update my database after paypal has received > the payment from customer. The problem is that I don't really know to > do it. This is what I am doing now This code is all irrelevant. This is the

Re: good 404 vs bad 404

2017-03-01 Thread ludovic coues
I would tag the 404 in django and let the monitoring app do most of the work. The tag would simply be an extra header, x-reason for example. It would take values like "no mapping for url" or "object not found". This way, your django app is still doing no more than its job, indicating the

Re: attribute required and error XML

2017-03-01 Thread ludovic coues
I can't answer on your issue exactly, but is not an XML doctype. It's the html5 doctype which as far as I know is SGML and not XML. Try removing the line starting with wrote: Hi all, I have an problem. When I use the django library form, It create an attribute "required" for an input. But

Re: good 404 vs bad 404

2017-03-01 Thread Antonis Christofides
My gut feeling says you should treat this in monitoring, however here are some questions: 1) Why do you monitor 404s at all? 2) Could you give some examples of 404s that are valid or should be ignored? Regards, Antonis Antonis Christofides http://djangodeployment.com On 03/01/2017 11:42 AM,

Re: good 404 vs bad 404

2017-03-01 Thread Andreas Kuhne
I think you should always report a 404 as a 404 regardless of the situation. The application shouldn't have to know if it is a valid 404 or an "invalid" - because from the applications point of view, the page (or item) couldn't be found. Just my 2 cents. Regards, Andréas 2017-03-01 10:25

good 404 vs bad 404

2017-03-01 Thread guettli
In systems which are accessed only via intranet we used to monitor http 404 responses. Every time a 404 happens, an issue in our monitoring gets created. This worked well in the past. Now we have cases where a 404 is valid or should be ignored. No issue in the monitoring should be visible.

Re: Privacy settings like Facebook in Django.

2017-03-01 Thread C. Kirby
I would create an abstract class to hold the share values, extend from that for your n shared fields, use those as OneToOne in your user profile, and then have methods in the userprofile to determine if the field should be shown. Something like this (assumes you have the code to figure out if a