Re: django Facebook integration

2018-08-13 Thread ruban bharath
Thank you sir,but i have done it already ,is there any clear procedure to integrate with Facebook with django On Tuesday, August 14, 2018 at 12:01:59 PM UTC+5:30, Mikhailo Keda wrote: > > You need to add your redirect url to fb app, go to your fb app logging > settings and check fb Valid OAuth

Re: django Facebook integration

2018-08-13 Thread Mikhailo Keda
You need to add your redirect url to fb app, go to your fb app logging settings and check fb Valid OAuth Redirect URIs Mike -- 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

Re: django models

2018-08-13 Thread Ramandeep Kaur
hi guys, i need your help when i run makemigrations command, i got error: django.db.migrations.exceptions.NodeNotFoundError: Migration task_types.0004_tasktype_training_kit dependencies reference nonexistent parent node (u'training_kits', u'0003_auto_20160914_0722') On Fri, Aug 10, 2018 at 8:21 P

Re: 404 out of the box in chrome. firefox works as expected

2018-08-13 Thread Mikhailo Keda
You need to add a path for '/', check - https://docs.djangoproject.com/en/2.1/ref/urls/#path and https://docs.djangoproject.com/en/2.1/intro/tutorial01/#write-your-first-view Mike -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscri

Re: GROUP BY

2018-08-13 Thread Gagan Kalia
Try not to use _ (underscore) character as prefix or postfix to any user defined variable or db column. Its not recommended in django. On Tue 14 Aug, 2018, 1:52 AM Mikkel Kromann, wrote: > I'm trying to sum the field "ownProduction", grouping it by the foreign > key "market" (using the market's

django Facebook integration

2018-08-13 Thread ruban bharath
When i try to login with Facebook using django i got a error like *url blocked: this redirect failed because the redirect uri is not white-listed in the app's client oauth settings. make sure that the client and web oauth logins are on and add all your app domains as valid oauth redirect uri

Re: GROUP BY

2018-08-13 Thread Mikkel Kromann
Thanks. But strange - exactly same error: 'dict' object has no attribute 'contracted' contract_query = (Project.objects.all() .filter(department=department_id) .filter(datePipeline__year=year)

Re: Error binding parameter 0 - probably unsupported type

2018-08-13 Thread ruban bharath
Thank you sir On Monday, August 13, 2018 at 7:09:26 PM UTC+5:30, Julio Biason wrote: > > Hey Ruban, > > I'd suggest taking a look at the second part of the Django Tutorial: > https://docs.djangoproject.com/en/2.1/intro/tutorial02/ > > It explains how models work and how they interact with the dat

Re: Django with LDAP for authentication, but not user group

2018-08-13 Thread Mike Dewhirst
On 13/08/2018 4:01 PM, Claire Chan Myae wrote: Hello, I would like to integrate Django with my ldap. I want to use ldap only for user authentication part, but not for user group. Would that be possible? If I use ldap, i must use both user and group or I can use only user? https://djangopack

Re: Administration with Django 2

2018-08-13 Thread Amit Malik
hey vinod , can you share your email? i have some django work and i am looking to outsource it. On Mon, Aug 13, 2018 at 3:57 PM, vinod.kumar via Django users < django-users@googlegroups.com> wrote: > you can create a superuser for django project. Django admin is too much > flexible, you can write

Re: 404 out of the box in chrome. firefox works as expected

2018-08-13 Thread Adam Gutierrez
nevermind. turns out it was a chrome extension. On Monday, August 13, 2018 at 7:40:32 PM UTC-5, Adam Gutierrez wrote: > > After running django-admin and installing I get the below error when > navigating to the default django template in chrome. Firefox works without > a hitch. No view, or urls

ANN: django-yamlconf 1.0.0

2018-08-13 Thread Michael Rohan
Hi Folks, The package Django-yamlconf 1.0.0 has been uploaded to pypi. There are a number of YAML (and other formats) support modules for managing Django settings. The main difference here is: 1. The directory tree is used to store multiple YAML config files with definitions highe

404 out of the box in chrome. firefox works as expected

2018-08-13 Thread Adam Gutierrez
After running django-admin and installing I get the below error when navigating to the default django template in chrome. Firefox works without a hitch. No view, or urls updates makes any difference. Is the problem that my environment is sending the request URL twice. I assumed it had to with m

http error 401

2018-08-13 Thread Hervé Edorh
I used django and weasyprint to make an application which print a pdf file with picture and css file which design my pdf file. I used nginx, gunicorn and supervisor to deploy my application. In my intranet all is ok. When i used INTERNET PUBLIC IP ADDRESS to publish it on internet, my pdf file

Re: Advice on Model Structures

2018-08-13 Thread Mark Phillips
dtdave, Basically, the model structure is how you indicated. To achieve changing the content of a select once the page is loaded, you will have to do some JavaScript magic. Django-select2 will do that for you, and there are other django packages, or you can roll your own if it is not too complicat

RE: GROUP BY

2018-08-13 Thread Matthew Pava
You need to include “ownProduction” in your values list prior to the annotation. From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Mikkel Kromann Sent: Monday, August 13, 2018 3:22 PM To: Django users Subject: GROUP BY I'm trying to sum the field "ownProduc

GROUP BY

2018-08-13 Thread Mikkel Kromann
I'm trying to sum the field "ownProduction", grouping it by the foreign key "market" (using the market's human readable name, __name from the Market table) and the week number (which is built-in function __year of the date field "dateContract"). However, when I try to read the results of the que

