i'm trying to install Fang of Mongo, i did all the steps required but whe i try to go to the http page i have got this error message:
muratalina#muratalina-To-be-filled-by-O-E-M:~/Documents/Fang-of-Mongo/fangofmongo$ python ./manage.py runserver
Validating models...
0 errors found
Django version 1.4.3, using settings 'fangofmongo.settings'
Development server is running at "http://127.0.0.1:8000/"
Quit the server with CONTROL-C.
[29/Jan/2013 12:36:52] "GET / HTTP/1.1" 404 2032
when i go to "http://127.0.0.1:8000/fangofmongo/" page i have got this error
The base URL for Fang-of-Mongo is:
(r'^fangofmongo/', include('fangofmongo.fom.urls')),
This means that you will need to navigate to http://127.0.0.1:8000/fangofmongo.
There is no base URL http://127.0.0.1:8000/ defined - so it will 404.
EDIT: Also Fang-of-Mongo appears to have gone 3 years, at least on Github, without an update - so you will most likely encounter other issues with the project running on Django 1.4.3.
Make sure you imported the include function in the urls.py, else add "from django.urls import include"
Here is how to Include another URLconf (in urls.py file)
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
Related
I have installed Django on Hostgator shared plan.
I am able to access to mydomain.ca/admin (actually mydomain.ca/index.fcgi/admin), and able to login as superuser.
However, when I go to mydomain.ca, it displays
Page not found (404)
Request Method: GET
Request URL: http://mydomain.ca/index.fcgi/
Using the URLconf defined in src.urls, Django tried these URL patterns, in this order:
^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.
If I'm correct, it should show "It worked!" website instead, since I have not added anything to my app yet.
I have followed the tutorial on http://support.hostgator.co.m/articles/django-with-fastcgi
My .htaccess looks exactly same as the one in the tutorial, and my index.fcgi looks like
.#!/home/user/mydjango/bin/python
import os
import sys
sys.path.insert(0, "/home/user/mydjango/source")
os.environ['DJANGO_SETTINGS_MODULE'] = 'src.settings'
from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="false")
Could anyone assist me to solve this problem?
Thank you!
Django's URL regex engine is failing and I have no idea why. Even my sanity checks are failing horribly.
Here's my urls.py:
from django.conf.urls import patterns, include, url
urlpatterns = patterns('',
url(r'^a', 'placemyorder.views.home', name='home'),
)
I get this 404 error:
Page not found (404)
Request Method: GET
Request URL: http://[ip address]/a/
Using the URLconf defined in placemyorder.urls, Django tried these URL patterns, in this order:
1. ^a [name='home']
The current URL, , didn't match any of these.
when I visit
http://[ip address]/a
And it's hosted on Django 1.5.2 with Python 2.7.3 on Ubuntu 12.04 behind nginx if that info is relevant.
Here's a clue: The current URL, , didn't match any of these.
It should say: The current URL, http://[ip address]/a, didn't match any of these.
So the dispatcher isn't getting the request url.
Take a look at this solution:
Django + NGINX URL Problem
my Django config (settings and url) like the one in the tutorial.
If I call http://127 0 0 1:8000/admin/ I become an 404 error with the following message:
"/Users/x/projects/foobar/admin" is not there...
reinstall Django with pip: same error, call python manage.py syncdb: same error.
What goes on and how can I fix it?
Thanks for every help.
To commet this line in urls resolve my problem:
#url(r'^(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
So I must think about to handle my dynamic image load config. But this is a other point.
Thanks!
I have django-rq set up and running (jobs are queued, I can run manage.py rqworker) but I cannot seem to get the admin screen working - I consistently get a 404 for the /admin/django_rq url.
I have django-extensions installed, and the show_urls commands shows that the URL is registered:
$ python manage.py show_urls
...
/admin/django_rq/ django_rq.views.stats rq_home
/admin/django_rq/queues/<queue_index>/ django_rq.views.jobs rq_jobs
/admin/django_rq/queues/<queue_index>/<job_id>/ django_rq.views.job_detail rq_job_detail
/admin/django_rq/queues/<queue_index>/<job_id>/delete/ django_rq.views.delete_job rq_delete_job
...
I am logged in as someone who is a staff member, so the #staff_member_required decorator on the stats view should be working.
(r'^admin/django_rq/', include('django_rq.urls'))
must be before
url(r'^admin/', include(admin.site.urls))
I've updated the installation instructions in django-rq's README.rst to drop the "admin" prefix from django-rq's URL pattern so Hugo's issue shouldn't happen again.
I'm trying to use the ckeditor package from here: https://github.com/shaunsephton/django-ckeditor . I have followed the directions, but I can't seem to figure out what the path is to include the ckeditor.js file.
Every time I go to a page with the ckeditor widget/field I get a javascript error because of this:
Uncaught ReferenceError: CKEDITOR is not defined
I did run collectstatic etc..
Have another look at the docs for serving static files.
If you're in development and using runserver you'll want to add the following to your url conf -
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
# ... the rest of your URLconf goes here ...
urlpatterns += staticfiles_urlpatterns()
See this section of the docs specifically.