Hello, please check your polls/views.py file and make sure you have defined
an index function that should somewhat look like this:
from django.http import HttpResponse
def index(request):
return HttpResponse("Hello.")
On Tuesday, October 2, 2018 at 5:10:25 PM UTC+3, ginost7 wrote:
>
> now i
now i get a different error!!!
path('', views.index, name='index'),
AttributeError: module 'polls.views' has no attribute 'index'
On Tuesday, 2 October 2018 14:24:35 UTC+1, ginost7 wrote:
>
> Hello
>
> I am trying the django/mysite/polls tutorial.
>
> After typing, actually copying and pasting
Hello apparently in polls/urls.py i changed the dot :
from django.urls import path
from .import views # PLEASE NOTE THERE IS NO SPACE BETWEEN DOT AND IMPORT!!!
On Tuesday, 2 October 2018 14:46:52 UTC+1, ginost7 wrote:
>
>
>
> On Tuesday, 2 October 2018 14:29:12 UTC+1, Joel wrote:
>>
>> Well, what
On Tuesday, 2 October 2018 14:29:12 UTC+1, Joel wrote:
>
> Well, what does /home/gino/djangoDEV/mysite/polls/urls.py contain?
>
I am just following the first django app tutorial
mysite/polls/urls.py contains the following code:
from django.urls import path
from . import views
urlpatterns =
Well, what does /home/gino/djangoDEV/mysite/polls/urls.py contain?
On Tue, 2 Oct 2018 at 18:55, 'ginost7' via Django users <
django-users@googlegroups.com> wrote:
> Hello
>
> I am trying the django/mysite/polls tutorial.
>
> After typing, actually copying and pasting this:
>
> from django.cont
Hello
I am trying the django/mysite/polls tutorial.
After typing, actually copying and pasting this:
from django.contrib import adminfrom django.urls import include, path
urlpatterns = [
path('polls/', include('polls.urls')),
path('admin/', admin.site.urls),]
Running this command ( i am
Awesome Spot Karen.
On Wednesday, 27 March 2013 15:48:18 UTC, Karen Tracey wrote:
>
> On Wed, Mar 27, 2013 at 11:32 AM, +Emmanuel > wrote:
>
>> Hello there,
>>
>> I am working through the django tutorial at djangoproject.com. So far
>> everything works out fine until Section 2.4.6 (customizing
I completely missed that. Thank you!!
On Tuesday, 28 October 2014 20:20:14 UTC+1, Charly Román wrote:
>
> Import Choice in this file.
>
>
> 2014-10-28 13:06 GMT-06:00 otmeek >:
>
>> I am trying to follow part 4 of the polls app tutorial. I am new to
>> Django and not very experienced with Python
Import Choice in this file.
2014-10-28 13:06 GMT-06:00 otmeek :
> I am trying to follow part 4 of the polls app tutorial. I am new to Django
> and not very experienced with Python or programming in general.
>
> My problem is throwing an error message when "Vote" is pressed without a
> choice bei
I am trying to follow part 4 of the polls app tutorial. I am new to Django
and not very experienced with Python or programming in general.
My problem is throwing an error message when "Vote" is pressed without a
choice being selected.
polls/views.py:
from django.shortcuts import render, get_obj
Thanks for the useful replies!
On Wednesday, March 27, 2013 6:32:06 PM UTC+3, +Emmanuel wrote:
>
> Hello there,
>
> I am working through the django tutorial at djangoproject.com. So far
> everything works out fine until Section 2.4.6 (customizing the admin form).
> Django throws an error: *'mod
Thanks Karen! That fixed the problem :-)
On Wednesday, March 27, 2013 6:48:18 PM UTC+3, Karen Tracey wrote:
>
> On Wed, Mar 27, 2013 at 11:32 AM, +Emmanuel
> > wrote:
>
>> Hello there,
>>
>> I am working through the django tutorial at djangoproject.com. So far
>> everything works out fine until
On Wed, Mar 27, 2013 at 11:32 AM, +Emmanuel wrote:
> Hello there,
>
> I am working through the django tutorial at djangoproject.com. So far
> everything works out fine until Section 2.4.6 (customizing the admin form).
> Django throws an error: *'module' has no attribute 'StackedInLine'. *
>
Rig
On Wed, Mar 27, 2013 at 3:32 PM, +Emmanuel wrote:
> Hello there,
>
> I am working through the django tutorial at djangoproject.com. So far
> everything works out fine until Section 2.4.6 (customizing the admin form).
> Django throws an error: 'module' has no attribute 'StackedInLine'. I
> checked
Hello there,
I am working through the django tutorial at djangoproject.com. So far
everything works out fine until Section 2.4.6 (customizing the admin form).
Django throws an error: *'module' has no attribute 'StackedInLine'. *I
checked around and this seems to work:
*if you use import to inc
On Nov 2, 1:29 pm, Daniel Roseman wrote:
> On Wednesday, 2 November 2011 07:24:39 UTC, rihad wrote:
>
> > render_to_response('polls/detail.html', {'poll': p})
Oops, of course this has no relation to URLs, it's just a filepath :)
--
You received this message because you are subscribed to the
On Nov 2, 1:29 pm, Daniel Roseman wrote:
> On Wednesday, 2 November 2011 07:24:39 UTC, rihad wrote:
>
> > It says at the end of part 3 of the Django tutorial:
>
> > "The idea behind include() and URLconf decoupling is to make it easy
> > to plug-and-play URLs. Now that polls are in their own URL
On Wednesday, 2 November 2011 07:24:39 UTC, rihad wrote:
>
> It says at the end of part 3 of the Django tutorial:
>
> "The idea behind include() and URLconf decoupling is to make it easy
> to plug-and-play URLs. Now that polls are in their own URLconf, they
> can be placed under "/polls/", or un
It says at the end of part 3 of the Django tutorial:
"The idea behind include() and URLconf decoupling is to make it easy
to plug-and-play URLs. Now that polls are in their own URLconf, they
can be placed under "/polls/", or under "/fun_polls/", or under "/
content/polls/", or any other path root,
Apologies, I wasnt sure which bit of the tutorial you where at. I
think I see now the problem. Did you just stop reading after you
entered the last bit of code in views.py?
"""Reload the page. Now you'll see an error:
TemplateDoesNotExist at /polls/"""
So index.html is in /home/me/Templates/poll
I fully understood that and I thought it was implied in that I said I
was working with the tutorial I would have that file created. You only
asked where my template dir was directed to and that I put urls.py in
my reply, I would have put this in there if you had requested. Here it
is. Now, as far a
You see, what I tried to explain in the last message, my friend was
that index in 'polls.views.index') doesnt point the url polls/ to the
index.html but to the function you are suppose to create in the
views.py file in your app directory.
Your view.py file (inside your poll app folder)should look
The index.html file is in the right location, what worries me is that
the template loaders are showing that they are loading nothing. In all
the other qustion in the google groups here that referenced an isssue
with templates not loading, their traceback had something like unable
to find documnet a
Where is your template_dirs in settings.py pointed too?
If you can post your urls.py.
Looking at the tutorial again,
(r'^polls/$', 'polls.views.index'), means that the url 'polls' will
serve the index function in the views.py file inside your polls app.
Your index.html should lie inside the top l
I searched the posts for this, but I couldn't find my issue. I am
getting TemplateDoesNotExist at /polls/ when after adding the
index.html, but the template loaders show no directory being loaded.
My traceback is here http://dpaste.com/261308/. Thanks for the input.
--
You received this message b
Thanks Alex, that did the trick. I had postgresql as my database
engine.
--~--~-~--~~~---~--~~
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 uns
On Thu, Jun 25, 2009 at 11:57 PM, Steve1234 wrote:
>
> I installed psycopg2 as you suggest, however I still have the same
> error. The error complains about psycopg not psycopg2, did I get the
> wrong module? Or something else?
> >
>
In your settings.py make sure you have postressql_psycopg2 se
I installed psycopg2 as you suggest, however I still have the same
error. The error complains about psycopg not psycopg2, did I get the
wrong module? Or something else?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
On Thu, Jun 25, 2009 at 10:56 PM, Steve1234 wrote:
>
> > That's the module for Postgres. What OS are you on? If you can tell
> > us then we can give you specific instructions for installing the
> > module.
> I am running Ubuntu 9, Postges 8.3.7, Python 2.6.2. I installed
> Django using subver
> That's the module for Postgres. What OS are you on? If you can tell
> us then we can give you specific instructions for installing the
> module.
I am running Ubuntu 9, Postges 8.3.7, Python 2.6.2. I installed
Django using subversion.
--~--~-~--~~~---~--~~
You
> I am getting an error working through "Writing your first Django app,
> part 1" tutorial. "python manage.py runserver" generates the error:
>
> ...raise ImproperlyConfigured("Error loading psycopg module: %s" % e)
> django.core.exceptions.ImproperlyConfigured: Error loading psycopg
> module: No
I am getting an error working through "Writing your first Django app,
part 1" tutorial. "python manage.py runserver" generates the error:
...raise ImproperlyConfigured("Error loading psycopg module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading psycopg
module: No module nam
32 matches
Mail list logo