Monday, April 30, 2018

Re: Django and Visual Studio Code



On Monday, April 30, 2018 at 4:38:51 AM UTC-7, Simon Connah wrote:
I've got most of Visual Studio Code configured for Django development
(I'm trying it out to see if I can ditch PyCharm and save some money)
and almost everything seems OK.

After moving through BBEdit, TextMate, Sublime and Atom over the years, I'm feeling like VSCode is the most polished, professional editor/IDE I've ever used (never did the pycharm thing). Learn a dozen keyboard shortcuts, and it's like it's reading your mind. 
 

I set the Python path to be the one in the virtual environment, and if
Visual Studio Code needs to install any modules, they go into the
virtual environment.

I use pipenv, and don't like this approach, as it rewrites Pipfile, which is in vcs and gets shared with the team, who all use different editors. I assume it does similar for requirements.txt. Dependencies specific to a given editor should not be forced on an editor-agnostic team. 
 

The major problem is that when I open a terminal in Visual Studio
Code, it doesn't automatically activate the virtual environment, so I
have to source it manually.

When you open a bash terminal, does it automatically activate an environment? I wouldn't expect it to be different in the editor's terminal, and `pipenv shell` still works normally. That said, you might be able to pass startup arguments via `terminal.integrated.shellArgs.*`
 

In addition to that, I haven't managed to get debugging working even
after reading a few tutorials on the subject.

You haven't really told us what's working/not working or how you've gone about setting it up. I just use icecream and good old pdb and log statements (haven't tried deep vscode integration). 

./s
 

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6e853d2a-5613-4a8b-99c3-04c0a84507a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Beginning Django.

Thanks a lot George!

On Apr 30, 2018 00:48, "George Lubaretsi" <glubaretsi@gmail.com> wrote:
Changes in 2.0 that are backwards incompatible are mostly low-level things. As a beginner, you won't have to deal with them for some time. So you can grab any book that is relevant for 1.11 and you'll be fine.

I would actually advise to start your training project using Django 1.11 instead of 2.0, since as a beginner, you'll find great help in 3rd party libraries and some of them are still not compatible with 2.0. Additionally, 1.11 is the LTS release and will be supported until April 2020.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1128e9a6-1ebe-49a9-8c65-92709304eb3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BARzD_F32DgqhMrPKcoY%3DcufKmQOPin45YSCdGUJN0sweyJ0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

url () to path()

Hi there again! Beginner here using Django 2.0.
I'm following a tutorial (coupled with the official doc for compatibility) and I discovered that <2.0 versions use RegEx with the url but 2.0> uses the simplified path() function.
My question is how do I find the right corresponding path() function to a url (),
A cheat sheet would be wonderful.

Cheers!

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BARzD8HO26aTwpdYe1km9_%3DykDgBF_y%3DRfkNhrpFvHmSsea6w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Re: updating model breaks admin

Hi George,

Thanks for the advice. I tried both suggestions and I am still getting the same errors. 

Here is my articles app structure and admin.py:


And here is my site structure:


Thank you!!


On Sun, Apr 29, 2018 at 11:50 PM, George Lubaretsi <glubaretsi@gmail.com> wrote:
If the data is not important, try to delete migration files from `migrations` package, drop the database tables and reference M2M relationship using strings:

tags = models.ManyToManyField('Tag')

Or if the Tag model is in another app:

tags = models.ManyToManyField('app_name.Tag')

Then run `makemigrations` and `migrate`

Can you also share the `Tag` model and related `ModelAdmin` classes?

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9d251f4a-b4ea-48b0-946b-458ea6f2957d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
-----

Gloria Jimenez
Jr. Software Developer

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CADOCafiPg0-jtFMCLOKVufth_D2_3Ttzw9xsc2OkZWP_HZ62ww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Fwd: Re: AttributeError at /admin/login/

I had replied to Daniel Roseman instead of to the users group as I am new to this group.

Thanks to Daniel for his response



-------- Forwarded Message --------
Subject: Re: AttributeError at /admin/login/
Date: Mon, 30 Apr 2018 21:46:35 +0800
From: Gerald Brown <gsbrown43@gmail.com>
To: Daniel Roseman <daniel@roseman.org.uk>


