ModuleNotFoundError: No module named 'facebook.urls'

2018-11-20 Thread Tushar Nadkar
I am trying to install Django facebook graph in my project , I installed ‘facebook’ in Insatlled_app and added ['facebook.middleware.SignedRequestMiddleware', 'facebook.middleware.AppRequestMiddleware', ] This 2 in MIDDLEWARE_CLASSES Then added

Re: file URL missing project name

2018-11-20 Thread Jeff Williams
Hey Akash, I did figure out the enctype="multipart/form-data" issue (I had that for a while but figured it out). My files are loading.they just aren't displaying. I just loaded an image using the Admin interface as you suggested (I hadn't thought of trying that) and the load is working. The

Congratulations and thank you!

2018-11-20 Thread Lachlan Musicman
Hi All, I've used Django on and off for a long time now - eight or nine years. I've spent the last 3-4 not using Django for reasons. I've just had to update a code base that was delivered to me, from 1.8/py2 to 2.1/py3 and it was a lovely experience. The changes in Django 2.x are a joy - they

Re: Unapplied Migration - how to apply

2018-11-20 Thread Tim Johnson
* Joel Mathew [181120 11:18]: > Yes, for your special case where you seem to have a pre-existing migration, > you dont need makemigrations before migrate. I was just commenting that > this is not the usual case. Thank you. > On Wed, 21 Nov 2018 at 01:43, Tim Johnson wrote: > > > * Joel

Re: Unapplied Migration - how to apply

2018-11-20 Thread Joel Mathew
Anyway, there is no point running `makemigrations` after `migrate` is run. That doesnt do anything, unless you have made a change in your models after your migrate is done Sincerely yours, Joel G Mathew On Wed, 21 Nov 2018 at 01:45, Joel Mathew wrote: > Yes, for your special case where you

Re: Unapplied Migration - how to apply

2018-11-20 Thread Joel Mathew
Yes, for your special case where you seem to have a pre-existing migration, you dont need makemigrations before migrate. I was just commenting that this is not the usual case. Sincerely yours, Joel G Mathew On Wed, 21 Nov 2018 at 01:43, Tim Johnson wrote: > * Joel Mathew [181120 10:35]: >

Re: Unapplied Migration - how to apply

2018-11-20 Thread Tim Johnson
* Joel Mathew [181120 10:35]: > makemigrations should come before migrate. You cant migrate without > creating the migrations first. Now I am being confused: The sequence that Joel suggests did not work for me. (I tried it before opening this thread) The reverse sequence that was

Re: Unapplied Migration - how to apply

2018-11-20 Thread Joel Mathew
makemigrations should come before migrate. You cant migrate without creating the migrations first. Sincerely yours, Joel G Mathew On Wed, 21 Nov 2018 at 00:47, Tim Johnson wrote: > * Shubham Rewale [181120 08:44]: > > python manage.py migrate > > Then use > > Python manage.py

Re: Unapplied Migration - how to apply

2018-11-20 Thread Tim Johnson
* Shubham Rewale [181120 08:44]: > python manage.py migrate > Then use > Python manage.py makemigrations Thank you. That worked to apply the missing item. Note: Had tried that in the past but reversed the sequence of the two commands. Have a great day Shubham > On Tue, 20 Nov 2018,

Re: python manage.py runserver

2018-11-20 Thread Ayser shuhaib
What is the message that you get when you run Python manage.py runserver On Tue, 20 Nov 2018 at 20:58, Mohamed Hashi wrote: > i wrote pip install virtualenv > and installed > buy when i do all the steps to start django web > and i came for python manage.py runserver isnt work > so and help bro

Re: python manage.py runserver

2018-11-20 Thread Mohamed Hashi
i wrote pip install virtualenv and installed buy when i do all the steps to start django web and i came for python manage.py runserver isnt work so and help bro ‫في الجمعة، 16 نوفمبر 2018 في 12:53 ص تمت كتابة ما يلي بواسطة ‪Mamadou Harouna Diallo‬‏ <‪dev.haro...@gmail.com‬‏>:‬ > Are you active

Re: Strange intermittent UUID bug

2018-11-20 Thread Jerry Vinokurov
Addendum: I forgot to say that our version of Django is 2.1.3. -- 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

Strange intermittent UUID bug

