Oh yea, thanks, i was a bit confused. I see what I can do now.
Andrew
On 24 Feb, 09:02, Daniel Roseman <roseman.dan...@googlemail.com>
wrote:
> On Feb 23, 10:51 pm, djandrow <andrewkenyon...@gmail.com> wrote:
>
> > Yea, the code that processes the search and retur
Hello,
Each of the html pages on my site extends base.html but i'm trying to
get a search box going which will appear on each page. So this will go
on the base.html template. Since base.html is never called except
through other templates. In what view should the code for this go in,
i can't
Thanks Tim, I got it sorted out.
On Feb 19, 3:39 pm, Tim wrote:
> The problem is that you are using the manage.py that is in the
> project_template directory, which will load the settings.py file from
> the project_template directory.
>
> You need to use the manage.py that
I may just try creating a new app and see if that works and if it does
just copy the things over.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
dahs <aelmali...@gmail.com> wrote:
> my first gues would be you are not in the akonline folder
>
> On Wed, Feb 18, 2009 at 15:54, djandrow <andrewkenyon...@gmail.com> wrote:
>
> > Hello all,
>
> > I've been trying to add a few extra fields to my model
Hello all,
I've been trying to add a few extra fields to my model, as part of my
blog app. So then I tried sqlall:
python "C:\ProgLangs\Python25\Lib\site-packages\django\conf
\project_template\manage.py" sqlall blog
theres another thread about why i've included the path, but i don't
see why it
il.com> wrote:
> On Wed, Feb 18, 2009 at 10:44 AM, djandrow <andrewkenyon...@gmail.com>wrote:
>
>
>
>
>
> > Hello,
>
> > I have python 2.5 and 2.6 installed on my computer and when i try to
> > run manage.py sqlall I get an error:
>
>
Hello,
I have python 2.5 and 2.6 installed on my computer and when i try to
run manage.py sqlall I get an error:
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb
module: Module use of python25.dll conflicts
The documents have a first steps section and other sections may
inspire you as well
http://docs.djangoproject.com/en/dev/
hope that helps
Andrew
On Feb 18, 3:19 pm, "s.sudharsan siva"
wrote:
> Hii am new to Django we are planning to show a demo on Django on FOss
>
Did you create the models and is the database correctly configured in
settings.py?
On 10 Feb, 22:55, Tim Johnson wrote:
> It's not displayed on the admin index page.
>
> From the Tutorial
> at:http://docs.djangoproject.com/en/dev/intro/tutorial02/#intro-tutorial02
>
>
I've move it just to the apache2.2 file so my conf is now:
Options Indexes FollowSymLinks
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE akonline.settings
PythonOption django.root /akonline
PythonDebug On
PythonPath
So would it be best to move my project somewhere else?
On 10 Feb, 21:48, Ramiro Morales <cra...@gmail.com> wrote:
> On Tue, Feb 10, 2009 at 7:40 PM, djandrow <andrewkenyon...@gmail.com> wrote:
>
> > Hello all,
>
> > I know theres alot of threads like this out t
Hello all,
I know theres alot of threads like this out there but I'm still
struggling. I've got a simple html template which i access through a
view:
the template is in C:/Program Files/Apache2.2/htdocs/akonline/
templates/blogSite
and the image is then in blogSite/media
then in my conf I
I believe its quite akward to create a system link in XP so I tried
copying them to myproject/media file, but it didn't like that either.
Should they go in the htdocs file or what?
Thanks,
Andrew
--~--~-~--~~~---~--~~
You received this message because you are
Hello all,
I have just set up the admin pages for my site and if i use the built
in server i get the admin with the nice templates, but if I display it
on mod_python I just get the plain text, which is pretty hard to work
with.
I have these set up in the conf:
SetHandler None
You need to remove the # from:
# from django.contrib import admin
# admin.autodiscover()
I had the same thing earlier.
Heres some more stuff about setting up the admin if you want to read
it:
http://docs.djangoproject.com/en/dev/intro/tutorial02/#intro-tutorial02
On Feb 9, 11:24 pm,
Thanks Karen
On Feb 9, 4:53 pm, Karen Tracey <kmtra...@gmail.com> wrote:
> On Mon, Feb 9, 2009 at 11:50 AM, djandrow <andrewkenyon...@gmail.com> wrote:
>
> > I believe these days a statment like this has been depreciated:
>
> > post_slug = models.SlugFi
I believe these days a statment like this has been depreciated:
post_slug = models.SlugField(prepopulate_from=('post_title',))
I had a look through the docs but couldn't find the answer.
How can you now specify which field the slug is created from?
thanks,
Andrew
Thanks Karen, I've got it all working now.
Regards,
Andrew
On 6 Feb, 21:51, Karen Tracey <kmtra...@gmail.com> wrote:
> On Fri, Feb 6, 2009 at 4:37 PM, djandrow <andrewkenyon...@gmail.com> wrote:
>
> > Hello,
>
> > I'm trying to get my django proj
Hello,
I'm trying to get my django project going on mod_python (this all on
on windows XP)
However when I try to get my project going I get
ImportError: Could not import settings 'mysite.settings' (Is it on
sys.path? Does it have syntax errors?): No module named
mysite.settings
But I have this
Ok thanks, I will make sure I do that.
Currently this is just on my PC so there aren't any security issues
but I will make a note of it for later, thanks.
Andrew
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
So i set it in Environment Variable then System variables [this is on
windows]:
PythonPath -- C:\ProgLangs\Python26
But i still get File
"C:\ProgLangs\Python25\Lib\site-packages\mod_python\importer.py",
line 304, in import_module
return __import__(module_name, {}, {}, ['*'])"
How can I
Thank you, i will try creating a symlink. I'm a bit confused about
the PythonPath though, is the python path an environment variable or
is it defined in the httpd conf or a 3rd place?
I know I have:
PythonPath "['C:/Program Files/Apache2.2/htdocs/myproject'] +
sys.path"
in the conf. But how
Thanks, that has helped me quite abit. But I still have one issue.
When trying to look at the pages I create I get the following:
Traceback (most recent call last):
File "C:\ProgLangs\Python25\Lib\site-packages\mod_python
\importer.py", line 1537, in HandlerDispatch
Hello everyone,
I've recently installed apache and mod_python and i've managed to run
a couple of python files, so i guess its working. I've also created a
view, which displays a simple hello world message. I've tested this
with the django server and it works. But i'm not sure how to get this
to
I just bought a new laptop and want to install mod_python, is there a
version which is compatible with Python 2.6, I tried the 2.5 version
but it wouldn't let me install that with 2.6. If there isn't a 2.5
version what would people recommend I do? Thanks.
Regards,
Andrew
Thanks Karen, its working fine now,
Brian, I will have a look at slug fields, for now i'm trying just to
get a basic site going, but then I'm going to try and come back and
improve things so i will take a look at then then.
Regards,
Andrew
--~--~-~--~~~---~--~~
So after messing around a for a couple of minutes I discovered the
urlencode changes About Me to About%20Me, (if you are using firefox 3
or above it will still display "About Me" in the address bar, that
confused me for a while).
But now if i put in:
url.net/blog/About%20Me/,
it doesn't match
Ok, thanks Karen, i;ll have a go with messing about.
If someone else with more time could explain it to me that would be
great, otherwise i'll just try playing about with it.
regards,
Andrew
--~--~-~--~~~---~--~~
You received this message because you are
Thanks Karen, how does urlencode work though?
I imangine its a filter, but what does it do?
regards,
Andrew
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
I have a list of categories, which entries are filed into, then some
can click a category link in a template and it will take them to a
list of entries in that particular category. The problem is one of
this categories is "About Me", what I have so far in my view is:
current_entries =
Thanks Karen, it works fine now.
regards,
Andrew
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this
Here is my model for entry;
class Entry(models.Model):
entry_id = models.AutoField(primary_key=True)
entry_date = models.DateField(auto_now_add=True)
entry_title = models.CharField(max_length=70)
entry_content = models.TextField(max_length=5000)
entry_cat
Hi, I am currently trying to pass in a value from a url and the
perform a query based on that, i've tried this:
def category_view(request, category):
current_entries = Entry.objects.filter(entry_cat=category).order_by("-
entry_date")
return render_to_response('blog/base.html',
Its shared hosting so it could just be the file editor (which is built
in) that they use causing it to happen if this doesn't happen to
anyone else.
If no one else is having the problem I would imangine that would be
it.
Thanks,
Andrew
--~--~-~--~~~---~--~~
You
I have a template, text that extend a template base.
In my text template I have;
{% extends 'base.html' %}
{% block content %}
SOME CODE
{% endblock content %}
Anyway, my question is when I enter this save it then stick it on my
server, it adds closing tags at the bottom; and the
Doctype
No, thats why its wierd, it just says;
Page not found (404)
Request Method: GET
Request URL:http://www.url.net/2008/aug/
no other information at all, thts why its really strange.
Andrew
--~--~-~--~~~---~--~~
You received this message because you are
I have the folling urls:
(r'^(?P\d{4})/$',
'django.views.generic.date_based.archive_year', archive_info),
(r'^(?P\d{4})/(?P[a-z]{3})/$',
'django.views.generic.date_based.archive_month', archive_info),
and archive_info is:
archive_info = {
'queryset' : Entry.objects.all(),
Thanks, its a shared server so I will have to enquire as to what is
happening concerning the python path.
Regards,
Andrew
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
I'm currently using django Version: 1.0-final-SVN-9020 and python
Version: 2.4.4, a few weeks ago (maybe a bit longer) I had to change
all my maxlengths to max_length, as I believe that was a change in
Django.
Anyway now when i try and use manage.py validate I get:
__init__() got an unexpected
I solved this problem, for those who come after me, you can use:
Entry.objects.dates('entry_date', 'month', order='DESC')
where entry is the name of the table/model and entry_date is the name
of the date field. This returns a list of months with objects in.
Thanks for everyone's help,
Andrew
Sorry, must have forgotton that part, it just wasn't displaying
anything,
its was cos I was archive.datetime, when archive was already a dateime
object.
Now I've changed it to {{ archive }} its fine.
Thanks guys,
Andrew
--~--~-~--~~~---~--~~
You received this
This is probably really really obvious. I have the following statement
in my views.py:
archive_list = Entry.objects.dates('entry_date', 'month',
order='DESC')
then I have;
{% for archive in archive_list %}
{{ archive.datetime }}
{% endfor %}
in my template, i am 99.9% my problem is with {{
Do i need to pass the months into the view using extra_context?
Andrew
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To
Thanks Russ, I'm still abit confused about the first part, I
understand it prints 2008-01-01, because its printing the years with
entries in them, and 2008 is the only year with entries, but rather
than get it to show all the years with entries I want it to show all
the months with entries in.
I
Can no one help me with either of my questions? I'd really like to
this sorted.
Thanks,
Andrew
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
Hello, I currently have a website which I am trying to add an archive
to, i currently have the following date based URLs:
(r'^$', 'django.views.generic.date_based.archive_index',
archive_info),
(r'^(?P\d{4})/$',
'django.views.generic.date_based.archive_year', archive_info),
I'm a bit confused here, what is dict, is it the same as archive
infor? And what has happened to date_based.archive_index?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
Can no one help me with this, its just these two lines:
(r'^archive/$', date_based.archive_index,archive_info
{'template_name': 'blog/archive.html'}),
(r'^archive/(?Pd{4})/?$',date_based.archive_year, archive_info
{'template_name': 'blog/archive.html'}),
Please?
Andrew
Hi, I have the following URLs.py
from django.conf.urls.defaults import *
from akonline.views import current_datetime
from django.views.generic import date_based
from akonline.blog.models import Category, Entry
archive_info = {
"queryset" : Entry.objects.all(),
"date_field" :
You may find this useful:
http://groups.google.com/group/django-users/browse_thread/thread/73aae22ae6d20de0/dbfe3a60be00d9bb#dbfe3a60be00d9bb
You should have apache serve the static content because its much
faster. The link I sent you is when I was having problems with it a
few weeks ago,
I've added the following to my urls.py, i don't know if they work, my
server only restarts every so often:
(r'^archive/$', date_based.archive_index, archive_info
{'template_name': 'blog/archive.html'}),
(r'^archive/(?Pd{4})/?$', date_based.archive_year,
archive_info {'template_name':
I've had alook through http://www.djangoproject.com/documentation/generic_views/
but i'm still not clear on what to do.
I might be being a bit think but could someone explain it to me.
Regards,
Andrew
On Aug 30, 5:59 pm, Dmitry Dzhus <[EMAIL PROTECTED]> wrote:
> djandrow wro
I'm basically trying to create a standard archive function.
I have the following field in my models:entry_date =
models.DateField(auto_now_add=True)
I understand dynamic urls and templates and things, so i don't need
help with that. What i need to know is how can i get a list of months
I'm trying to create a situation where you can bring up all the blog
entries in a category through the URL. I've got this in my urls.py:
from django.conf.urls.defaults import *
from akonline.views import current_datetime
urlpatterns = patterns('',
(r'^test/$', 'address.blog.views.blog'),
Managed to get it working, thanks everyone.
I guess the problem was CSS was missing from locationMatch
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
I've added this,
#css has been added to the end
SetHandler None
but still no luck, however if i look at the pages statically on the
server rather than having apache serve them the CSS is used so now I
know that the CSS works and i guess its in the right place, although
the relative and
57 matches
Mail list logo