Ok,
 I've used some code from tutorials :
1) add apl akumbo
python manage startapp akumbo

2) add your models
3) add urls:

from django.conf.urls import patterns, include, url
from django.contrib import admin
from akumbo.views import EventListView
from akumbo.views import EventDetailView

urlpatterns = patterns('',

    #url(r'^blogs/', include('blogs.urls')),
    url(r'^admin/', include(admin.site.urls)),

    #news urls

    #events urls
    url(r'^$', EventListView.as_view(), name='event'),
    url(r'^(?P<slug>[-_\w]+)/event/$', EventDetailView.as_view(),
name='Event-detail'),

)

4.  Check sql


serg@debian:~/project/django/tutor/mysite$ python manage.py  sql
akumbo

BEGIN;

CREATE TABLE `akumbo_event`
(

    `id` integer AUTO_INCREMENT NOT NULL PRIMARY
KEY,

    `name` varchar(100) NOT
NULL,

    `slug` varchar(50) NOT NULL
UNIQUE,

    `type_of` varchar(100) NOT NULL,
    `image1` varchar(100) NOT NULL,
    `entertainer` varchar(100) NOT NULL,
    `description` longtext NOT NULL,
    `speakers` varchar(100) NOT NULL,
    `pub_date` datetime NOT NULL,
    `location` varchar(100) NOT NULL
)
;

run syncdb

python manage.py  syncdb
Creating tables ...
Creating table akumbo_event
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)


create a simple  template
serg@debian:~/project/django/tutor/mysite$ mkdir templates
serg@debian:~/project/django/tutor/mysite$ mkdir templates/akumbo
serg@debian:~/project/django/tutor/mysite$ touch
templates/akumbo/event_list.html
serg@debian:~/project/django/tutor/mysite$ python manage.py  runserver

  lunch  app
 visit page  no error
Also I've update setting.py for supporting your urls




Many thanks,

Serge


+380 636150445
skype: skhohlov


On Fri, Jul 18, 2014 at 4:54 PM, ngangsia akumbo <[email protected]> wrote:

> It is still breaking
>
>
> On Friday, July 18, 2014 1:56:38 PM UTC+1, Sergiy Khohlov wrote:
>
>> try to use
>> url(r'^/event/$', EventDetailView.as_view(), name='Event-detail')
>>
>>
>>  and ofcourse turn off color
>>
>> Many thanks,
>>
>> Serge
>>
>>
>> +380 636150445
>> skype: skhohlov
>>
>>
>> On Fri, Jul 18, 2014 at 3:43 PM, ngangsia akumbo <[email protected]>
>> wrote:
>>
>>> it gives me this error
>>> Page not found (404) Request Method:GET Request URL:
>>> http://127.0.0.1:8000/event/
>>>
>>> No post found matching the query
>>>
>>> You're seeing this error because you have DEBUG = True in your Django
>>> settings file. Change that to False, and Django will display a standard
>>> 404 page.
>>>
>>>
>>>>  --
>>> 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 [email protected].
>>> To post to this group, send email to [email protected].
>>>
>>> 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/f68ef88b-e1a5-4aef-b0b3-cb91730ba312%
>>> 40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/f68ef88b-e1a5-4aef-b0b3-cb91730ba312%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> 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 [email protected].
> To post to this group, send email to [email protected].
> 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/0c4f31f2-9c39-4639-a371-32e258153608%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/0c4f31f2-9c39-4639-a371-32e258153608%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> 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 [email protected].
To post to this group, send email to [email protected].
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/CADTRxJMfA7FgFxpT9p6f3zt2ac4NqfyE2yAJb%2BiB8juiG9CKzg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to