No. You need to show the full traceback.
--
DR. 
--
Here is the full traceback.  It is quite long.

AttributeError at /admin/login/

'datetime.datetime' object has no attribute 'split'
Request Method: POST
Request URL: http://192.168.0.122/admin/login/?next=/admin/
Django Version: 2.0.4
Exception Type: AttributeError
Exception Value:
'datetime.datetime' object has no attribute 'split'
Exception Location: /home/medrec2/.local/lib/python3.6/site-packages/mysql/connector/conversion.py in _DATETIME_to_python, line 506
Python Executable: /home/medrec2/.virtualenvs/medrecproj/bin/python3.6
Python Version: 3.6.5
Python Path:
['/home/medrec2/medrecproj',   '/home/medrec2/.virtualenvs/medrecproj/bin',   '/usr/local/lib/python36.zip',   '/usr/local/lib/python3.6',   '/usr/local/lib/python3.6/lib-dynload',   '/home/medrec2/.local/lib/python3.6/site-packages',   '/usr/local/lib/python3.6/site-packages']
Server time: Sun, 29 Apr 2018 18:31:23 +0800

Traceback Switch to copy-and-paste view

  • /home/medrec2/.local/lib/python3.6/site-packages/django/core/handlers/exception.py in inner
    1.             response = get_response(request)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/core/handlers/base.py in _get_response
    1.                 response = self.process_exception_by_middleware(e, request)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/core/handlers/base.py in _get_response
    1.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/views/decorators/cache.py in _wrapped_view_func
    1.         response = view_func(request, *args, **kwargs)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/contrib/admin/sites.py in login
    1.         return LoginView.as_view(**defaults)(request)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/views/generic/base.py in view
    1.             return self.dispatch(request, *args, **kwargs)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/utils/decorators.py in _wrapper
    1.             return bound_func(*args, **kwargs)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/views/decorators/debug.py in sensitive_post_parameters_wrapper
    1.             return view(request, *args, **kwargs)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/utils/decorators.py in bound_func
    1.                 return func.__get__(self, type(self))(*args2, **kwargs2)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/utils/decorators.py in _wrapper
    1.             return bound_func(*args, **kwargs)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/utils/decorators.py in _wrapped_view
    1.                     response = view_func(request, *args, **kwargs)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/utils/decorators.py in bound_func
    1.                 return func.__get__(self, type(self))(*args2, **kwargs2)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/utils/decorators.py in _wrapper
    1.             return bound_func(*args, **kwargs)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/views/decorators/cache.py in _wrapped_view_func
    1.         response = view_func(request, *args, **kwargs)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/utils/decorators.py in bound_func
    1.                 return func.__get__(self, type(self))(*args2, **kwargs2)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/contrib/auth/views.py in dispatch
    1.         return super().dispatch(request, *args, **kwargs)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/views/generic/base.py in dispatch
    1.         return handler(request, *args, **kwargs)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/views/generic/edit.py in post
    1.         if form.is_valid():
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/forms/forms.py in is_valid
    1.         return self.is_bound and not self.errors
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/forms/forms.py in errors
    1.             self.full_clean()
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/forms/forms.py in full_clean
    1.         self._clean_form()
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/forms/forms.py in _clean_form
    1.             cleaned_data = self.clean()
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/contrib/auth/forms.py in clean
    1.             self.user_cache = authenticate(self.request, username=username, password=password)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/contrib/auth/__init__.py in authenticate
    1.             user = _authenticate_with_backend(backend, backend_path, request, credentials)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/contrib/auth/__init__.py in _authenticate_with_backend
    1.     return backend.authenticate(*args, **credentials)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/contrib/auth/backends.py in authenticate
    1.             user = UserModel._default_manager.get_by_natural_key(username)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/contrib/auth/base_user.py in get_by_natural_key
    1.         return self.get(**{self.model.USERNAME_FIELD: username})
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/db/models/manager.py in manager_method
    1.                 return getattr(self.get_queryset(), name)(*args, **kwargs)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/db/models/query.py in get
    1.         num = len(clone)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/db/models/query.py in __len__
    1.         self._fetch_all()
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/db/models/query.py in _fetch_all
    1.             self._result_cache = list(self._iterable_class(self))
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/db/models/query.py in __iter__
    1.         for row in compiler.results_iter(results):
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/db/models/sql/compiler.py in apply_converters
    1.         for row in map(list, rows):
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/db/models/sql/compiler.py in cursor_iter
    1.         for rows in iter((lambda: cursor.fetchmany(itersize)), sentinel):
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/db/models/sql/compiler.py in <lambda>
    1.         for rows in iter((lambda: cursor.fetchmany(itersize)), sentinel):
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/django/db/utils.py in inner
    1.                 return func(*args, **kwargs)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/mysql/connector/cursor_cext.py in fetchmany
    1.             rows.extend(self._cnx.get_rows(size))
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/mysql/connector/connection_cext.py in get_rows
    1.                                                           row[i])
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/mysql/connector/conversion.py in to_python
    1.             return self._cache_field_types[vtype[1]](value, vtype)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/mysql/connector/django/base.py in _DATETIME_to_python
    1.         dt = MySQLConverter._DATETIME_to_python(self, value)
      ...
  • /home/medrec2/.local/lib/python3.6/site-packages/mysql/connector/conversion.py in _DATETIME_to_python
    1.             (date_, time_) = value.split(b' ')
      ...


