Re: Writing your first Django app, part 1¶

2020-01-09 Thread Mike Dewhirst

On 10/01/2020 1:09 pm, Garrett Wiseman wrote:


Hello Everyone, 

This may sound stupid. When people know a skill so well. Its sometimes 
hard to think someone wouldn't know the most basic information. New to 
coding write code for Arduino.


Garrett

I fully understand what you are saying. And it doesn't sound stupid. A 
friend of mine can't cook and his girlfriend said he should take a 
cooking class. He said he couldn't find one where the first lesson was 
"This is a saucepan". She left him for someone less selfish.


I'm sure lots of people will respond with all sorts of advice but I 
think you are in a valuable position because you have first impressions 
of the documentation and that's what people see when they first start 
looking. First impressions are easily forgotten once you get involved.


You should consider re-writing the documentation or a section of it 
perhaps called "Absolute beginners".


Django is open source and everyone is welcome to contribute[1]. The 
correct way to do that is by writing a ticket requesting a particular 
improvement to the docs or the software. Then you should submit your 
correction/improvement in response to the ticket. If it is considered 
valuable by the gatekeepers they will use it.


Welcome

Mike

[1] https://docs.djangoproject.com/en/dev/internals/contributing/



When your on the

  * documentation page
  o Writing your first Django app, part 1¶ .
  + Then it says "We’ll assume you have Django installed
already.
You can tell Django is installed and which version by
running the followingcommand in a shell prompt (indicated
by the $ prefix):"
 +