2018-11-20 Thread Jerry Vinokurov
Hi all, We have a project that uses UUIDs as a primary key for some objects. Our project is deployed on AWS via Elastic Beanstalk. After the initial deploy, everything works fine, but at some point, we encounter the following error, deep within Django: ValidationError:

Re: Unapplied Migration - how to apply

2018-11-20 Thread Shubham Rewale
python manage.py migrate Then use Python manage.py makemigrations On Tue, 20 Nov 2018, 10:10 p.m. Tim Johnson using django on ubuntu 16.04 > python 3.5.2 > django.VERSION = > (2, 0, 0, 'final', 0) > Working from the Django Core book by Nigel George. > When launching > > (djenv)

Re: module 'django.db.models' has no attribute 'Foreignkey'

2018-11-20 Thread matteo gassend (LanguageMatt)
no problem Il 20 nov 2018, 18:38 +0100, Avitab Ayan Sarmah , ha scritto: > Thanks for your support. I will check and fix it. Thanks > > > On 20-Nov-2018 11:06 PM, "matteo gassend (LanguageMatt)" > > wrote: > > > A ForeignKey requires an “on_delete” argument. This is the > > > function(kinda)

Re: module 'django.db.models' has no attribute 'Foreignkey'

2018-11-20 Thread Avitab Ayan Sarmah
Thanks for your support. I will check and fix it. Thanks On 20-Nov-2018 11:06 PM, "matteo gassend (LanguageMatt)" wrote: A ForeignKey requires an “on_delete” argument. This is the function(kinda) that will be called when you decide to delete an instance of said model. You can see it being used

Re: module 'django.db.models' has no attribute 'Foreignkey'

2018-11-20 Thread matteo gassend (LanguageMatt)
A ForeignKey requires an “on_delete” argument. This is the function(kinda) that will be called when you decide to delete an instance of said model. You can see it being used on the Django official tutorial, https://docs.djangoproject.com/en/dev/intro/tutorial02/#creating-models Il 20 nov 2018,

Re: module 'django.db.models' has no attribute 'Foreignkey'

2018-11-20 Thread Avitab Ayan Sarmah
Hi matteo, Now it is showing as: File "C:\Users\AVITABAYAN\Desktop\django_lectures\first_project\first_app\models.py", line 11, in webpage topic = models.ForeignKey(Topic) TypeError: __init__() missing 1 required positional argument: 'on_delete' Please check :) On Tuesday, November 20,

please my css file is not reflecting on mine page .the css file failed to load from mine base.html file

2018-11-20 Thread Aditya Bohra
Is* -- 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 post to this group, send email to

please my css file is not reflecting on mine page .the css file failed to load from mine base.html file

2018-11-20 Thread Aditya Bohra
I static configured correctly -- 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 post to this group, send email to

please my css file is not reflecting on mine page .the css file failed to load from mine base.html file

2018-11-20 Thread Obodoma Uzondu Vincent
my base.html filee ink rel="stylesheet" href=" https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css; integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous"> https://code.jquery.com/jquery-3.3.1.slim.min.js";

Re: module 'django.db.models' has no attribute 'Foreignkey'

2018-11-20 Thread matteo gassend (LanguageMatt)
the k in ForeignKey is Capitalized Il 20 nov 2018, 17:57 +0100, Avitab Ayan Sarmah , ha scritto: > Hi everyone, > > I have written a code in models.py inside my project folder. I have completed > my code and whenever i execute "python manage.py makemigrations first_app", i > get an error. The

module 'django.db.models' has no attribute 'Foreignkey'

2018-11-20 Thread Avitab Ayan Sarmah
Hi everyone, I have written a code in models.py inside my project folder. I have completed my code and whenever i execute "python manage.py makemigrations first_app", i get an error. The error is mentioned as "AttributeError: module 'django.db.models' has no attribute 'Foreignkey'". My code

Unapplied Migration - how to apply

2018-11-20 Thread Tim Johnson
using django on ubuntu 16.04 python 3.5.2 django.VERSION = (2, 0, 0, 'final', 0) Working from the Django Core book by Nigel George. When launching (djenv) tim@linus:~/prj/cgi/djenv/djtest$ ./manage.py runserver Performing system checks... System check identified no issues (0 silenced). # the

RE: UpdateView: input always rejected

2018-11-20 Thread Matthew Pava
You are not referencing the form in the template that is generated by the UpdateView. Check out https://ccbv.co.uk/projects/Django/2.0/django.views.generic.edit/UpdateView/. If you want to have two forms in a view, that’s fine, but you’ll need to manually add the second form in the