As it shows most of the errors occur in the site-packages/mysql/connector.  I am using the mysql-connector-python to connect to the Mariadb database.  I have this same application running on another computer and I do NOT get this error.

Thanks for your reply.

Re: I am following the official Django documentation and trying to make the polls app. But when I run the command python manage.py shell I get the console error.

Thank you Mathew now it is working fine

On Tue 1 May, 2018, 2:39 AM Matthew Pava, <Matthew.Pava@iss.com> wrote:

You need a space between def and __str__

 

From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Avitab Ayan Sarmah
Sent: Monday, April 30, 2018 4:07 PM
To: Django users
Subject: I am following the official Django documentation and trying to make the polls app. But when I run the command python manage.py shell I get the console error.

 

The code of my polls/models.py is:

import datetime

 

from django.db import models

from django.utils import timezone

 

 

class Question(models.Model):

    #...

    def was_published_recently(self):

        return self.pub_date >= timezone.now() - datetime.timedelta(days=1)

    def__str__(self):

        return self.question_text

    question_text = models.CharField(max_length=200)

    pub_date = models.DateTimeField('date published')

 

class Choice(models.Model):

    #...

    def__str__(self):

        return self.choice_text

    question = models.ForeignKey(Question, on_delete=models.CASCADE)

    choice_text = models.CharField(max_length=200)

    votes = models.IntegerField(default=0)

 

Please find the error in my code and help me run my code.The error is attached above

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/84560734-c5cd-4e32-9da4-7aba3202c402%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/xTxwDaYLcYk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/93d21fa128fa46c5a57ec72b7cfd997b%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEx5wm7snNfKwsLCLh8H96taGkEizFQmtnChomb0CzyPZQ070g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

RE: I am following the official Django documentation and trying to make the polls app. But when I run the command python manage.py shell I get the console error.

You need a space between def and __str__

 

From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Avitab Ayan Sarmah
Sent: Monday, April 30, 2018 4:07 PM
To: Django users
Subject: I am following the official Django documentation and trying to make the polls app. But when I run the command python manage.py shell I get the console error.

 

The code of my polls/models.py is:

import datetime

 

from django.db import models

from django.utils import timezone

 

 

class Question(models.Model):

    #...

    def was_published_recently(self):

        return self.pub_date >= timezone.now() - datetime.timedelta(days=1)

    def__str__(self):

        return self.question_text

    question_text = models.CharField(max_length=200)

    pub_date = models.DateTimeField('date published')

 

class Choice(models.Model):

    #...

    def__str__(self):

        return self.choice_text

    question = models.ForeignKey(Question, on_delete=models.CASCADE)

    choice_text = models.CharField(max_length=200)

    votes = models.IntegerField(default=0)

 

Please find the error in my code and help me run my code.The error is attached above

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/84560734-c5cd-4e32-9da4-7aba3202c402%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I am following the official Django documentation and trying to make the polls app. But when I run the command python manage.py shell I get the console error.