How to get oauth access token data saved in database

2018-08-13 Thread proshops19
To be able to make API calls on behalf of the user who granted access to django app, I have done the following : I have added the field below to the UserAssociation class in the django-authopenid models (see link

Re: unable to use unique argument in CharField

2018-08-13 Thread Ketul Patel
Thanks Karen On Mon, Aug 13, 2018 at 10:58 PM Karen Tracey wrote: > > On Mon, Aug 13, 2018 at 1:21 PM, Ketul Patel > wrote: > >> *code* >> >> from django import forms >> >> class Group(models.Model): >> name = forms.CharField(max_length=255,unique=True) >> slug = forms.SlugField(allow_

braces : Unexpected error

2018-08-13 Thread Ketul Patel
File "D:\Learning & Interest\Computer\Web\projects\simplesocial\simplesocial\posts\urls.py", line 5, in from . import views File "D:\Learning & Interest\Computer\Web\projects\simplesocial\simplesocial\posts\views.py", line 9, in from braces.views import SelectedRelatedMixin ImportEr

Re: unable to use unique argument in CharField

2018-08-13 Thread Karen Tracey
On Mon, Aug 13, 2018 at 1:21 PM, Ketul Patel wrote: > *code* > > from django import forms > > class Group(models.Model): > name = forms.CharField(max_length=255,unique=True) > slug = forms.SlugField(allow_unicode=True,unique=True) > > > You need to use models.CharField, models.SlugField,

unable to use unique argument in CharField

2018-08-13 Thread Ketul Patel
*code* from django import forms class Group(models.Model): name = forms.CharField(max_length=255,unique=True) slug = forms.SlugField(allow_unicode=True,unique=True) *error* name = forms.CharField(max_length=255,unique=True) File "C:\Users\Ketul\Anaconda3\envs\myDjangoEnv\lib\site-pa

Re: Advice on Model Structures

2018-08-13 Thread Mikhailo Keda
Create a 4 models: 1. Region 2. County (has a foreign key to Region) 3. Office (has a foreign key to County) 4. Employee (has a foreign key to Office) organise url by this pattern: / check this example to handle a form - http://django-select2.readthedocs.io/en/latest/extra.html#chained-selec

Re: opening a client file

2018-08-13 Thread Mikhailo Keda
a) It's posible, at last for txt file if you have read/white access to the file (via ftp, ssh, ...) b) implement get method to display file content in textarea and post method to save user changes P.S. For ODF check https://webodf.org , for rtf - https://quilljs.com , for docx and pdf there no

Re: How to serve this static file

2018-08-13 Thread Mikhailo Keda
Check official documentation - https://docs.djangoproject.com/en/2.1/howto/static-files/ -- 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..

Re: Setting up a system for testing by users (tables are tables?)

2018-08-13 Thread Mikhailo Keda
1. take a dump of production db 2. remove/anonymize all sensitive or unneeded data (you can use django admin or sql or python script) 3. reduce amount of data if needed 4. take a git branch with fixes 5. make sure there are no sensitive data in your code -- You received this message because you

Advice on Model Structures

2018-08-13 Thread 'dtdave' via Django users
I would like some advice as the best way with dealing with the following model structure. Region Counties Office Employees I would like to show the relevant counties in the relevant regions and then to show the office in that county followed by the employees in that office. In the view end user

RE: Select2 default value

2018-08-13 Thread Matthew Pava
Yes… From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of matteo gassend Sent: Monday, August 13, 2018 10:10 AM To: Django users Subject: Re: Select2 default value Even for a Modelform? Il giorno lunedì 13 agosto 2018 17:08:35 UTC+2, Matthew Pava ha scritto: I

Re: Select2 default value

2018-08-13 Thread matteo gassend
Even for a Modelform? Il giorno lunedì 13 agosto 2018 17:08:35 UTC+2, Matthew Pava ha scritto: > > In Django forms, it’s called an initial value instead of a default value. > > > > > https://docs.djangoproject.com/en/2.1/ref/forms/api/#django.forms.Form.initial > > > > > > *From:* django...@

RE: Select2 default value

2018-08-13 Thread Matthew Pava
In Django forms, it’s called an initial value instead of a default value. https://docs.djangoproject.com/en/2.1/ref/forms/api/#django.forms.Form.initial From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of matteo gassend Sent: Monday, August 13, 2018 9:49 AM T

Select2 default value

2018-08-13 Thread matteo gassend
Hey everyone, I am trying to set a default value for a Select2Widget(from django_select2) to use in a formset. I am able to set one for those added with js, but cannot set the one for the form already present. This is the form class Ddt_in_itemForm(forms.ModelForm): class Meta: model = ddt_in

Re: Error binding parameter 0 - probably unsupported type

2018-08-13 Thread Julio Biason
Hey Ruban, I'd suggest taking a look at the second part of the Django Tutorial: https://docs.djangoproject.com/en/2.1/intro/tutorial02/ It explains how models work and how they interact with the database -- which is basically what you're trying to do. On Mon, Aug 13, 2018 at 9:57 AM, ruban bhara

Getting every object from a formset, even those not modified

2018-08-13 Thread matteo gassend
Hello everyone, I am working with an inline formset of products associated with a shipment. When modifying the products associated, I encounter a little problem. The shipment needs to have the total amount of products and the total value of all the products. This is not a problem when creating

Re: Error binding parameter 0 - probably unsupported type

2018-08-13 Thread ruban bharath
Thank you sir, The datatype of the name is text and i am new to django sir so i dint have clear knowledge about it that's my problem sir and now what should i do to overcome this issue sir On Monday, August 13, 2018 at 6:17:12 PM UTC+5:30, Julio Biason wrote: > > Hi Ruban, > > Well, what's th

Re: Error binding parameter 0 - probably unsupported type

2018-08-13 Thread Julio Biason
Hi Ruban, Well, what's the type of `name`? That's what the error is saying: You're passing a type that SQLite doesn't understand properly. Also, why are you not using models to do that for you? On Mon, Aug 13, 2018 at 9:42 AM, ruban bharath wrote: > how to resolve from this error *Error bindi

Error binding parameter 0 - probably unsupported type

2018-08-13 Thread ruban bharath
how to resolve from this error *Error binding parameter 0 - probably unsupported type* db = sqlite3.connect('db.sqlite3') cursor = db.cursor() cursor.execute('insert into music_final(username,meaning) values(?,?)', (name, meaning)) db.commit() -- You received this message because you are sub

Re: Administration with Django 2

2018-08-13 Thread vinod.kumar via Django users
you can create a superuser for django project. Django admin is too much flexible, you can write your own template, view , urls and much more,so you have to modify admin penal. On Friday, August 10, 2018 at 5:20:22 PM UTC+5:30, t.m...@icloud.com wrote: > > Hi, > > I want to add a administrat

Django with LDAP for authentication, but not user group

2018-08-13 Thread Claire Chan Myae
Hello, I would like to integrate Django with my ldap. I want to use ldap only for user authentication part, but not for user group. Would that be possible? If I use ldap, i must use both user and group or I can use only user? Thanks -- You received this message because you are subscribed to t