Re: ERROR IndentationError: unindent does not match any outer indentation level

2019-12-03 Thread Kasper Laudrup

Hi EMPOWER EXCEL,

On 03/12/2019 15.30, EMPOWER EXCEL wrote:


   File "/home/flavien/MyProjects/alertprot/ZSalertprot/models.py", line 11
 objects = models.GeoManager()
   ^
IndentationError: unindent does not match any outer indentation level



Indentation is important in Python as it is used for scoping. You 
clearly have placed this line:


objects = models.GeoManager()

so it doesn't match the surrounding scope.

This is very basic Python, so I suggest you start with a basic tutorial 
on Python programming before going on to more advanced topics like 
Django. That will save you a lot of time.


Maybe someone can recommend some tutorials books for beginners?

Kind regards,

Kasper Laudrup

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1cc71dd8-8ccb-1c09-09c8-98d1a60712a9%40stacktrace.dk.


Re: ERROR IndentationError: unindent does not match any outer indentation level

2019-12-03 Thread Tafadzwa Marshal
make sure the "objects=models.GeoManager()"  statement aligns with the
statement "location=models.PointField(sid=4326)"

On Tue, Dec 3, 2019 at 6:30 AM EMPOWER EXCEL  wrote:

> PLEASE PUSH ME UP TO CORRECT THIS PROBLEM:
>
> class Alerts(models.Model):
> name = models.CharField(max_length=20)
> location = models.PointField(srid=4326)
> objects = models.GeoManager()
>
>
> self.models_module = import_module(models_module_name)
>   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in
> import_module
> __import__(name)
>   File "/home/flavien/MyProjects/alertprot/ZSalertprot/models.py", line 11
> objects = models.GeoManager()
>   ^
> IndentationError: unindent does not match any outer indentation level
>
> --
> FLAVIEN HERI
>
> *Information management AscociateUNHCR-Kinshasa*
> Tél:+243978587009
> Skype: flavien.heri1
> Facebook: flavien semi
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAG3GEnzWm_4wAcFboaT%3Dn8OD%3DC1cigm%2B9N-%2Bvib8pin2Uv7BCA%40mail.gmail.com
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFgO-6jn5dr-hBM5_SA6kZFiNLi4rk%2B-5ZnzNsbbErmfWpVeHw%40mail.gmail.com.