Re: My project is not detecting the geodjango application
I have the same problem as soon as I add "from django.contrib.gis
import models" instead of "from django.db import models", the "sqlall"
command gives this error:
Error: App with label location could not be found. Are you sure your
INSTALLED_APPS setting is correct?
As soon as I add "from django.db import models" back to the models.py
file, the error goes away... I have added "django.contrib.gis" to the
INSTALLED_APPS setting, like the GeoDjango tutorial says, along with
this app. But when I do "syncdb", no new tables are created for the
gis app...
Any clue why this is happening? I am running this on Django v1.1.1
final, on my windows laptop.
Thanks,
Arnav
On Oct 26, 4:56 am, Sahiti Polishetty <sahi.she...@gmail.com> wrote:
> Ya.. I am sure that I have added it in INSTALLED_APPS and I rechecked it as
> well.. My problem is not yet solved..
>
> On Mon, Oct 26, 2009 at 7:23 AM, Dhruv Adhia <druf...@gmail.com> wrote:
> > The error means that are you sure you have added "world" in INSTALLED_APPS
> > which is in settings.py?
>
> > Dhruv Adhia
> >http://www.thirdimension.com
>
> > On Sun, Oct 25, 2009 at 10:35 AM, Sahiti Polishetty <sahi.she...@gmail.com
> > > wrote:
>
> >> Hello .. I want to have google maps in my application, so i created a
> >> project and in that made an application to handle the maps and made the
> >> required changes in the settings.py for the above. But i am getting the
> >> following error when i am trying to issue the command "python manage.py
> >> sqlall world" Error: App with label world could not be found. Are you sure
> >> your INSTALLED_APPS setting is correct? Can some one please help in this
> >> issue . And my models file is as follows: from django.contrib.gis.db import
> >> models class WorldBorders(models.Model): # Regular Django fields
> >> corresponding to the attributes in the # world borders shapefile. name =
> >> models.CharField(max_length=50) area = models.IntegerField() pop2005 =
> >> models.IntegerField('Population 2005') fips = models.CharField('FIPS Code',
> >> max_length=2) iso2 = models.CharField('2 Digit ISO', max_length=2) iso3 =
> >> models.CharField('3 Digit ISO', max_length=3) un =
> >> models.IntegerField('United Nations Code') region =
> >> models.IntegerField('Region Code') subregion =
> >> models.IntegerField('Sub-Region Code') lon = models.FloatField() lat =
> >> models.FloatField() # GeoDjango-specific: a geometry field
> >> (MultiPolygonField), and # overriding the default manager with a GeoManager
> >> instance. mpoly = models.MultiPolygonField() objects = models.GeoManager() #
> >> So the model is pluralized correctly in the admin. class Meta:
> >> verbose_name_plural = "World Borders" # Returns the string representation of
> >> the model. def __unicode__(self): return self.name
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home