UpdateView: input always rejected

2018-11-20 Thread clavierplayer
I need to render some form fields by hand in order to meet style requirements. I am using UpdateView instead of a ModelForm since I just need a couple of foreign key fields that are already defined on the model, and I am using html elements to prevent invalid data from being entered. I'm

Re: Error when running python manage.py collectstatic

2018-11-20 Thread Jason
I suspect this might be a regression with 3.7. Can you confirm this also exists with latest django 2.0.x version? You can also make a bug report at https://code.djangoproject.com/query -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Error when running python manage.py collectstatic

2018-11-20 Thread Henrik Sejersen
Hi I get an error when running python manage.py collectstatic. The error is a SuspiciousFileOperation exception because “The final path must be the same as the base path”. The strange thing is that I only get this error when my python version is 3.7.1. I do not get the error, if I

Re: Approach to implement a Rest call functionality

2018-11-20 Thread prateek gupta
Got it, I will try to do the same. On Tuesday, November 20, 2018 at 6:12:20 PM UTC+5:30, Yavin Aalto Arba wrote: > > Not sure if we're a bit confused on the use case here. REST framework is a > server side platform which can help you implement apis fast, it's a good > idea to use if you don't

Re: Approach to implement a Rest call functionality

2018-11-20 Thread prateek gupta
Hi @MTS S BOUR, I am not using forms.pr currently. These forms fields are from models.py only. That's I w had not thought about html form. On Tuesday, November 20, 2018 at 5:18:54 PM UTC+5:30, MTS BOUR wrote: > > I didn't really understand what you mean, why not use method Post in a > boutton

More than one parameter in the url

2018-11-20 Thread Elias Coutinho
Good morning friends. In this project I create several Model Questions: https://github.com/CoutinhoElias/pesquisasatisfacao/blob/master/pesquisasatisfacao/core/views.py#L61 Then I create my Client:

Re: Approach to implement a Rest call functionality

2018-11-20 Thread Yavin Aalto Arba
Not sure if we're a bit confused on the use case here. REST framework is a server side platform which can help you implement apis fast, it's a good idea to use if you don't have an endpoint and want fast CRUD implementation. As for having a button on the client side - you can use HTML forms or

Re: Approach to implement a Rest call functionality

2018-11-20 Thread prateek gupta
Thanks @Yavin for your suggestion. I thought I will have to use Django Rest Framework for this functionality, never thought that from front end I can do that :) On Tuesday, November 20, 2018 at 5:17:35 PM UTC+5:30, Yavin Aalto Arba wrote: > > Hi Prateek, > > I think your best option is using

Re: Approach to implement a Rest call functionality

2018-11-20 Thread MTS BOUR
I didn't really understand what you mean, why not use method Post in a boutton in an Html form ? Le mar. 20 nov. 2018 à 12:24, prateek gupta a écrit : > Hi All, > > I have an admin panel built on Django 2.0.6, MySql 5.7 and Python 3.6. > > In this panel I have a field 'PIN' described in

Re: Approach to implement a Rest call functionality

2018-11-20 Thread Yavin Aalto Arba
Hi Prateek, I think your best option is using javascript on the front end - leveraging an ajax post call. On Tue, 20 Nov 2018 at 13:24, prateek gupta wrote: > Hi All, > > I have an admin panel built on Django 2.0.6, MySql 5.7 and Python 3.6. > > In this panel I have a field 'PIN' described in

Approach to implement a Rest call functionality

2018-11-20 Thread prateek gupta
Hi All, I have an admin panel built on Django 2.0.6, MySql 5.7 and Python 3.6. In this panel I have a field 'PIN' described in models.py like below- class MerchantStores(models.Model): store_id = models.AutoField(primary_key=True) pin = models.CharField(unique=True, max_length=45,

Re: Send E-mail to User When Account is Activated though Django Admin Application

2018-11-20 Thread Yavin Aalto Arba
I would also recommend checking out using Signals instead of directly from the view: https://docs.djangoproject.com/en/2.1/topics/signals/ You can then write a a function that will send an email based on the event. The sending email documentation is superb:

Re: file URL missing project name

2018-11-20 Thread Akash Purandare
Hey Jeff It is completely alright to try until we find a solution to this. I quote from the Django Documentation: Note that request.FILES will only contain data if the request method was POST and the