Lynn, you should really start your own thread. If you have an error,
copy/paste it entirely, this make debugging a lot easier. And don't
hesitate to share your code.
There is a lot of things that can go wrong when we begin and most give more
or less the same result.
On 12 Apr 2017 9:27 pm,
In the first case he mispelled "urlpatters", it should be "urlpatterns"
(notice the n)
On Wed, Apr 12, 2017 at 3:47 PM, Lynn Capps wrote:
> Shah,
>
> Did you get this figured out? I am having the same issue as you did.
>
>
>
> On Friday, December 9, 2016 at 1:50:22 PM
Shah,
Did you get this figured out? I am having the same issue as you did.
On Friday, December 9, 2016 at 1:50:22 PM UTC-6, shah wrote:
>
> Hi, I am facing the same issue with the tutorial.
>
> I have got my program correct. But after running the sever. It shows an
> error on chrome.
>
> Page
Missing comma on you urlpatterns
urlpatterns = [
url(r'^polls/', include('polls.urls'))* ,*
url(r'^admin/', admin.site.urls),
]
On Fri, Dec 9, 2016 at 4:10 PM, shah wrote:
> Hi, I am facing the same issue with the tutorial.
>
> I have got my program
Hi, I am facing the same issue with the tutorial.
I have got my program correct. But after running the sever. It shows an
error on chrome.
Page not found (404)
Request Method: GET
Request URL: http://localhost:8000/polls/
Using the URLconf defined in mysite.urls, Django tried these URL
In polls/url.py patterns is missing the N.
Dylan
On Mon, Oct 10, 2016 at 5:24 PM, Johnny McClung wrote:
> Thank you. I've added the comma as you mentioned. Can't believe I missed
> that. But now I am getting a new error.
>
>
>
> E:\Dropbox\Python Scripts\mysite>python
Thank you. I've added the comma as you mentioned. Can't believe I missed
that. But now I am getting a new error.
E:\Dropbox\Python Scripts\mysite>python manage.py runserver
Performing system checks...
Unhandled exception in thread started by .wrapper at 0x044B16A8>
Traceback (most recent
try to swap both statement
On Tue, Oct 11, 2016 at 2:13 AM, Tim Graham wrote:
> Add a comma after: url(r'^polls/', include('polls.urls'))
> (these are items in a list, separated by a comma)
>
>
> On Monday, October 10, 2016 at 4:42:30 PM UTC-4, Johnny McClung wrote:
>>
>>
Add a comma after: url(r'^polls/', include('polls.urls'))
(these are items in a list, separated by a comma)
On Monday, October 10, 2016 at 4:42:30 PM UTC-4, Johnny McClung wrote:
>
> I am getting an error when I try to run the Django server.
>
> >> mysite >> polls >> urls.py
> from
I am getting an error when I try to run the Django server.
>> mysite >> polls >> urls.py
from django.conf.urls import url
from . import views
urlpatters = [
url(r'^$', views.index, name='index'),
]
>> mysite >> mysite >> urls.py
from django.conf.urls import include, url
from
Use:
import datetime
class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField(auto_now=True)
class Meta:
ordering = ['-pub_date']
def __str__(self):
return self.question_text
delete all objects of your
Hi,
I'm am trying to follow along with the tutorial, but keep getting this
error when I migrate the models. Here is my models.py file for the polls
app:
from django.db import models
class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date =
like this:
your_project---
|---__init__.py
|---settings.py
|---urls.py
|---manage.py
|---app_A---
|
|---__init__.py
Thank you for the clarification DR. I finished the beginning tutorial on
djangoproject.com. I'm certainly going to need a lot more practice. I'll
fix my code with your changes.
Best,
SB
On Fri, Mar 2, 2012 at 2:21 PM, Daniel Roseman wrote:
> On Friday, 2 March 2012
On Friday, 2 March 2012 21:47:54 UTC, Django_for_SB wrote:
>
> Thank you everyone for your very insightful and helps remarks. I had 2
> issues with my code:
>
> 1) I didn't properly separate my directory strings with commas and
> 2) I need to code the directory structure, and the absolute path
Thank you everyone for your very insightful and helps remarks. I had 2
issues with my code:
1) I didn't properly separate my directory strings with commas and
2) I need to code the directory structure, and the absolute path to the
file itself.
Here is the correct code from within settings.py:
On Wednesday, February 29, 2012 2:46:11 PM UTC-5, Django_for_SB wrote:
>
> Hello All,
>
> I'm going through the tutorial on djangoproject.com, and can't seem to
> hurdle over this section that reads "Write views that actually do
> something"
>
> Here's the code I have so far, which is
Just to get you past the error and display your data, I suggest hard coding
the directory path in your view.
The work your way backwards to the settings file
try
t =
loader.get_template('C:\\Python27\\my_Djando_projects\\mysite\\My_Templates\\polls\\index.html'')
You could also add a
On Wednesday, 29 February 2012 20:03:21 UTC, Django_for_SB wrote:
>
> Hi Anoop,
>
> Thank you for the kind reply, I've tried that already. Here are the 3
> variations that I've attempted so far within settings.py in TEMPLATE_DIRS:
>
>
Try:
'C:\Python27\my_Djando_projects\mysite\My_Templates\polls\index.html'
'C:\Python27\my_Djando_projects\mysite\My_Templates\polls\'
'C:\Python27\my_Djando_projects\mysite\My_Templates\'
Or:
abspath = lambda *p: os.path.abspath(os.path.join(*p))
PROJECT_ROOT = abspath(os.path.dirname(__file__))
Hi Anoop,
Thank you for the kind reply, I've tried that already. Here are the 3
variations that I've attempted so far within settings.py in TEMPLATE_DIRS:
'C:/Python27/my_Djando_projects/mysite/My_Templates/polls/index.html'
'C:/Python27/my_Djando_projects/mysite/My_Templates/polls/'
You have to give template directories, not template names in the
settings.py.
Thanks,
Anoop
atm
___
Life is short, Live it hard.
On 1 March 2012 01:16, Django_for_SB wrote:
> Hello All,
>
> I'm going through the tutorial on djangoproject.com, and can't seem to
>
Hello All,
I'm going through the tutorial on djangoproject.com, and can't seem to
hurdle over this section that reads "Write views that actually do
something"
Here's the code I have so far, which is directly copied from the
tutorial or prescribed by the tutorial:
views.py:
"from django.template
On Sun, Sep 25, 2011 at 10:42 PM, Grant Humphries wrote:
> I am referring to Tutorial number 3. When editing the 'polls/
> index.html' file, the tutorial says to input:
>
> {% if latest_poll_list %}
>
>{% for poll in latest_poll_list %}
>{{
I am referring to Tutorial number 3. When editing the 'polls/
index.html' file, the tutorial says to input:
{% if latest_poll_list %}
{% for poll in latest_poll_list %}
{{ poll.question }}
{% endfor %}
{% else %}
No polls are available.
{% endif %}
I input exactly
Thanks a lot !!
On Sep 22, 6:19 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Mon, Sep 22, 2008 at 11:52 AM, Caisys <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> > I am following the tutorials on django website. My problem is that
> > when i create url conf for views that do not exist, the admin
On Mon, Sep 22, 2008 at 11:52 AM, Caisys <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I am following the tutorials on django website. My problem is that
> when i create url conf for views that do not exist, the admin site
> ceases to work.
> Mysite\urls.py includes:
> (r'^admin/(.*)', admin.site.root),
>
Hi,
I am following the tutorials on django website. My problem is that
when i create url conf for views that do not exist, the admin site
ceases to work.
Mysite\urls.py includes:
(r'^admin/(.*)', admin.site.root),
(r'^polls/', include('mysite.polls.urls')),
Mysite\Polls\urls.py includes:
Can you post the code 5 lines before and after the one that's giving
you the error?
Many times python will report a syntax error in one line that's
actually caused by a missing parenthesis, semicolon, etc., in a line
before.
On May 6, 9:58 am, Jason Ourscene <[EMAIL PROTECTED]> wrote:
> I tried
I tried with the space and without the space and i am still getting
that error.
what do you think?
On May 6, 12:28 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> On 06-May-08, at 9:37 AM, Jason Ourscene wrote:
>
> > def __unicode__(self):
>
> def __unicode__(self): <- space after
On 6 mei, 06:32, Norman <[EMAIL PROTECTED]> wrote:
> and what editor do you use?
> some advice?
Geany (PC & Linux, Mac probably too) is the one I use.
As for books, Core Python Programming is invaluable (to me at least) -
see
On 06-May-08, at 10:02 AM, Norman wrote:
> Kenneth Gonsalves escribió:
>>
>> On 06-May-08, at 9:37 AM, Jason Ourscene wrote:
>>
>>> def __unicode__(self):
>>
>> def __unicode__(self): <- space after 'def'. If you use a
>> python editor it will find errors like this
>>
> and what
Kenneth Gonsalves escribió:
>
> On 06-May-08, at 9:37 AM, Jason Ourscene wrote:
>
>> def __unicode__(self):
>
> def __unicode__(self): <- space after 'def'. If you use a
> python editor it will find errors like this
>
and what editor do you use?
some advice?
--
Norman F. Sáez
On 06-May-08, at 9:37 AM, Jason Ourscene wrote:
> def __unicode__(self):
def __unicode__(self): <- space after 'def'. If you use a
python editor it will find errors like this
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/code/
So i got it django up and running on my mac and am totally excited to
get started, i got a bit into the tutorial when i got to the point
where it asked me to add the __unicode__ method to my model. When i
add it to my model and try to use the shell i get this error. If you
anyone can help me
Thanks for clarifying that Matt - I thought I was going crazy.
On Nov 13, 11:01 am, Matt McClanahan <[EMAIL PROTECTED]>
wrote:
> On Nov 13, 12:38 am, [EMAIL PROTECTED] wrote:
>
> > I am stepping through Dajngo Tutorial (Part 1, to create polls
> > application) and get this error.
>
> >
On Nov 13, 12:38 am, [EMAIL PROTECTED] wrote:
> I am stepping through Dajngo Tutorial (Part 1, to create polls
> application) and get this error.
>
> Unexpected keyword argument 'max length' when running "manage syncdb"
>
> If I change it to "maxlength" it works:
This is the proper solution when
I am stepping through Dajngo Tutorial (Part 1, to create polls
application) and get this error.
Unexpected keyword argument 'max length' when running "manage syncdb"
If I change it to "maxlength" it works:
I did see note in tutorial regarding old version and I was using an
earlier version
On 10/31/07, rhett <[EMAIL PROTECTED]> wrote:
> Loading 'initial_data' fixtures...
> No fixtures found.
This is not an error.
--
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."
--~--~-~--~~~---~--~~
You received this message
Hi List!
I am a newbie to Python and Django and am trying to go through the
tutorial. I am running Django 0.96. I have created a MySQL database
but when I run "python manage.py syncdb" I get the following error:
Loading 'initial_data' fixtures...
No fixtures found.
Also, I can't access the
Hi,
On Oct 2, 1:18 pm, rhett <[EMAIL PROTECTED]> wrote:
> 1) I am working in TextMate and copied/pasted below code. In TextMate
> the "def __str__(self)" is not indented from the pub_date line - it's
> the same indent.
I too use TextMate to do a lot of my Python development. It
consistently
On 10/2/07, rhett <[EMAIL PROTECTED]> wrote:
>
> Total newbie here to Django and Python. Thanks for any insight.
>
> 1) I am working in TextMate and copied/pasted below code. In TextMate
> the "def __str__(self)" is not indented from the pub_date line - it's
> the same indent. I know indents are
Total newbie here to Django and Python. Thanks for any insight.
1) I am working in TextMate and copied/pasted below code. In TextMate
the "def __str__(self)" is not indented from the pub_date line - it's
the same indent. I know indents are important - is there a way to set
up TextMate to show
Malcolm Tredinnick wrote:
> Are you using a Python 2.5 final release and not a pre-release?
>
> The reason I'm asking is because there was a bug in Python-2.5.1
> pre-releases (including the 2.5.1c1 version that shipped with betas of
> Ubuntu Feisty) that caused problems with Django. It's not
On Sat, 2007-04-28 at 22:55 +0530, Parthan SR wrote:
>
> Hello,
>
> I was trying to do the tutorial again and was in tutorial 2 when I met
> with a strange error. As per the tutorial I was adding the choices on
> to the edit polls page. Now, when I select an existing poll (which was
> created
Hello,
I was trying to do the tutorial again and was in tutorial 2 when I met with
a strange error. As per the tutorial I was adding the choices on to the edit
polls page. Now, when I select an existing poll (which was created with the
shell) and try to add another choice, it gives me a type
On 12/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I followed the tutorial up to the Poll.objects.all() call, where I get
this error
>>> from mysite.polls.models import Poll, Choice
>>> Poll.objects.all()
...
I followed the tutorial up to the Poll.objects.all() call, where I get
this error
from mysite.polls.models import Poll, Choice
Poll.objects.all()
Traceback (most recent call last):
File "", line 1, in ?
File
48 matches
Mail list logo