Re: TemplateDoesNotExist Error on deploying

2018-01-13 Thread yingi keme
Okk Jani. I will take note of that too..

Thanks

Yingi Kem

> On 13 Jan 2018, at 10:28 PM, Jani Tiainen  wrote:
> 
> Hi,
> 
> Also be careful with file names. For example windows is case-preserving but 
> case-insensitive. You may accidentally name your templates with different  
> casing which may lead difficult to spot problems. 
> 
> 13.1.2018 22.58 "yingi keme"  kirjoitti:
>> Thanks Kasper. It was the backslash.
>> 
>> Thanks for saving me...
>> 
>> Yingi Kem
>> 
>> > On 13 Jan 2018, at 2:52 PM, Kasper Laudrup  wrote:
>> >
>> > Hi Yingi,
>> >
>> >> On 2018-01-13 14:46, yingi keme wrote:
>> >> I tried deploying my app to pythonanywhere hosting service and i am 
>> >> getting
>> >> TemplateDoesNotExist Error
>> >> Everything seems to work out well with my development server. But its not 
>> >> working fine when hosting
>> >> Anyhelp please!!
>> >> Here is my View
>> >> def Home(request):
>> >> template = 'Home\First.html'
>> >> return render(request, template)
>> >
>> > Avoid using backslashes ('\') in paths. Use a normal slash ('/') instead.
>> >
>> > Not sure if that solves your problem, but it's a good idea anyway.
>> >
>> > Backslashes are used for escaping characters in Python (and most other 
>> > languages).
>> >
>> > Also, if you post the entire error message (not just the exception type) 
>> > it would be much easier to help you.
>> >
>> > 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 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/2d02cda2-6678-607a-87c0-d8a862a35ecd%40stacktrace.dk.
>> > 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+unsubscr...@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/385DF731-B00F-4255-812C-27319239EF33%40gmail.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+unsubscr...@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/CAHn91oeFU1zweEcrQBR0-dE%2BuB8PYc_58LYHMMybu8ZVDDjBMw%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+unsubscr...@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/BD865F69-AC28-4E6A-A385-AC2F2A2418FD%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: TemplateDoesNotExist Error on deploying

2018-01-13 Thread Jani Tiainen
Hi,

Also be careful with file names. For example windows is case-preserving but
case-insensitive. You may accidentally name your templates with different
casing which may lead difficult to spot problems.

13.1.2018 22.58 "yingi keme"  kirjoitti:

> Thanks Kasper. It was the backslash.
>
> Thanks for saving me...
>
> Yingi Kem
>
> > On 13 Jan 2018, at 2:52 PM, Kasper Laudrup 
> wrote:
> >
> > Hi Yingi,
> >
> >> On 2018-01-13 14:46, yingi keme wrote:
> >> I tried deploying my app to pythonanywhere hosting service and i am
> getting
> >> TemplateDoesNotExist Error
> >> Everything seems to work out well with my development server. But its
> not working fine when hosting
> >> Anyhelp please!!
> >> Here is my View
> >> def Home(request):
> >> template = 'Home\First.html'
> >> return render(request, template)
> >
> > Avoid using backslashes ('\') in paths. Use a normal slash ('/') instead.
> >
> > Not sure if that solves your problem, but it's a good idea anyway.
> >
> > Backslashes are used for escaping characters in Python (and most other
> languages).
> >
> > Also, if you post the entire error message (not just the exception type)
> it would be much easier to help you.
> >
> > 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 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/2d02cda2-6678-607a-87c0-d8a862a35ecd%40stacktrace.dk.
> > 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+unsubscr...@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/385DF731-B00F-4255-812C-27319239EF33%40gmail.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+unsubscr...@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/CAHn91oeFU1zweEcrQBR0-dE%2BuB8PYc_58LYHMMybu8ZVDDjBMw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: TemplateDoesNotExist Error on deploying

2018-01-13 Thread yingi keme
Thanks Kasper. It was the backslash. 

Thanks for saving me...

Yingi Kem

> On 13 Jan 2018, at 2:52 PM, Kasper Laudrup  wrote:
> 
> Hi Yingi,
> 
>> On 2018-01-13 14:46, yingi keme wrote:
>> I tried deploying my app to pythonanywhere hosting service and i am getting
>> TemplateDoesNotExist Error
>> Everything seems to work out well with my development server. But its not 
>> working fine when hosting
>> Anyhelp please!!
>> Here is my View
>> def Home(request):
>> template = 'Home\First.html'
>> return render(request, template)
> 
> Avoid using backslashes ('\') in paths. Use a normal slash ('/') instead.
> 
> Not sure if that solves your problem, but it's a good idea anyway.
> 
> Backslashes are used for escaping characters in Python (and most other 
> languages).
> 
> Also, if you post the entire error message (not just the exception type) it 
> would be much easier to help you.
> 
> 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 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/2d02cda2-6678-607a-87c0-d8a862a35ecd%40stacktrace.dk.
> 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+unsubscr...@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/385DF731-B00F-4255-812C-27319239EF33%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: urlopen error [Errno 110] Connection timed out

2018-01-13 Thread suase9303
Yes! i can load the Url 
("http://www.aaasports.co.kr/front/productlist.php?code=0010=2=30==0=1;)
 
without issue. I think the time to load the URL is longer than any other 
URL, but it does not take much long.

I searched for the Postman you suggested. I do not know how to solve this 
problem through Postman...


2018년 1월 9일 화요일 오후 10시 50분 4초 UTC+9, Jason 님의 말:
>
> Are you able to load the URL directly in the browser without issue?  How 
> about using an API client like Postman?  
>

-- 
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 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/51686f84-61d7-45b6-b7cc-b8548c749d10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: want to join IRC

2018-01-13 Thread Jason
That's most likely due to the channel being slow.  I bet if you stayed 
logged in for a couple weeks you would see more activity.  Or even post a 
question?

-- 
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 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/e00e968f-43f4-44fe-9605-9ec071e11230%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: want to join IRC

2018-01-13 Thread Apurva Anil Kunkulol
This is alright, but the thing is that whenever I login, I see no other 
users on the channel talking.
I use this #django-IRC-channel to join. So I want to know if this is 
correct, or there's something else that needs to be done that I'm not 
currently.

On Friday, 12 January 2018 07:43:24 UTC+5:30, pandy...@gmail.com wrote:
>
> Hello Everyone, 
> I want to join #django IRC channel please if someone can help me over.
>
>
>
>
>
> Regards,
> Thank you!
>

-- 
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 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/ae3b7ee6-6eca-491a-8b03-8b84442a7098%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Using the ModelAdmin.inlines class, there is no DELETE button

2018-01-13 Thread FernandoJMM
Good Morning,

I'm customizing the ModelAdmin class inlines attribute. The code is this.

class NaveInline(admin.TabularInline):
model = Nave
fields = ['codigoNave', 'nave', 'tipoPuesta']
ordering = ['codigoNave']
extra = 1


class GranjaAdmin(admin.ModelAdmin):
fieldsets = [
(None, {'fields': [('codigoGranja', 'granja'), ('empresa', 
'tipoGranja'), ('regimen')]}),
('Datos adicionales', {'fields': [('direccion', 'localidad', 
'codigoPostal', 
'provincia', 'region', 'pais', 'telefonoPrincipal', 
'telefonoMovil', 
'fax', 'email', 'ceence','cea', 'maquina', 
'clasificacionZootecnica', 
'formaDeCria', 'notas')], 'classes': ['collapse']}),
]

inlines = [NaveInline]

 

. . . . . .  



Everything works perfectly, I can add granjas / naves, edit granjas / 
naves, and clear granjas. . but I can not do it is to delete naves that in 
this case are the lines (inlines).

I do not get any errors, I can see the line selection check but the line 
deletion button DOES NOT APPEAR.

Thanks for your help,
Fernando

-- 
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 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/c21e2ff0-a1d0-4f83-b6c9-bc91a8d1e7e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: TemplateDoesNotExist Error on deploying

2018-01-13 Thread Kasper Laudrup

Hi Yingi,

On 2018-01-13 14:46, yingi keme wrote:

I tried deploying my app to pythonanywhere hosting service and i am getting

TemplateDoesNotExist Error

Everything seems to work out well with my development server. But its 
not working fine when hosting


Anyhelp please!!

Here is my View

def Home(request):
     template = 'Home\First.html'
     return render(request, template)



Avoid using backslashes ('\') in paths. Use a normal slash ('/') instead.

Not sure if that solves your problem, but it's a good idea anyway.

Backslashes are used for escaping characters in Python (and most other 
languages).


Also, if you post the entire error message (not just the exception type) 
it would be much easier to help you.


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 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/2d02cda2-6678-607a-87c0-d8a862a35ecd%40stacktrace.dk.
For more options, visit https://groups.google.com/d/optout.


Re: GeoDjango GDAL Slice Error in layer.py

2018-01-13 Thread Jason
Are you able to access any features in the layer?

eg, the snippet above the one that gives you the error

>>> for feat in lyr:

...print(feat.get('NAME'), feat.geom.num_points)




On Friday, January 12, 2018 at 5:37:10 PM UTC-5, Justin Johnson wrote:
>
>
>
> I'm completely new to GeoDjango.  I'm working through the tutorial for 
> Django version 2.0, and I am encountering an error when I follow the steps 
> in the GeoDjango section.  
>
> Specifically, when I attempt to slice a Layer object to extract Features, 
> it gives me an error which looks like a possible bug.   I'll go through the 
> steps here.
>
>
>1. 
>
> https://docs.djangoproject.com/en/2.0/ref/contrib/gis/tutorial/#importing-spatial-data
>1. in this section of the tutorial, we import spatial data and use the 
>   GDAL library to work with an imported shapefile of world borders
>   2. Next, through the Django shell, I create a DataSource object 
>   
> 
>  
>   using the *django.contrib.gis.gdal *module
>   3. I am able to retrieve, from this DataSource object, a Layer 
>   object 
>    
>   containing Features for each polygon
>   4. I can work through the examples showing the properties of that 
>   Layer object, and iterate through the Features in the Layer, so I know 
>   that's working
>2. The problem is when I try to Slice a Layer, to extract a subset of 
>Features: 
>   1. The example says I should be able to run  *>>> lyr[0:2]* and 
>   receive two Feature objects
>   2. However, what I get is an error message saying there is an 
>   IndexError, and it mentions a TypeError
>
>
> This is an image of the Traceback
>
>
> 
>
>
>
> And here is the traceback in text:
>
>
>
> In [12]: lyr[0:2]
> ---
> IndexErrorTraceback (most recent call last)
>  in ()
> > 1 lyr[0:2]
>
> c:\projects\python\env\ENV3\lib\site-packages\django\contrib\gis\gdal\layer.py
>  
> in __getitem__(self, index)
>  49 # A slice was given
>  50 start, stop, stride = index.indices(self.num_feat)
> ---> 51 return [self._make_feature(fid) for fid in 
> range(start, stop, stride)]
>  52 else:
>  53 raise TypeError('Integers and slices may only be used 
> when indexing OGR Layers.')
>
> c:\projects\python\env\ENV3\lib\site-packages\django\contrib\gis\gdal\layer.py
>  
> in (.0)
>  49 # A slice was given
>  50 start, stop, stride = index.indices(self.num_feat)
> ---> 51 return [self._make_feature(fid) for fid in 
> range(start, stop, stride)]
>  52 else:
>  53 raise TypeError('Integers and slices may only be used 
> when indexing OGR Layers.')
>
> c:\projects\python\env\ENV3\lib\site-packages\django\contrib\gis\gdal\layer.py
>  
> in _make_feature(self, feat_id)
>  88 return feat
>  89 # Should have returned a Feature, raise an IndexError.
> ---> 90 raise IndexError('Invalid feature id: %s.' % feat_id)
>  91
>  92 #  Layer properties 
>
> IndexError: Invalid feature id: 0.
>
>
>
> Again, I'm totally new to GeoDjango, so this could all be a user error.  I 
> have restarted the tutorial 3 times and it always fails at the slice 
> example.  The comment in the Traceback mentioning an IndexError has me 
> wondering.
>
> Thanks in advance.
>
>
>

-- 
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 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/82b69997-caed-4330-aef7-4d5c26bc6656%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


TemplateDoesNotExist Error on deploying

2018-01-13 Thread yingi keme
I tried deploying my app to pythonanywhere hosting service and i am getting

TemplateDoesNotExist Error

Everything seems to work out well with my development server. But its not 
working fine when hosting

Anyhelp please!!

Here is my View

def Home(request):
template = 'Home\First.html'
return render(request, template)

-- 
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 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/5078f6e6-1c01-450d-8933-e8abb5632aa2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.