MySQL caching_sha2_password

2018-05-18 Thread Kadir Guloglu
Hi I am connect to MySQL database and I am getting this exception Thanks for help DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'host': '78.135.79.26', 'database': 'otomabakdb', 'user': 'otomabakus', 'password': 'password1',

RE: def get_queryset(self): ^ IndentationError: unindent does not match any outer indentation level

2018-05-18 Thread Matthew Pava
Avitab, Whitespace is very important to Python. You added an extra tab to your else and else clause of your try expression. Consider the error message: unindent does not match outer indentation level The message is mentioning indents, so let’s check our indents for any problems. try:

Re: New project in virtual env referencing another project's default/redirected path

2018-05-18 Thread Nitin Kumar
There is community version of pycharm. Please write the logs that will be helpful. On Fri, May 18, 2018 at 10:48 PM, wrote: > Hi James, > > Thanks for suggestion. I would buy that. > > Meanwhile, is there anyway, i could resolve this. > > Regards, > Ankit > > On Friday, May 18, 2018 at 6:41:29

Re: Django 2.0 MongoDB

2018-05-18 Thread Manuel Pita
I have tried a library called djongo, although I have never used it for a production environment. https://nesdis.github.io/djongo/get-started/ Greetings. 2018-05-18 5:59 GMT+02:00 Ryan Nowakowski : > Django is typically used with a SQL database. There's a fork of Django > called non-rel that wo

Re: Django 2.0 MongoDB

2018-05-18 Thread Manuel Pita
yo he probado una libreria llamada djongo, aunque nunca lo he usado para un entorno de produccion. https://nesdis.github.io/djongo/get-started/ Saludos. 2018-05-18 5:59 GMT+02:00 Ryan Nowakowski : > Django is typically used with a SQL database. There's a fork of Django > called non-rel that wor

Re: New project in virtual env referencing another project's default/redirected path

2018-05-18 Thread ankitklinkedin
Hi James, Thanks for suggestion. I would buy that. Meanwhile, is there anyway, i could resolve this. Regards, Ankit On Friday, May 18, 2018 at 6:41:29 PM UTC+2, James Farris wrote: > > This is where an IDE like PyCharm comes in handy. It will tell you right > away that it doesn’t recognize som

Re: getting error while reloading the url"http://localhost:8000/polls/".The error is given below.Please tell my why i am seeing this error?

2018-05-18 Thread James Farris
What does your urls.py look like? According to the error it doesn’t appear that polls/ is defined in your urls.py file On Fri, May 18, 2018 at 10:05 AM Avitab Ayan Sarmah wrote: > Page not found (404) > Request Method: GET > Request URL: http://localhost:8000/polls/ > > Using the URLconf define

Re: def get_queryset(self): ^ IndentationError: unindent does not match any outer indentation level

2018-05-18 Thread Avitab Ayan Sarmah
Thank you james i found the error and now another error i found please help me on this.You will see this as another topic On Friday, May 18, 2018 at 10:22:13 PM UTC+5:30, Avitab Ayan Sarmah wrote: > > Hi james,Please check my code clearly because i didn;t found any > indentation error and every

getting error while reloading the url"http://localhost:8000/polls/".The error is given below.Please tell my why i am seeing this error?

2018-05-18 Thread Avitab Ayan Sarmah
Page not found (404) Request Method: GET Request URL: http://localhost:8000/polls/ Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order: 1. [name='index'] 2. / [name='detail'] 3. /results/ [name='results'] 4. /vote/ [name='vote'] 5. admin/ The

Re: def get_queryset(self): ^ IndentationError: unindent does not match any outer indentation level

2018-05-18 Thread Avitab Ayan Sarmah
Hi james,Please check my code clearly because i didn;t found any indentation error and everything is same On Friday, May 18, 2018 at 10:09:35 PM UTC+5:30, James Farris wrote: > > The Indentation error is related to the spaces you have when you write > your code. > > Based on looking at what you

Re: ImportError : cannot import name include