The code of my polls/models.py is:
import datetime

from django.db import models
from django.utils import timezone


class Question(models.Model):
    #...
    def was_published_recently(self):
        return self.pub_date >= timezone.now() - datetime.timedelta(days=1)
    def__str__(self):
        return self.question_text
    question_text = models.CharField(max_length=200)
    pub_date = models.DateTimeField('date published')

class Choice(models.Model):
    #...
    def__str__(self):
        return self.choice_text
    question = models.ForeignKey(Question, on_delete=models.CASCADE)
    choice_text = models.CharField(max_length=200)
    votes = models.IntegerField(default=0)

Please find the error in my code and help me run my code.The error is attached above

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/84560734-c5cd-4e32-9da4-7aba3202c402%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: I am following the official Django documentation and trying to make the polls app. But when I run the command python manage.py makemigrations polls I get the console error.

Yes I found the error George, I mistakenly typed polss in settings. Now the code is running fine

On Tue 1 May, 2018, 1:03 AM George Lubaretsi, <glubaretsi@gmail.com> wrote:
Looks like you have a typo somewhere.

Exception says that it can't find a module `polss` while it should be `polls`. Check your settings and imports

On Mon, Apr 30, 2018 at 11:29 PM Avitab Ayan Sarmah <avitabayans@gmail.com> wrote:

The code I am using for the models is:

from django.db import models      class Question(models.Model):      question_text = models.CharField(max_length=200)      pub_date = models.DateTimeField('date published')      class Choice(models.Model):     question = models.ForeignKey(Question)     choice_text = models.CharField(max_length=200)     votes = models.IntegerField(default=0)
The code i am using for mysite/settings is:
INSTALLED_APPS = [      'polls.apps.PollsConfig',      'django.contrib.admin',      'django.contrib.auth',      'django.contrib.contenttypes',      'django.contrib.sessions',      'django.contrib.messages',      'django.contrib.staticfiles',  ]

It would be great if you could point out the error.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/434e4e83-13f5-4688-b388-6c4d767a5273%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/zgCUS5eWxOs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACAWh81_WY%3Dw%2BNm%3DeCYinFJm01ZHbWk9XE2xdm6ursSb8EEnXw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEx5wm5%3D%3D_nocV1jJ8PgSjvzYJ4TDYRPaaA5C%2BN4cFDw5LaUYA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Re: Django and Fullcalendar.

No error, it returns a template full of cluttered tags.

2018-04-28 2:41 GMT-03:00 Andy <kakulukia@gmail.com>:
What kind of error are you getting?

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/ALIFMqCPCz0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f157cd20-7ddd-4692-aa66-9ca028fb143a%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Elias Coutinho.
Aprender sobre alguns assuntos é fundamental.
Aprender sobre Deus é indiscutivelmente o melhor conteúdo.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALgom8pGb9J%2BEzByYrs-fbnf4GUhHW9-R4BkQcpp_HE1bxNLZw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Re: I am following the official Django documentation and trying to make the polls app. But when I run the command python manage.py makemigrations polls I get the console error.

Looks like you have a typo somewhere.

Exception says that it can't find a module `polss` while it should be `polls`. Check your settings and imports

On Mon, Apr 30, 2018 at 11:29 PM Avitab Ayan Sarmah <avitabayans@gmail.com> wrote:

The code I am using for the models is:

from django.db import models      class Question(models.Model):      question_text = models.CharField(max_length=200)      pub_date = models.DateTimeField('date published')      class Choice(models.Model):     question = models.ForeignKey(Question)     choice_text = models.CharField(max_length=200)     votes = models.IntegerField(default=0)
The code i am using for mysite/settings is:
INSTALLED_APPS = [      'polls.apps.PollsConfig',      'django.contrib.admin',      'django.contrib.auth',      'django.contrib.contenttypes',      'django.contrib.sessions',      'django.contrib.messages',      'django.contrib.staticfiles',  ]

It would be great if you could point out the error.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/434e4e83-13f5-4688-b388-6c4d767a5273%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACAWh81_WY%3Dw%2BNm%3DeCYinFJm01ZHbWk9XE2xdm6ursSb8EEnXw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.