私は62行目のコードに問題があり、これを修正する方法はわかりません。初めてこのエラーを受け取ります。それはよく識別されていないようだが、私はそうだと思う。 'は、MESの=のlista_meses [tempNumMes-1]'djangoの実行中にエラーが発生しました
views.py
def crear_pdf(request):
fecha = datetime.date.today()
tempNumMes = fecha.month
year = fecha.year
lista_meses = ["Enero"
, "Febrero"
, "Marzo"
, "Abril"
, "Mayo"
, "Junio"
, "Julio"
, "Agosto"
, "Septiembre"
, "Octubre"
, "Noviembre"
, "Diciembre"]
mes = lista_meses[tempNumMes -1]
return render(request,'pdf_creado.html')
少なくとも、どのラインが62であるかを教えてください。さらに、問題を示すために必要な最小限のコードを削減してください。 –
Sorrry thats that is that that line that mes = lista_meses [tempNumMes - 1] –
インデント問題の修正についてはこちらをご確認ください: http://stackoverflow.com/questions/1024435/how-to-fix-python-indentation –