2018-05-18 Thread James Farris
If you are not using a virtual env, did you install pip3? If so, since you are using puthon3 -V to get that python version, try running $ pip3 install django And see if you get a different result I think what is happening is when you run pip install it’s referencing another python version, not pyt

Re: New project in virtual env referencing another project's default/redirected path

2018-05-18 Thread James Farris
This is where an IDE like PyCharm comes in handy. It will tell you right away that it doesn’t recognize something and will suggest importing that package. It does a pretty good job with its suggestions. On Fri, May 18, 2018 at 9:35 AM Nitin Kumar wrote: > you have to import include. > > from dja

Re: New project in virtual env referencing another project's default/redirected path

2018-05-18 Thread ankitklinkedin
Hi Nitin, Thanks for response. I think, include has been imported already. Please check below. Kindly see if this not correct. (Picking these lines from earlier code). # Use include() to add URLS from the catalog application and authentication system from django.urls import include Regards

Re: def get_queryset(self): ^ IndentationError: unindent does not match any outer indentation level

2018-05-18 Thread James Farris
The Indentation error is related to the spaces you have when you write your code. Based on looking at what you copy/pasted The indentation of your def get_queryset is different from your other def’s. Python is very picky of how much or how little you indent your code for good reason. Everything

Re: New project in virtual env referencing another project's default/redirected path

2018-05-18 Thread Nitin Kumar
you have to import include. from django.urls import path, include On Fri, May 18, 2018 at 9:45 PM, wrote: > Hi Nitin, > > Thanks for quick response. > > Please find the below code from locallibrary/urls.py > > Could you please let me know, where shall i add the url. > > > --

Re: New project in virtual env referencing another project's default/redirected path

2018-05-18 Thread ankitklinkedin
Hi Nitin, Thanks for quick response. Please find the below code from locallibrary/urls.py Could you please let me know, where shall i add the url. ---

Re: New project in virtual env referencing another project's default/redirected path

2018-05-18 Thread Nitin Kumar
Hi Ankit, You must add the urls of catalog to the project urls, locallibrary.urls. On Fri, May 18, 2018 at 8:32 PM, wrote: > Hi Doug, > > I am new to Django and i also started with MDN Locallibrary project. > Everything went fine until Django admin site but I stuck at "Creating our > home page

def get_queryset(self): ^ IndentationError: unindent does not match any outer indentation level

2018-05-18 Thread Avitab Ayan Sarmah
While going through the django project i committed an error while executing "python manage.py runserver" inside my project directory.It is showing error is in line 24 of views.py.Please comment what exact the error is and how do i overcome this error.The exceptions and views.py is mentioned belo

Re: ImportError : cannot import name include

2018-05-18 Thread Journal-Immo
Thank you for all your answers I know my problem with version So for me it's very strange... python3 -V Python 3.5.3 pip install Django==2.0.5 Collecting Django==2.0.5... Could nt find a version... 1.2.1, 1.2.2 etc and the last one 1.11.13 No matching distribution found fot Django==2.0.5

Re: New project in virtual env referencing another project's default/redirected path

2018-05-18 Thread ankitklinkedin
Hi Doug, I am new to Django and i also started with MDN Locallibrary project. Everything went fine until Django admin site but I stuck at "Creating our home page " I have written the code in the suggested way only but

Re: ImportError : cannot import name include

2018-05-18 Thread Gerald Brown
Another option to get the current version of Django is to create a file called requirements.txt.  In this file enter django on a line, and other requirements on other lines.  You can also specify a specific version with django==1.11 or any other version by changing the number after the ==. If t

Re: ImportError : cannot import name include

2018-05-18 Thread Fidel Leon
You need to follow the CORRECT tutorial: https://docs.djangoproject.com/en/1.11/ In the urls.py file, instead of: from django.contrib import adminfrom django.urls import include, path urlpatterns = [ path('polls/', include('polls.urls')), path('admin/', admin.site.urls),] you need this:

Re: ImportError : cannot import name include