$  python -m django --version (

You may want to put a screenshot or explain what a shell prompt is. I 
was reading this i'm still new to learning this and I didnt know. I 
had to look it up. I know that is part of the coding find the answers 
and dealing with issues. If someone new to this. Make it easy for them 
to start. Without being stopped. Just to get the program going.


--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/03021fc5-de84-410f-9004-208805d8543f%40googlegroups.com 
.


--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8778f4ad-379c-ca13-9b0a-5e5f96ca96d7%40dewhirst.com.au.


Re: Writing your first Django app, part 1 - Can't Follow it

2019-08-01 Thread Lim Kai Wey
Glad it all worked out. Good luck at your journey.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPcVkjifx9H-OGXzyq1q9V4DX9z3pz36O3mwmxMKbnQ7wN%3Dh_A%40mail.gmail.com.


Re: Writing your first Django app, part 1 - Can't Follow it

2019-08-01 Thread Franck Tchouanga
coool am glad it was helpful. Welcome .

On Thu, Aug 1, 2019 at 12:13 PM Sammy Agrawal  wrote:

> Thank you all so much! Franck's suggestion did it and now I'm further
> along on my Django journey!
>
> On Thu, Aug 1, 2019 at 6:42 AM Lim Kai Wey  wrote:
>
>> Besides that, I do recommend Morzilla's Django Tutorial too, as it covers
>> more in the tutorial compared to Django's own tutorial.
>>
>> Link:
>>
>> https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Tutorial_local_library_website
>>
>>
>> Regards,
>> Kai Wey
>>
>> On Thu, Aug 1, 2019 at 6:35 PM Lim Kai Wey  wrote:
>>
>>> I do agree that you Sammy could try changing the mysite/mysite/setting.py
>>>
>>>   INSTALLED_APPS=[
>>> 'polls.apps.PollsConfig',
>>>  
>>>The rest of the code
>>>   """
>>>]
>>>
>>> And I too was wondering if he placed 'polls/' as his URL in
>>> mysite/polls/urls.py that cause the error. (IF that is the case)
>>> But in my opinion, for future development purposes and good practice to
>>> know which django app you are at while browsing at webpage.
>>> Remain the mysite/mysite/urls.py as it is. The code should be:
>>>
>>> from django.contrib import admin
>>> from django.urls import include, path
>>>
>>> urlpatterns = [
>>> path('polls/', include('polls.urls')),
>>> path('admin/', admin.site.urls),
>>> ]
>>>
>>> and instead change the mysite/polls/urls.py The code should be:
>>>
>>> from django.urls import path
>>> from . import views
>>>
>>> urlpatterns = [
>>> path('', views.IndexView.as_view(), name='index'),
>>> ]
>>>
>>> Please do correct me if I am wrong. Hope it helps.
>>>
>>> Regards,
>>> Kai Wey
>>>
>>> On Thu, Aug 1, 2019 at 6:17 PM Franck Tchouanga 
>>> wrote:
>>>
 I wanted to precise at the level of the syntax from what I wrote above

  Urlpatterns = [

   Path(' ',include('polls.URLs')),
   Path('admin/', admin.site.urls),
]

 --
 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 view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/a79f2408-a229-4048-a859-bda8e0675e9e%40googlegroups.com
 .

>>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/dV46T9ZqPhA/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAPcVkjiSOhVSGpUYBSfAAo%2BLXdRrR6_k3-ydjXu76ZatsbNmZQ%40mail.gmail.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHUCoeigYRgPLSyjdCdBC3uCWsasZZQwGzGT0pxxKatOFShpaw%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANRJ%3D3%3DFntX%3DGL1T4WfUFfUhRcmXeoNaiTUFtSJsdY9xfH0U2g%40mail.gmail.com.


Re: Writing your first Django app, part 1 - Can't Follow it

2019-08-01 Thread Franck Tchouanga
Yes, so respect the syntaxes exactly it is written by default in django,
its a better practice to avoid unwanted errors.

Just need to  give modification depending on the project you created

On Thu, Aug 1, 2019 at 12:07 PM Nde Nguti  wrote:

> Just out of curiosity, Python is case sensitive. The function names,
> 'path' and variable 'urlpatterns'.  I have gone through the tutorials with
> no problem.
>
> On Thu, Aug 1, 2019, 11:04 Franck Tchouanga  wrote:
>
>> Firstly in your mysite/mysite/URLs.py in the url patterns portion instead
>> type this
>>
>> Urlpatterns=[
>>
>>   Path('',include ('polls.URLs')),
>>   Path('admin/',admin.site.URLs),
>> ]
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/31740f34-af4a-42a1-bdbd-898d67db162a%40googlegroups.com
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CALfkE84TgFUE2Cp6nGico_GTKrKwMv34EwavMuOSuupLtTbeHg%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANRJ%3D3%3DgohC9m%2BZuaLGkyuheu4oLpGoH5pZKUmXJVke-Vhdq4g%40mail.gmail.com.


Re: Writing your first Django app, part 1 - Can't Follow it

2019-08-01 Thread Rana Sarkar
You check your app name ,then check
Include ('appname.urls')
U also create urls.py inside your app.

On Thu, Aug 1, 2019, 17:07 Sunny Kumar  wrote:

> Hi,
>
> I also having the same problem. And the actual reason was *(poll instead
> of polls). *Please check once in your view or url file. I am sure you
> also having the same issue.
>
>
>
> [image: Mailtrack]
> 
>  Sender
> notified by
> Mailtrack
> 
>  08/01/19,
> 10:43:28 AM
>
> On Thu, Aug 1, 2019 at 6:08 AM Anike Sadia  wrote:
>
>> Hi I am new here
>>
>> On Thu, 1 Aug 2019 at 01:33, Lim Kai Wey  wrote:
>>
>>> Sammy, would you mind attaching the whole project folder? Thanks
>>>
>>> Regards,
>>> Kai Wey
>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAPcVkjjfaAg1WWDcDmKu4%3DWpys0tUkqGdOJnu-qTL2UcNi1dhw%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CADi3Mtu27MK793j3hNdLMWXCg_RuTLb%3D1ptXazBAeZk-QCxNDg%40mail.gmail.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2B1wcGhiY7aBO%3D3dCab_p7tax%3DhYbjkot2mCm5GappW6CShVNQ%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFKLk0ze39qFmGgBLMSw-2f%2BYMnWZbgw7NTHAH0c_uHeqhB8Dw%40mail.gmail.com.


Re: Writing your first Django app, part 1 - Can't Follow it

2019-08-01 Thread Sammy Agrawal
Thank you all so much! Franck's suggestion did it and now I'm further along
on my Django journey!

On Thu, Aug 1, 2019 at 6:42 AM Lim Kai Wey  wrote:

> Besides that, I do recommend Morzilla's Django Tutorial too, as it covers
> more in the tutorial compared to Django's own tutorial.
>
> Link:
>
> https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Tutorial_local_library_website
>
>
> Regards,
> Kai Wey
>
> On Thu, Aug 1, 2019 at 6:35 PM Lim Kai Wey  wrote:
>
>> I do agree that you Sammy could try changing the mysite/mysite/setting.py
>>
>>   INSTALLED_APPS=[
>> 'polls.apps.PollsConfig',
>>  
>>The rest of the code
>>   """
>>]
>>
>> And I too was wondering if he placed 'polls/' as his URL in
>> mysite/polls/urls.py that cause the error. (IF that is the case)
>> But in my opinion, for future development purposes and good practice to
>> know which django app you are at while browsing at webpage.
>> Remain the mysite/mysite/urls.py as it is. The code should be:
>>
>> from django.contrib import admin
>> from django.urls import include, path
>>
>> urlpatterns = [
>> path('polls/', include('polls.urls')),
>> path('admin/', admin.site.urls),
>> ]
>>
>> and instead change the mysite/polls/urls.py The code should be:
>>
>> from django.urls import path
>> from . import views
>>
>> urlpatterns = [
>> path('', views.IndexView.as_view(), name='index'),
>> ]
>>
>> Please do correct me if I am wrong. Hope it helps.
>>
>> Regards,
>> Kai Wey
>>
>> On Thu, Aug 1, 2019 at 6:17 PM Franck Tchouanga 
>> wrote:
>>
>>> I wanted to precise at the level of the syntax from what I wrote above
>>>
>>>  Urlpatterns = [
>>>
>>>   Path(' ',include('polls.URLs')),
>>>   Path('admin/', admin.site.urls),
>>>]
>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/a79f2408-a229-4048-a859-bda8e0675e9e%40googlegroups.com
>>> .
>>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/dV46T9ZqPhA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPcVkjiSOhVSGpUYBSfAAo%2BLXdRrR6_k3-ydjXu76ZatsbNmZQ%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHUCoeigYRgPLSyjdCdBC3uCWsasZZQwGzGT0pxxKatOFShpaw%40mail.gmail.com.


Re: Writing your first Django app, part 1 - Can't Follow it

2019-08-01 Thread Nde Nguti
Just out of curiosity, Python is case sensitive. The function names, 'path'
and variable 'urlpatterns'.  I have gone through the tutorials with no
problem.

On Thu, Aug 1, 2019, 11:04 Franck Tchouanga  wrote:

> Firstly in your mysite/mysite/URLs.py in the url patterns portion instead
> type this
>
> Urlpatterns=[
>
>   Path('',include ('polls.URLs')),
>   Path('admin/',admin.site.URLs),
> ]
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/31740f34-af4a-42a1-bdbd-898d67db162a%40googlegroups.com
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALfkE84TgFUE2Cp6nGico_GTKrKwMv34EwavMuOSuupLtTbeHg%40mail.gmail.com.


Re: Writing your first Django app, part 1 - Can't Follow it

2019-08-01 Thread Sunny Kumar
Hi,

I also having the same problem. And the actual reason was *(poll instead of
polls). *Please check once in your view or url file. I am sure you also
having the same issue.



[image: Mailtrack]

Sender
notified by
Mailtrack

08/01/19,
10:43:28 AM

On Thu, Aug 1, 2019 at 6:08 AM Anike Sadia  wrote:

> Hi I am new here
>
> On Thu, 1 Aug 2019 at 01:33, Lim Kai Wey  wrote:
>
>> Sammy, would you mind attaching the whole project folder? Thanks
>>
>> Regards,
>> Kai Wey
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAPcVkjjfaAg1WWDcDmKu4%3DWpys0tUkqGdOJnu-qTL2UcNi1dhw%40mail.gmail.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CADi3Mtu27MK793j3hNdLMWXCg_RuTLb%3D1ptXazBAeZk-QCxNDg%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B1wcGhiY7aBO%3D3dCab_p7tax%3DhYbjkot2mCm5GappW6CShVNQ%40mail.gmail.com.


Re: Writing your first Django app, part 1 - Can't Follow it

2019-08-01 Thread Lim Kai Wey
Besides that, I do recommend Morzilla's Django Tutorial too, as it covers
more in the tutorial compared to Django's own tutorial.

Link:
https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Tutorial_local_library_website


Regards,
Kai Wey

On Thu, Aug 1, 2019 at 6:35 PM Lim Kai Wey  wrote:

> I do agree that you Sammy could try changing the mysite/mysite/setting.py
>
>   INSTALLED_APPS=[
> 'polls.apps.PollsConfig',
>  
>The rest of the code
>   """
>]
>
> And I too was wondering if he placed 'polls/' as his URL in
> mysite/polls/urls.py that cause the error. (IF that is the case)
> But in my opinion, for future development purposes and good practice to
> know which django app you are at while browsing at webpage.
> Remain the mysite/mysite/urls.py as it is. The code should be:
>
> from django.contrib import admin
> from django.urls import include, path
>
> urlpatterns = [
> path('polls/', include('polls.urls')),
> path('admin/', admin.site.urls),
> ]
>
> and instead change the mysite/polls/urls.py The code should be:
>
> from django.urls import path
> from . import views
>
> urlpatterns = [
> path('', views.IndexView.as_view(), name='index'),
> ]
>
> Please do correct me if I am wrong. Hope it helps.
>
> Regards,
> Kai Wey
>
> On Thu, Aug 1, 2019 at 6:17 PM Franck Tchouanga 
> wrote:
>
>> I wanted to precise at the level of the syntax from what I wrote above
>>
>>  Urlpatterns = [
>>
>>   Path(' ',include('polls.URLs')),
>>   Path('admin/', admin.site.urls),
>>]
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/a79f2408-a229-4048-a859-bda8e0675e9e%40googlegroups.com
>> .
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPcVkjiSOhVSGpUYBSfAAo%2BLXdRrR6_k3-ydjXu76ZatsbNmZQ%40mail.gmail.com.


Re: Writing your first Django app, part 1 - Can't Follow it

2019-08-01 Thread Lim Kai Wey
I do agree that you Sammy could try changing the mysite/mysite/setting.py

  INSTALLED_APPS=[
'polls.apps.PollsConfig',
 
   The rest of the code
  """
   ]

And I too was wondering if he placed 'polls/' as his URL in
mysite/polls/urls.py that cause the error. (IF that is the case)
But in my opinion, for future development purposes and good practice to
know which django app you are at while browsing at webpage.
Remain the mysite/mysite/urls.py as it is. The code should be:

from django.contrib import admin
from django.urls import include, path

urlpatterns = [
path('polls/', include('polls.urls')),
path('admin/', admin.site.urls),
]

and instead change the mysite/polls/urls.py The code should be:

from django.urls import path
from . import views

urlpatterns = [
path('', views.IndexView.as_view(), name='index'),
]

Please do correct me if I am wrong. Hope it helps.

Regards,
Kai Wey

On Thu, Aug 1, 2019 at 6:17 PM Franck Tchouanga 
wrote:

> I wanted to precise at the level of the syntax from what I wrote above
>
>  Urlpatterns = [
>
>   Path(' ',include('polls.URLs')),
>   Path('admin/', admin.site.urls),
>]
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a79f2408-a229-4048-a859-bda8e0675e9e%40googlegroups.com
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPcVkji72KQ7Cqq89xKJKnghQWDKsJ12Sc4SUH4qpSQtUiJVrQ%40mail.gmail.com.


Re: Writing your first Django app, part 1 - Can't Follow it

2019-08-01 Thread Franck Tchouanga
I wanted to precise at the level of the syntax from what I wrote above

 Urlpatterns = [
   
  Path(' ',include('polls.URLs')),
  Path('admin/', admin.site.urls),
   ]

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a79f2408-a229-4048-a859-bda8e0675e9e%40googlegroups.com.


Re: Writing your first Django app, part 1 - Can't Follow it

2019-08-01 Thread Franck Tchouanga
In the mysite/mysite/setting.py do as follows

INSTALLED_APPS=[
'Polls.apps.pollsConfig',
 
   The rest of the code
  """
   ]


So you should erase the polls you wrote at the end. Hope will be helpful 
waiting for your feedbacks

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f311bfdf-bc77-4eeb-96b9-a9776e006a6d%40googlegroups.com.


Re: Writing your first Django app, part 1 - Can't Follow it

2019-08-01 Thread Franck Tchouanga
Firstly in your mysite/mysite/URLs.py in the url patterns portion instead type 
this

Urlpatterns=[

  Path('',include ('polls.URLs')),
  Path('admin/',admin.site.URLs),
]

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/31740f34-af4a-42a1-bdbd-898d67db162a%40googlegroups.com.


Re: Writing your first Django app, part 1 - Can't Follow it

2019-08-01 Thread Franck Tchouanga
Got the solution to your problem

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/95974b69-b28d-4474-bfcd-d680003f2a5a%40googlegroups.com.


Re: Writing your first Django app, part 1 - Can't Follow it

2019-07-31 Thread Anike Sadia
Hi I am new here

On Thu, 1 Aug 2019 at 01:33, Lim Kai Wey  wrote:

> Sammy, would you mind attaching the whole project folder? Thanks
>
> Regards,
> Kai Wey
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPcVkjjfaAg1WWDcDmKu4%3DWpys0tUkqGdOJnu-qTL2UcNi1dhw%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADi3Mtu27MK793j3hNdLMWXCg_RuTLb%3D1ptXazBAeZk-QCxNDg%40mail.gmail.com.


Re: Writing your first Django app, part 1 - Can't Follow it

2019-07-31 Thread Lim Kai Wey
Sammy, would you mind attaching the whole project folder? Thanks

Regards,
Kai Wey

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPcVkjjfaAg1WWDcDmKu4%3DWpys0tUkqGdOJnu-qTL2UcNi1dhw%40mail.gmail.com.


Re: Writing your first Django app, part 1 - Can't Follow it

2019-07-31 Thread Sammy Agrawal
I’m on Mac, and am still having this problem.
On Wed, Jul 31, 2019 at 10:46 AM Charlotte Wood <
charlotte.w...@epiccharterschools.org> wrote:

> Windows?
>
> On Wed, Jul 31, 2019, 6:20 AM Sammy Agrawal  wrote:
>
>> Still having this problem- no solution found
>>
>> On Tuesday, February 9, 2016 at 7:22:58 PM UTC-5, michaela...@gmail.com
>> wrote:
>>>
>>> Hi,
>>>
>>> I am running into the same problem as this:
>>>
>>> http://stackoverflow.com/questions/30493018/404-error-in-writing-your-first-django-app-tutorial
>>>
>>> Now I can just follow the Alasdair's recommendation and delete the
>>> polls/url.py file, but the tutorial is very clear about having two separate
>>> urls.py. 
>>> Is this a mistake in the tutorial?
>>>
>>> I even copied and pasted the tutorials code and tried to run it and it
>>> still gave the same error:
>>> *ImportError: No module named 'polls.urls'*
>>>
>>> Very confusing for a first step tutorial, maybe this could be corrected
>>> if it is an issue?
>>>
>>> Kind Regards
>>>
>>
>>> 
>>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/abb48a60-7ff7-445a-8468-616fc6f30ea2%40googlegroups.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/dV46T9ZqPhA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPZR0N5XnyD%2BeG8ND-Uq%3DnkNEAM4hcjHsX%2BmxO2YLD-b0RCZxQ%40mail.gmail.com
> 
> .
>
-- 
- Sammy

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHUCoei16dXLtznLf-WakojNuK8wSdfNZ%3DhBn%3DvFXEJ1OHX4sw%40mail.gmail.com.


Re: Writing your first Django app, part 1 - Can't Follow it

2019-07-31 Thread Charlotte Wood
Windows?

On Wed, Jul 31, 2019, 6:20 AM Sammy Agrawal  wrote:

> Still having this problem- no solution found
>
> On Tuesday, February 9, 2016 at 7:22:58 PM UTC-5, michaela...@gmail.com
> wrote:
>>
>> Hi,
>>
>> I am running into the same problem as this:
>>
>> http://stackoverflow.com/questions/30493018/404-error-in-writing-your-first-django-app-tutorial
>>
>> Now I can just follow the Alasdair's recommendation and delete the
>> polls/url.py file, but the tutorial is very clear about having two separate
>> urls.py. 
>> Is this a mistake in the tutorial?
>>
>> I even copied and pasted the tutorials code and tried to run it and it
>> still gave the same error:
>> *ImportError: No module named 'polls.urls'*
>>
>> Very confusing for a first step tutorial, maybe this could be corrected
>> if it is an issue?
>>
>> Kind Regards
>> 
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/abb48a60-7ff7-445a-8468-616fc6f30ea2%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPZR0N5XnyD%2BeG8ND-Uq%3DnkNEAM4hcjHsX%2BmxO2YLD-b0RCZxQ%40mail.gmail.com.


Re: Writing your first Django app, part 1 - Can't Follow it

2019-07-31 Thread Lim Kai Wey
To Sammy,

Are you sure your urls.py is in the correct file directory? As in it should
be in mysite/mysite/urls.py instead of mysite/urls.py

Regards,
Kai Wey

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPcVkjh5_TcV2DF9OcDKtfAzt%3D%3Djqcnivce5aq9bJTT0WuBeQQ%40mail.gmail.com.


Re: Writing your first Django app, part 1 - Can't Follow it

2019-07-31 Thread Karan Mittal
Give the polls.urls in quotes like this.
"polls.urls"

Karan Mittal

On Wed 31 Jul, 2019, 4:50 PM Sammy Agrawal,  wrote:

> Still having this problem- no solution found
>
> On Tuesday, February 9, 2016 at 7:22:58 PM UTC-5, michaela...@gmail.com
> wrote:
>>
>> Hi,
>>
>> I am running into the same problem as this:
>>
>> http://stackoverflow.com/questions/30493018/404-error-in-writing-your-first-django-app-tutorial
>>
>> Now I can just follow the Alasdair's recommendation and delete the
>> polls/url.py file, but the tutorial is very clear about having two separate
>> urls.py. 
>> Is this a mistake in the tutorial?
>>
>> I even copied and pasted the tutorials code and tried to run it and it
>> still gave the same error:
>> *ImportError: No module named 'polls.urls'*
>>
>> Very confusing for a first step tutorial, maybe this could be corrected
>> if it is an issue?
>>
>> Kind Regards
>> 
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/abb48a60-7ff7-445a-8468-616fc6f30ea2%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAO24gqzFRsz6iuhb0XTx6J4RJOy%3DW6q2cy8ND0%3DNausjk%2Bt%3DgQ%40mail.gmail.com.


Re: Writing your first Django app, part 1 - Can't Follow it

2019-07-31 Thread Sammy Agrawal
Still having this problem- no solution found

On Tuesday, February 9, 2016 at 7:22:58 PM UTC-5, michaela...@gmail.com 
wrote:
>
> Hi, 
>
> I am running into the same problem as this:
>
> http://stackoverflow.com/questions/30493018/404-error-in-writing-your-first-django-app-tutorial
>
> Now I can just follow the Alasdair's recommendation and delete the 
> polls/url.py file, but the tutorial is very clear about having two separate 
> urls.py. 
> Is this a mistake in the tutorial?
>
> I even copied and pasted the tutorials code and tried to run it and it 
> still gave the same error:
> *ImportError: No module named 'polls.urls'*
>
> Very confusing for a first step tutorial, maybe this could be corrected if 
> it is an issue?
>
> Kind Regards
> 
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/abb48a60-7ff7-445a-8468-616fc6f30ea2%40googlegroups.com.


Re: Writing your first Django app, part 1 - Can't Follow it

2016-02-10 Thread James Schneider
On Feb 9, 2016 4:22 PM,  wrote:
>
> Hi,
>
> I am running into the same problem as this:
>
http://stackoverflow.com/questions/30493018/404-error-in-writing-your-first-django-app-tutorial
>
> Now I can just follow the Alasdair's recommendation and delete the
polls/url.py file, but the tutorial is very clear about having two separate
urls.py.
> Is this a mistake in the tutorial?

If you follow the official tutorial, you will have two urls.py files.

One is located at mysite/mysite/urls.py, having been created by the
'startproject' command. This is your primary urls.py file that is
referenced in your settings.py as the starting point for all URL lookups by
default, as automatically configured by the 'startproject' command.

The second will be located at mysite/polls/urls.py, and is created by the
'startapp' command listed in the tutorial. This file is referenced by your
primary project urls.py using an include() function. Any URL's that match
the regular expression for the include statement in your primary file will
then begin searching through your app urls.py for further matches.

If you are on a Linux host, everything is case-sensitive, so make sure your
upper/lower case code references match your actual directory structure.

-James

-- 
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/CA%2Be%2BciU%2B91xsZ-fC7JUYMiL_n4%2BEJu%3D8f7oWXqOmqe1etxUyQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Writing your first Django app, part 1 - Can't Follow it

2016-02-10 Thread michaelatnanocube
Hi, thank you that was it!


On Wednesday, February 10, 2016 at 4:48:11 AM UTC+2, bipulr wrote:
>
> I remember doing the django tutorial long time back, it just works.
>
> The import error means that file polls/urls.py is not there. Check may be 
> you have left "s" in ulrs. You might have created polls/url.py.
>
>
> On 10 February 2016 at 04:05,  wrote:
>
>> Hi, 
>>
>> I am running into the same problem as this:
>>
>> http://stackoverflow.com/questions/30493018/404-error-in-writing-your-first-django-app-tutorial
>>
>> Now I can just follow the Alasdair's recommendation and delete the 
>> polls/url.py file, but the tutorial is very clear about having two separate 
>> urls.py. 
>> Is this a mistake in the tutorial?
>>
>> I even copied and pasted the tutorials code and tried to run it and it 
>> still gave the same error:
>> *ImportError: No module named 'polls.urls'*
>>
>> Very confusing for a first step tutorial, maybe this could be corrected 
>> if it is an issue?
>>
>> Kind Regards
>> 
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@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/44703fc1-518a-4a25-ae56-4a7b2992860a%40googlegroups.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/2166cc69-67e1-4f9e-9422-e107e59a90ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Writing your first Django app, part 1 - Can't Follow it

2016-02-09 Thread Thiago Reis
* 'Mysite.urls"

2016-02-09 23:54 GMT-03:00 Thiago Reis :

> I believe it is because your (MySite) is in upper case.
>
> ROOT_URLCONF = 'mysite.urls'
>
> must be:
>
> ROOT_URLCONF = 'MySite.urls'
>
>
> 2016-02-09 23:47 GMT-03:00 Bipul Raj :
>
>> I remember doing the django tutorial long time back, it just works.
>>
>> The import error means that file polls/urls.py is not there. Check may be
>> you have left "s" in ulrs. You might have created polls/url.py.
>>
>>
>> On 10 February 2016 at 04:05,  wrote:
>>
>>> Hi,
>>>
>>> I am running into the same problem as this:
>>>
>>> http://stackoverflow.com/questions/30493018/404-error-in-writing-your-first-django-app-tutorial
>>>
>>> Now I can just follow the Alasdair's recommendation and delete the
>>> polls/url.py file, but the tutorial is very clear about having two separate
>>> urls.py. 
>>> Is this a mistake in the tutorial?
>>>
>>> I even copied and pasted the tutorials code and tried to run it and it
>>> still gave the same error:
>>> *ImportError: No module named 'polls.urls'*
>>>
>>> Very confusing for a first step tutorial, maybe this could be corrected
>>> if it is an issue?
>>>
>>> Kind Regards
>>> 
>>>
>>> --
>>> 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/44703fc1-518a-4a25-ae56-4a7b2992860a%40googlegroups.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/CAHHn46SB%3Dhsx3pP5BBVVPmBbUb_eoiuzVGd5EwLVV8Djr7yVKw%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/CAHQaGTAG036H1hnX8zYmU939UrOZxj09ksEErY2wR%3Dv18dz3nA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Writing your first Django app, part 1 - Can't Follow it

2016-02-09 Thread Thiago Reis
I believe it is because your (MySite) is in upper case.

ROOT_URLCONF = 'mysite.urls'

must be:

ROOT_URLCONF = 'MySite.urls'


2016-02-09 23:47 GMT-03:00 Bipul Raj :

> I remember doing the django tutorial long time back, it just works.
>
> The import error means that file polls/urls.py is not there. Check may be
> you have left "s" in ulrs. You might have created polls/url.py.
>
>
> On 10 February 2016 at 04:05,  wrote:
>
>> Hi,
>>
>> I am running into the same problem as this:
>>
>> http://stackoverflow.com/questions/30493018/404-error-in-writing-your-first-django-app-tutorial
>>
>> Now I can just follow the Alasdair's recommendation and delete the
>> polls/url.py file, but the tutorial is very clear about having two separate
>> urls.py. 
>> Is this a mistake in the tutorial?
>>
>> I even copied and pasted the tutorials code and tried to run it and it
>> still gave the same error:
>> *ImportError: No module named 'polls.urls'*
>>
>> Very confusing for a first step tutorial, maybe this could be corrected
>> if it is an issue?
>>
>> Kind Regards
>> 
>>
>> --
>> 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/44703fc1-518a-4a25-ae56-4a7b2992860a%40googlegroups.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/CAHHn46SB%3Dhsx3pP5BBVVPmBbUb_eoiuzVGd5EwLVV8Djr7yVKw%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/CAHQaGTBiu5v23vn%2BT3W23eceH-%3D%3DGLJ2nw8jTPXef_YpVj%2B9RQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Writing your first Django app, part 1 - Can't Follow it

2016-02-09 Thread Bipul Raj
I remember doing the django tutorial long time back, it just works.

The import error means that file polls/urls.py is not there. Check may be
you have left "s" in ulrs. You might have created polls/url.py.


On 10 February 2016 at 04:05,  wrote:

> Hi,
>
> I am running into the same problem as this:
>
> http://stackoverflow.com/questions/30493018/404-error-in-writing-your-first-django-app-tutorial
>
> Now I can just follow the Alasdair's recommendation and delete the
> polls/url.py file, but the tutorial is very clear about having two separate
> urls.py. 
> Is this a mistake in the tutorial?
>
> I even copied and pasted the tutorials code and tried to run it and it
> still gave the same error:
> *ImportError: No module named 'polls.urls'*
>
> Very confusing for a first step tutorial, maybe this could be corrected if
> it is an issue?
>
> Kind Regards
> 
>
> --
> 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/44703fc1-518a-4a25-ae56-4a7b2992860a%40googlegroups.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/CAHHn46SB%3Dhsx3pP5BBVVPmBbUb_eoiuzVGd5EwLVV8Djr7yVKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Writing your first Django app, part 1 - Django 1.7 - # Make sure our __str__() addition worked.

2015-02-04 Thread Vijay Khemlani
Don't worry :)

On Wed, Feb 4, 2015 at 7:00 PM, Gavin Patrick McCoy <
gavin.mcc...@mail.dcu.ie> wrote:

> Sorry about that. Thanks a million for your reply.
>
> On Wednesday, 4 February 2015 17:38:16 UTC, Vijay Khemlani wrote:
>>
>> The method is called "__str__" (note the double underscore at both ends)
>>
>> On Wed, Feb 4, 2015 at 2:29 PM, Gavin Patrick McCoy <
>> gavin@mail.dcu.ie> wrote:
>>
>>> Hi,
>>>
>>> Just started learning Django today. I got down to the last grey box of
>>> code on https://docs.djangoproject.com/en/1.7/intro/tutorial01/#
>>> writing-your-first-django-app-part-1 and when I checked to see of the
>>> __str__() addition to models.py worked, it didn't. I didn't get [>> What's up?>], I got []. I tried creating a
>>> new question again and did but now I get  [, 
>>> >> Question object>]. I then tried 'the three-step guide to making model
>>> changes: Change your models (in models.py). Run python manage.py
>>> makemigrations
>>> 
>>> to create migrations for those changes. Run python manage.py migrate
>>> 
>>> to apply those changes to the database.' I still got  [>> Question object>, ]. Any ideas? Any help
>>> would be greatly appreciated.
>>>
>>> Thanks, Gavin
>>>
>>> My models.py looks like this:
>>>
>>> import datetime
>>> from django.db import models
>>> from django.utils import timezone
>>> # Create your models here.
>>> class Question(models.Model):
>>> question_text = models.CharField(max_length=200)
>>> pub_date = models.DateTimeField('date published')
>>>
>>> def _str_(self):
>>> return self.question_text
>>>
>>> def was_published_recently(self):
>>> return self.pub_date >= timezone.now() -
>>> datetime.timedelta(days=1)
>>>
>>> class Choice(models.Model):
>>> question = models.ForeignKey(Question)
>>> choice_text = models.CharField(max_length=200)
>>> votes = models.IntegerField(default=0)
>>> def __str(self):
>>> return self.choice_text
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/django-users/e518a27e-da82-4c93-884f-a7a941d23853%
>>> 40googlegroups.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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/6acc2808-2fe9-4643-9d17-c5eaec00e592%40googlegroups.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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALn3ei1mbKuzMRSDR1w8awfzBMTKfmbi0C8%2BXFks-3tzZ8S5EA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Writing your first Django app, part 1 - Django 1.7 - # Make sure our __str__() addition worked.

2015-02-04 Thread Gavin Patrick McCoy
Sorry about that. Thanks a million for your reply.

On Wednesday, 4 February 2015 17:38:16 UTC, Vijay Khemlani wrote:
>
> The method is called "__str__" (note the double underscore at both ends)
>
> On Wed, Feb 4, 2015 at 2:29 PM, Gavin Patrick McCoy  > wrote:
>
>> Hi,
>>
>> Just started learning Django today. I got down to the last grey box of 
>> code on 
>> https://docs.djangoproject.com/en/1.7/intro/tutorial01/#writing-your-first-django-app-part-1
>>  and 
>> when I checked to see of the __str__() addition to models.py worked, it 
>> didn't. I didn't get [], I got [> Question object>]. I tried creating a new question again and did but now 
>> I get  [, ]. I 
>> then tried 'the three-step guide to making model changes: Change your 
>> models (in models.py). Run python manage.py makemigrations 
>> 
>>  
>> to create migrations for those changes. Run python manage.py migrate 
>> 
>>  
>> to apply those changes to the database.' I still got  [> Question object>, ]. Any ideas? Any help 
>> would be greatly appreciated. 
>>
>> Thanks, Gavin
>>
>> My models.py looks like this: 
>>
>> import datetime
>> from django.db import models
>> from django.utils import timezone
>> # Create your models here.
>> class Question(models.Model):
>> question_text = models.CharField(max_length=200)
>> pub_date = models.DateTimeField('date published')
>> 
>> def _str_(self):
>> return self.question_text
>> 
>> def was_published_recently(self):
>> return self.pub_date >= timezone.now() - 
>> datetime.timedelta(days=1)
>> 
>> class Choice(models.Model):
>> question = models.ForeignKey(Question)
>> choice_text = models.CharField(max_length=200)
>> votes = models.IntegerField(default=0)
>> def __str(self):
>> return self.choice_text
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/e518a27e-da82-4c93-884f-a7a941d23853%40googlegroups.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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6acc2808-2fe9-4643-9d17-c5eaec00e592%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Writing your first Django app, part 1 - Django 1.7 - # Make sure our __str__() addition worked.

2015-02-04 Thread Vijay Khemlani
The method is called "__str__" (note the double underscore at both ends)

On Wed, Feb 4, 2015 at 2:29 PM, Gavin Patrick McCoy <
gavin.mcc...@mail.dcu.ie> wrote:

> Hi,
>
> Just started learning Django today. I got down to the last grey box of
> code on
> https://docs.djangoproject.com/en/1.7/intro/tutorial01/#writing-your-first-django-app-part-1
>  and
> when I checked to see of the __str__() addition to models.py worked, it
> didn't. I didn't get [], I got [ object>]. I tried creating a new question again and did but now I get  
> [ Question object>, ]. I then tried 'the
> three-step guide to making model changes: Change your models (in models.py).
> Run python manage.py makemigrations
> 
> to create migrations for those changes. Run python manage.py migrate
> 
> to apply those changes to the database.' I still got  [ Question object>, ]. Any ideas? Any help would
> be greatly appreciated.
>
> Thanks, Gavin
>
> My models.py looks like this:
>
> import datetime
> from django.db import models
> from django.utils import timezone
> # Create your models here.
> class Question(models.Model):
> question_text = models.CharField(max_length=200)
> pub_date = models.DateTimeField('date published')
>
> def _str_(self):
> return self.question_text
>
> def was_published_recently(self):
> return self.pub_date >= timezone.now() - datetime.timedelta(days=1)
>
> class Choice(models.Model):
> question = models.ForeignKey(Question)
> choice_text = models.CharField(max_length=200)
> votes = models.IntegerField(default=0)
> def __str(self):
> return self.choice_text
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e518a27e-da82-4c93-884f-a7a941d23853%40googlegroups.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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALn3ei0XsGF%3D6%3DUXFO-OeVPOK1_swXvivxJ%2BfvcEMwnvvW93bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Writing your first Django App Part 1

2014-09-02 Thread Max Nathaniel Ho
Thanks!

For the codes, do I save them in views.py?

On Wednesday, September 3, 2014 7:23:07 AM UTC+8, Jonathan Querubina wrote:
>
> Just tupe in. Do not worry. 
>
> Is just for learning about the shell and its power 
>
> Sent from my iPhone 
>
> > On Sep 2, 2014, at 20:07, Max Nathaniel Ho  > wrote: 
> > 
> > I'm following the instructions in the tutorial but am stuck at this 
> part. 
> > 
> > We are told to type in "python manage.py shell" and explore the database 
> API. 
> > 
> > Thereafter there is a chunk of code that is presented. 
> > 
> > Am I supposed to type it into my Command Prompt box, and when I do, it 
> will be saved automatically? 
> > 
> > Where can I find the codeos so that I edit the codes in the future? 
> > 
> > Thanks! 
> > 
> > -- 
> > 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...@googlegroups.com . 
> > To post to this group, send email to django...@googlegroups.com 
> . 
> > Visit this group at http://groups.google.com/group/django-users. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/7c4092e5-e8d4-4d15-8065-0f8139d0743f%40googlegroups.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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/80fc1a22-1f0b-4c20-b5b1-e113f16f4dbc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Writing your first Django App Part 1

2014-09-02 Thread Jonathan Querubina
Just tupe in. Do not worry. 

Is just for learning about the shell and its power

Sent from my iPhone

> On Sep 2, 2014, at 20:07, Max Nathaniel Ho  wrote:
> 
> I'm following the instructions in the tutorial but am stuck at this part.
> 
> We are told to type in "python manage.py shell" and explore the database API. 
> 
> Thereafter there is a chunk of code that is presented. 
> 
> Am I supposed to type it into my Command Prompt box, and when I do, it will 
> be saved automatically? 
> 
> Where can I find the codeos so that I edit the codes in the future?
> 
> Thanks!
> 
> -- 
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/7c4092e5-e8d4-4d15-8065-0f8139d0743f%40googlegroups.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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/F1D9152A-339E-4169-A51B-6CEBFCDBC816%40me.com.
For more options, visit https://groups.google.com/d/optout.


Re: Writing your first Django app, part 1 (1.6)

2013-12-11 Thread Suhendri
Dear all,

The problem is solved..

The root cause were in models.py. I missed type a variable for return value 
on Choice Class.

Anyway, big thanks for all your supports


On Wednesday, December 11, 2013 5:19:48 AM UTC+7, Suhendri wrote:
>
> Hi,
>
> I'm new in Django, I'm excited with Django so I have to following the 
> existing tutorial to knew how to create a program with Django.
>
> I started with tutorial 1, Writing your first Django app, part1. I used 
> Django 1.6 and SQLite
>
>
> I followed the instructions from the starting of the tutorial, until the 
> line of *# Create three choices* I got an error.
>
> When I typed p.choice_set.create(choice_text='Not much', votes=0), I got 
> an error:
> *AttributeError: Traceback (most recent call last):*
> *...*
> *AttributeError: 'Choice' object has no attribute 'question'*
>
> I followed the tutorial exactly as it shown on web, but I got an error on 
> that line. Did I missed something in the tutorial ?
>
> Could you help me, to solve this problem so i can continue learn the 
> tutorial.
>

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/34ca401d-6697-4314-9348-9a23073f920b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Writing your first Django app, part 1 (1.6)

2013-12-11 Thread Alasdair Nicol

Hi,

The Django tutorial has changed between 1.6 and the current development 
version. Because your error references the Choices.question field, it 
sounds as if you may have been following the development version in places.


Make sure that you follow the Django 1.6 tutorial throughout. If you 
retry and follow the instructions, it should work.


You can select the version of the tutorial using the selector in the 
bottom-right corner of the screen.


Cheers,
Alasdair

On 10/12/13 22:19, Suhendri wrote:

Hi,

I'm new in Django, I'm excited with Django so I have to following the
existing tutorial to knew how to create a program with Django.

I started with tutorial 1, Writing your first Django app, part1. I used
Django 1.6 and SQLite


I followed the instructions from the starting of the tutorial, until the
line of *# Create three choices* I got an error.

When I typed p.choice_set.create(choice_text='Not much', votes=0), I got
an error:
*AttributeError: Traceback (most recent call last):*
*...*
*AttributeError: 'Choice' object has no attribute 'question'*

I followed the tutorial exactly as it shown on web, but I got an error
on that line. Did I missed something in the tutorial ?

Could you help me, to solve this problem so i can continue learn the
tutorial.



--
Alasdair Nicol
Developer, MEMSET

mail: alasd...@memset.com
 web: http://www.memset.com/

Memset Ltd., registration number 4504980.
Building 87, Dunsfold Park, Stovolds Hill, Cranleigh, Surrey, GU6 8TB, UK

--
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/52A839AB.1070607%40memset.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Writing your first Django app, part 1 (1.6)

2013-12-11 Thread Tom Evans
On Tue, Dec 10, 2013 at 10:19 PM, Suhendri  wrote:
> Hi,
>
> I'm new in Django, I'm excited with Django so I have to following the
> existing tutorial to knew how to create a program with Django.
>
> I started with tutorial 1, Writing your first Django app, part1. I used
> Django 1.6 and SQLite
>
>
> I followed the instructions from the starting of the tutorial, until the
> line of # Create three choices I got an error.
>
> When I typed p.choice_set.create(choice_text='Not much', votes=0), I got an
> error:
> AttributeError: Traceback (most recent call last):
> ...
> AttributeError: 'Choice' object has no attribute 'question'

When you encounter an error and ask for help, it is useful for those
helping you to see the error message. Here, you have purposefully
removed most of the error message.

>
> I followed the tutorial exactly as it shown on web, but I got an error on
> that line. Did I missed something in the tutorial ?

Probably - the tutorial does work if you follow all the steps
precisely. Retry that part of the tutorial, and if you do have
problems, reply back showing the full error message and what you typed
to get it.

Cheers

Tom

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFHbX1J1zP_u9bYZK%2BcfBpys%2BehqpyOpHFtPSBqAxy2DhJ6P0w%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Writing your first Django app, part 1 (1.6)

2013-12-10 Thread Joey Chang
can you share more lines you typed before. It's hard to analysis depending
on just one line


2013/12/11 Suhendri 

> Hi,
>
> I'm new in Django, I'm excited with Django so I have to following the
> existing tutorial to knew how to create a program with Django.
>
> I started with tutorial 1, Writing your first Django app, part1. I used
> Django 1.6 and SQLite
>
>
> I followed the instructions from the starting of the tutorial, until the
> line of *# Create three choices* I got an error.
>
> When I typed p.choice_set.create(choice_text='Not much', votes=0), I got
> an error:
> *AttributeError: Traceback (most recent call last):*
> *...*
> *AttributeError: 'Choice' object has no attribute 'question'*
>
> I followed the tutorial exactly as it shown on web, but I got an error on
> that line. Did I missed something in the tutorial ?
>
> Could you help me, to solve this problem so i can continue learn the
> tutorial.
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/8714d33c-ab05-4a70-b88f-b3b52707549e%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANURRHDqJK5%2BBDhb1G2F6X_WXxkSJXeNz3YqPE42KKGbbD-DVg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Writing your first Django app, part 1

2013-11-20 Thread Larry Barnett
Found it.  I had Polls in the wrong place in the settings file.

Thanks!

On Wednesday, November 20, 2013 12:39:14 PM UTC-6, Larry Barnett wrote:
>
> In the tutorial after I enter:
>
> python manage.py sql polls
>
> I get the following error:
>
> CommandError: App with label polls could not be found. Are you sure your 
> INSTALLED_APPS setting is correct?
>
> I have built the site twice with the same results.  I cannot locate any 
> error in the example or the Django environment. Everything worked prior to 
> the attempt to include the app. Any ideas?
>
>

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f8bdc998-8fdf-4b84-bc9c-d7a09d85c9ef%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Writing your first Django app, part 1

2013-11-20 Thread Jonathan Baker
Is "polls" listed in within INSTALLED_APPS of settings.py? If so, does your
polls app have an __init__.py file?


On Wed, Nov 20, 2013 at 11:39 AM, Larry Barnett wrote:

> In the tutorial after I enter:
>
> python manage.py sql polls
>
> I get the following error:
>
> CommandError: App with label polls could not be found. Are you sure your
> INSTALLED_APPS setting is correct?
>
> I have built the site twice with the same results.  I cannot locate any
> error in the example or the Django environment. Everything worked prior to
> the attempt to include the app. Any ideas?
>
>  --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/acbd9f55-f2f7-4b94-beb3-4dc7167fa8e8%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Jonathan D. Baker
Developer
http://jonathandbaker.com

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPMFOb739HCf4EJHkD7%2B6%3D%2BPa_ewTuqs1ienUxoGc2rAQTnQ2Q%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.