Problema incepator django

89 views
Skip to first unread message

catafest

unread,
Mar 28, 2010, 11:35:02 AM3/28/10
to django-romania
Salut

Am o mica problema cu django
Am folosit tutorialul http://www.howtoforge.com/how-to-install-django-on-fedora9-apache2-mod_python
$ python manage.py syncdb
$python manage.py runserver 80
Validating models...
0 errors found

Django version 1.1.1, using settings 'django_projects.settings'
Development server is running at http://127.0.0.1:80/
Quit the server with CONTROL-C.
Error: You don't have permission to access that port.
Firefox
http://localhost/ am pagina de la fedora apache
http://localhost/admin/
Not Found
The requested URL /admin/ was not found on this server.
Am instalat in settings modulul de admin ...

catafest

unread,
Mar 28, 2010, 1:12:24 PM3/28/10
to django-romania
Se pare ca daca rulez :
python manage.py runserver 0.0.0.0:8000

Validating models...
0 errors found

Django version 1.1.1, using settings 'django_projects.settings'

Development server is running at http://0.0.0.0:8000/


Quit the server with CONTROL-C.

[28/Mar/2010 17:11:51] "GET / HTTP/1.1" 404 1917


insa obtin o eroare in firefox


Page not found (404)
Request Method: GET
Request URL: http://0.0.0.0:8000/

Using the URLconf defined in django_projects.urls, Django tried these
URL patterns, in this order:

1. ^admin/

The current URL, , didn't match any of these.

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.

cristi.prodan

unread,
Mar 29, 2010, 3:23:55 AM3/29/10
to django-romania
> Firefoxhttp://localhost/am pagina de la fedora apachehttp://localhost/admin/

> Not Found
> The requested URL /admin/ was not found on this server.
> Am instalat in settings modulul de admin ...

Ai setat url-urile corespunzatoare in urls.py pentru modulul de
admin ?

Adrian-Bogdan Andreias

unread,
Mar 28, 2010, 11:59:23 AM3/28/10
to django-...@googlegroups.com
Conform erorii nu ai drepturi sa deschizi portul 80.
Incearca:

$sudo python manage.py runserver



2010/3/28 catafest <catal...@gmail.com>

--
Vizitaţi acest grup la
http://groups.google.ro/group/django-romania?hl=ro

To unsubscribe from this group, send email to django-romania+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.



--

IntoVPS - www.intovps.com - Unmanaged VPS Hosting


Cata

unread,
Mar 29, 2010, 6:09:16 AM3/29/10
to django-...@googlegroups.com
Intre timp am , prelucrat apache si am facut diverse teste:

@Cristi -
am setat in settings.py admin
INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.admin'
)
si in urls.py am
from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
#from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Example:
    # (r'^django_projects/', include('django_projects.foo.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)),
)
Am urmatoarea eroare :
Environment:

Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.1.1
Python Version: 2.6.2
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.admin']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware')
........urls.py" in <module>
  5. admin.autodiscover()

Exception Type: NameError at /
Exception Value: name 'admin' is not defined
Se pare ca admin nu e vazut de django sau ...?

@Adrian -
am descoperit si eu python manage.py runserver fara :80 sau alte prostii dupa si a mers
fara sudo , nu am pus user de root in settings.py

Validating models...
0 errors found

Django version 1.1.1, using settings 'django_projects.settings'
Development server is running at http://127.0.0.1:8000/

Quit the server with CONTROL-C.
E ok la chestia asta ...




Ionel Maries Cristian

unread,
Mar 29, 2010, 7:36:07 AM3/29/10
to django-...@googlegroups.com
# Uncomment the next two lines to enable the admin:
#from django.contrib import admin
admin.autodiscover()

Ai uitat sa decomentezi importul :)

-- ionel



2010/3/29 Cata <catal...@gmail.com>




--

catafest

unread,
Mar 29, 2010, 11:23:07 AM3/29/10
to django-romania

> Ai uitat sa decomentezi importul :)
>
> -- ionel
>

"E sara mia colpa,se cosi e ? "
Da , ai dreptate , "mia colpa" .

Oricum acum am interfata de admin cu user si pass http://127.0.0.1:8000/admin/

Insa pe http://127.0.0.1:8000 am 404 :
...


Django tried these URL patterns, in this order:

1. ^admin/

The current URL, , didn't match any of these.

Ce inseamna asta ca trebuie sa definesc un fel de index ca la html ?

daniels

unread,
Mar 29, 2010, 11:38:02 AM3/29/10
to django-...@googlegroups.com

Cata

unread,
Mar 29, 2010, 11:49:46 AM3/29/10
to django-...@googlegroups.com
Merci , pare foarte buna cartea .
O trec si la linkuri utile .

2010/3/29 daniels <danie...@gmail.com>
Iti recomand http://www.djangobook.com/en/2.0/

catafest

unread,
Sep 9, 2013, 10:24:06 AM9/9/13
to django-...@googlegroups.com
http://python.net/~gherman/propaganda/tut-ro/tut-ro.pdf 
inveti bine python apoi treci la django :) 
Reply all
Reply to author
Forward
0 new messages