2018-05-18 Thread Daniel Hepper
Your problem is right here: > django-admin --version 1.11.13 You are using Django 1.11. The documentation you are using refers to a newer version of Django, version 2.0. Use the right documentation for your version of Django: https://docs.djangoproject.com/en/1.11/ You are seeing this specific

Re: ImportError : cannot import name include

2018-05-18 Thread Journal-Immo
Thank But (I use debian 9) Apt-get update Apt-get install python python3 python-django django-admin --version 1.11.13 Where is the problem ? Le 17/05/2018 à 21:01, Fidel Leon a écrit : You are using the wrong combination of Django and tutorial: “include” is available in Django 2 and up, bu

Re: Problem with debug = True/False

2018-05-18 Thread Gerald Brown
My site now looks the same in Development and Production. I think why this is happening is that I ran ./manage.py collectstatic awhile ago, So if you are getting weird formatting when DEBUG = False try running ./manage.py collectstatic and see if that solves your problem!!! On Friday, May 11,

Re: Error Djongo MongoDB

2018-05-18 Thread 180328818
test 在 2018年5月18日星期五 UTC+10上午7:09:18,Kadir Guloglu写道: > > Hi > > I am try to connect MongoDB and I am getting an exception > > *Thanks for help* > > *CMD* > > *c:\Proje\otomabakv2\otomabak\otomabak>python manage.py makemigrations* > *Traceback (most recent call last):* > * File "manage.py", line

Re: Django 2.1 alpha 1 released

2018-05-18 Thread Cigi Sebastine
Fantastic framework in web technology. Thanks & Regards Cigi Sebastine On Fri, May 18, 2018 at 7:18 AM, Aditya Singh wrote: > Wow wow wow! My best and nost powerful framework in the world. Super > excited for the new release! > Kind Regards, > Aditya > > On Fri, May 18, 2018, 6:45 AM Tim Graham

Re: Public Django administrative database

2018-05-18 Thread Christian Ledermann
https://github.com/mysociety/mapit http://djjr-courses.wikidot.com/soc128:qgis-voronoi-polygons On 18 May 2018 at 11:27, Christian Ledermann wrote: > and to get areas from the Postcode points: > https://github.com/roblascelles/uk-postcode-map/wiki/Cobbling-together-UK- > postcode-area-data > > O

Re: Public Django administrative database

2018-05-18 Thread Christian Ledermann
and to get areas from the Postcode points: https://github.com/roblascelles/uk-postcode-map/wiki/Cobbling-together-UK-postcode-area-data On 18 May 2018 at 11:24, Christian Ledermann wrote: > https://github.com/cleder/os-opendata-edubase > > TL;DR: use OS-Open > > On 18 May 2018 at 09:18, Daniel

Re: Public Django administrative database

2018-05-18 Thread Christian Ledermann
https://github.com/cleder/os-opendata-edubase TL;DR: use OS-Open On 18 May 2018 at 09:18, Daniel Chimeno wrote: > Hi community! > > I'm involved in a project heavily related to administrative geographic > entities in UK. > (postal_sectors, postal areas, etc..) > Although at the moment is only

Public Django administrative database

2018-05-18 Thread Daniel Chimeno
Hi community! I'm involved in a project heavily related to administrative geographic entities in UK. (postal_sectors, postal areas, etc..) Although at the moment is only for UK, could be expanded to other countries. At first, I look into https://github.com/django/django-localflavor/tree/master/l

Django ModelAdmin ignores has_delete_permission

2018-05-18 Thread Vitaly Trifanov
I have simple project on Django 1.11.13, that uses ordinary Django's admin module. Staff user can not delete object while is permitted (has_delete_permission returns always true). models.py: class MyModel(models.Model): name = models.IntegerField("Value", blank=True, null=True) admin.py

Re: Field.choices get all items as json

2018-05-18 Thread Majid Hojati
In fact I want to convert all of these choises into json format and then send them to user thanks On Thursday, May 17, 2018 at 8:46:42 PM UTC+4:30, C. Kirby wrote: > > if you just want to put that into json do: > import json > > YEAR_IN_SCHOOL_CHOICES = ( > ('FR', 'Freshman'), > ('SO', '