Simon Willison wrote:
> On Jan 8, 6:47 am, Michael Hipp <[EMAIL PROTECTED]> wrote:
>> Learning about context processors, I have one like this:
>>
>> def bold_word(request):
>> html = "A bold word."
>> return {'bold_word': html,}
>>
>> I expected a *bold* word to show up in the browser, b
On Jan 8, 6:47 am, Michael Hipp <[EMAIL PROTECTED]> wrote:
> Learning about context processors, I have one like this:
>
> def bold_word(request):
> html = "A bold word."
> return {'bold_word': html,}
>
> I expected a *bold* word to show up in the browser, but instead here's
> what is sen
Learning about context processors, I have one like this:
def bold_word(request):
html = "A bold word."
return {'bold_word': html,}
I expected a *bold* word to show up in the browser, but instead here's
what is sent:
A bold word.
So the angle brackets show up (literally) in
Malcolm Tredinnick wrote:
> On Mon, 2008-01-07 at 18:28 -0600, Gary Wilson Jr. wrote:
>> Malcolm Tredinnick wrote:
>>> On Sun, 2008-01-06 at 15:25 -0600, Gary Wilson Jr. wrote:
It appears that at this point, response.content is a utf8-encoded
bytestring.
I'm playing with a response
Michael Hipp wrote:
> Hello,
>
> I'm hoping to rework my website into Django, but am having trouble at my
> shared hosting provider (HostMonster).
>
> They don't support mod_python, so Hostmonster said to add this to .htaccess
> for FastCGI:
>
>AddHandler fcgid-script .fcgi
>
> I did tha
That worked!
Thank you! Thank you all!
Michael
Muchanic wrote:
> Try adding the .egg to sys.path explicitly, i.e.
>
> sys.path.insert(0, "/home/redmulec/python/flup-1.0-py2.4.egg")
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
Thanks for you help everyone I finally figured it out. I created
another virtual host to serve my media and it worked.
Looks like this:
ServerAdmin [EMAIL PROTECTED]
ServerName media.abc.net
DocumentRoot /srv/django_site/media/
Options None
AllowOverride None
This IS the Best EBook for learning PHP, CSS and HTML.
http://www.ziddu.com/download.php?uid=ZbGclJqoZLCh4palY7KWlJWiY66bnJs%3D3
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
Try adding the .egg to sys.path explicitly, i.e.
sys.path.insert(0, "/home/redmulec/python/flup-1.0-py2.4.egg")
On Jan 8, 6:51 pm, Michael Hipp <[EMAIL PROTECTED]> wrote:
> Graham Dumpleton wrote:
> > On Jan 8, 2:29 pm, Michael Hipp <[EMAIL PROTECTED]> wrote:
> >> Does any of that offer any clu
On 08-Jan-08, at 11:05 AM, Ravi Kumar wrote:
> 3. I was reading some pros-cons about Django. I came to know Django
> has a memory problem in deployment environment, leaked memory. I
> also read many articles regarding how to prevent such leakage and
> hogging
where did you hear this? It i
Graham Dumpleton wrote:
> On Jan 8, 2:29 pm, Michael Hipp <[EMAIL PROTECTED]> wrote:
>> Does any of that offer any clues?
>
> Not really. You really need to do what Milan said back at the
> beginning. See if you can get the actual error messages logged in the
> Apache error log files for the req
Hi,
This is my First post to the group. I started devotion to Python recently,
and now I have to implement Django (which came out to be something I was
needing as framework). Familiar with Django basics and some core features, I
am still looking for some knwoledge base for certain issues.
1. I nee
On 2008-01-07 19:03:21 -0700, Car <[EMAIL PROTECTED]> said:
>
> Hello
>
> I have following code;
>
> class PlaceForm(ModelForm):
> class Meta:
> model = Place
> exclude = ('useradd',) #excluded, because form shouldn't give
> a way to set user manually
>
> Model Place has o
On Jan 8, 8:50 am, ryan k <[EMAIL PROTECTED]> wrote:
> I used svn propset svn:external so my project (in transition to
> another developer when I return to college) can easily use the most
> recent version fo Django (and comment_utils, etc). How can I ensure
> that the project uses that django mod
On Jan 8, 2:29 pm, Michael Hipp <[EMAIL PROTECTED]> wrote:
> Graham Dumpleton wrote:
> >>RewriteRule ^djangosite/(.*)$ mysite.fcgi/$1 [QSA,L]
>
> >> would only use the fcgi stuff on the urls that resolved to the
> >> djangosite directory???
>
> > You cannot read the RewriteRule in isolation, t
Graham Dumpleton wrote:
>>RewriteRule ^djangosite/(.*)$ mysite.fcgi/$1 [QSA,L]
>>
>> would only use the fcgi stuff on the urls that resolved to the
>> djangosite directory???
>
> You cannot read the RewriteRule in isolation, the RewriteCond on the
> line before must be taken into consideratio
Ok thank you for your responses. I would try this out but not at the
office now... what about __init__.py in the project's root directory?
Right now I am trying this all on the Django development server. So
let's say on my production server I have /home/ryan/projects/llcom/
trunk/lib (all svn:exte
This might be a stupid question, but is request.user set to None?
On Jan 7, 2008 6:03 PM, Car <[EMAIL PROTECTED]> wrote:
>
> Hello
>
> I have following code;
>
> class PlaceForm(ModelForm):
>class Meta:
>model = Place
>exclude = ('useradd',) #excluded, because form shouldn't
I've tried different aproach with overriding default save method -
hacking shourtcuts wasn't the best idea.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to d
On Mon, 2008-01-07 at 20:28 -0600, Michael Hipp wrote:
[...]
> Is it really necessary to complicate every 'view' method by appending
> 'context_instance=RequestContext(request)' to the render_to_response
> call? This seems totally boilerplate and a violation of DRY.
Write your own shortcut fun
It's probably worth noting that when I run the site off the
development server it has no problems whatsoever. It seem to me that
this mean the problem _must_ be something to do with the vhosts.conf
file, yes?
On Jan 5, 7:01 pm, Josh Ourisman <[EMAIL PROTECTED]> wrote:
> Ok, Django is installed an
Peter Rowell wrote:
>> There is a mechanism available
>> for that -- context processors -- but people don't want to use it
>> because they want *something else* that happens for every template.
>
> Malcolm's absolutely correct: context processors (I mis-typed when I
> said content processors) is
On Jan 7, 4:42 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> Putting that in settings.py is too late, since by the thing that reads
> settings.py is Django itself, so it's already been imported. You have to
> modify your Python import path *before* anything Django-related is
> imported.
He'
Hello
I have following code;
class PlaceForm(ModelForm):
class Meta:
model = Place
exclude = ('useradd',) #excluded, because form shouldn't give
a way to set user manually
Model Place has one foreign key to django User model (useradd)
Is it possible to add field formerly ex
UPDATE: OK, I installed the trunk version and it worked right away, so
I guess 0.96 does not support the media context processor.
Thanks again for the help.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django use
Another data point is that I still error in the interpreter (see
below). Using "which python" I can see I am using the newly compiled
version of python, which has the MySQLdb module installed.
It appears I still have something fouled up?
Rob
--
[EMAIL PROTECTED]:~/home/m
Thanks for your help, Gang. I have it working (though I still have a
question below). I actually did see the error regarding the MySQLdb
module, but I thought, "OK, I can fix that later, but what are these
other errors?" I did not think they were related.
So I then ran into this error:
File
On Mon, 2008-01-07 at 18:28 -0600, Gary Wilson Jr. wrote:
> Malcolm Tredinnick wrote:
> > On Sun, 2008-01-06 at 15:25 -0600, Gary Wilson Jr. wrote:
> >> It appears that at this point, response.content is a utf8-encoded
> >> bytestring.
> >> I'm playing with a response middleware doing something
Malcolm,
you're right, of course. That did the trick!
Thanks,
Rodrigo
On Jan 7, 9:23 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2008-01-06 at 17:24 -0800, Rodrigo Culagovski wrote:
> > I am getting the following error:
>
> > OperationalError at /lista/
> > (1241, 'Operand shou
On Mon, 2008-01-07 at 15:03 -0800, [EMAIL PROTECTED] wrote:
> Grabbing the 1.2.1_p2 version of MySQLdb, these are the kinds of
> errors I get in building
>
> # python setup.py build
>
> running build
> running build_py
> creating build
> creating build/lib.linux-x86_64-2.4
> copying _mysql_
On Mon, 2008-01-07 at 13:50 -0800, ryan k wrote:
> I used svn propset svn:external so my project (in transition to
> another developer when I return to college) can easily use the most
> recent version fo Django (and comment_utils, etc). How can I ensure
> that the project uses that django module
Malcolm Tredinnick wrote:
> On Sun, 2008-01-06 at 15:25 -0600, Gary Wilson Jr. wrote:
>> It appears that at this point, response.content is a utf8-encoded bytestring.
>> I'm playing with a response middleware doing something like:
>>
>> MY_RE.sub(u'%s' % text, response.content)
>>
>> which raises
On Sun, 2008-01-06 at 17:24 -0800, Rodrigo Culagovski wrote:
> I am getting the following error:
>
> OperationalError at /lista/
> (1241, 'Operand should contain 1 column(s)')
> Request Method: POST
> Request URL: http://127.0.0.1:8000/lista/
> Exception Type: OperationalError
> Exc
On Jan 4, 9:43 pm, Peter Rowell <[EMAIL PROTECTED]> wrote:
> > Well, if I can't get this working I suppose I can just stuff the
> > settings.MEDIA_URL variable into each template render by placing it
> > into the render dictionary myself each time.
>
> Nah, don't do that.
>
> I think your probl
After much effort, things have progressed to my trying 'python
load_data.py'
I get an error:
"Can't connect to local MySQL server through socket /var/lib/mysql/
mysql.sock"
Thinking that the default setting of DATABASE_HOST = "" might be
wrong, I asked the host (OCSSolutions) where their database
Grabbing the 1.2.1_p2 version of MySQLdb, these are the kinds of
errors I get in building
# python setup.py build
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.4
copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.4
creating build/lib.linux-x86_64-2.4/M
Something like this should return an iterable list of UserSong records
for user U
>>> list = UserSong.objects.filter( user=U )
Then you can iterate over it or pass that list to a template that
iterates over it
>>> for song in list:
>>>doSomething
Look here for more
http://www.djangoproject.
Hey,
My ongoing quest to get a basic app working will hopefully be answered
by this question :)
I have the following model.py file:
File: model.py
==
from django.db import models
from django.contrib.auth.models import User
class Song(models.Model):
titl
To get the trunk, I ran:
# svn co http://code.djangoproject.com/svn/django/trunk/
# cd trunk
# python setup.py install
On Jan 7, 2:43 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote:
> Its very strange if you had svn trunk version. Line that importsbackendmust
> behttp://code.djangoproject.com/bro
That second error is from the 0.96 version.
On Jan 7, 2:43 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote:
> Its very strange if you had svn trunk version. Line that importsbackendmust
> behttp://code.djangoproject.com/browser/django/trunk/django/db/__init__...
> but you havebackend= __import__('%s
Its very strange if you had svn trunk version. Line that imports
backend must be
http://code.djangoproject.com/browser/django/trunk/django/db/__init__.py#L17
but you have
backend = __import__('%s.base' % settings.DATABASE_ENGINE, {}, {},
On 8 янв, 01:29, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wr
Uninstalled svn release, installed 0.96 from the tarball, retried the
syncdb and got this error
python manage.py syncdb
Traceback (most recent call last):
File "manage.py", line 11, in ?
execute_manager(settings)
File "/usr/lib/python2.4/site-packages/django/core/management.py",
line 1672
I did a recent svn checkout. Perhaps I should uninstall and try a
stable release
On Jan 7, 2:18 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote:
> mysql.base is internal django module that wraps work with MySQL
> backend. So you have to check your django installation I think.
> And that version of
mysql.base is internal django module that wraps work with MySQL
backend. So you have to check your django installation I think.
And that version of django do you use?
On 7 янв, 23:13, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I think I have MySQL and MySQLdb installed properly. Both of the
On Jan 7, 3:05 pm, Darthmahon <[EMAIL PROTECTED]> wrote:
> Hi Doug,
>
> Returning the songs function results worked a treat. I'm looking into
> the generic views part of Django at the moment as it seems to be what
> I want or is it ok for me to do as you suggested above?
I haven't used generic vi
I used svn propset svn:external so my project (in transition to
another developer when I return to college) can easily use the most
recent version fo Django (and comment_utils, etc). How can I ensure
that the project uses that django module instead of the one found
on /.../python2.X/site-packages
Hi all,
I'm consulting with GCap Media, who are looking to hire Django
developers to work in central London. They've got a bunch of really
interesting projects lined up and are building an excellent team. The
job description is here:
http://djangogigs.com/gigs/54/
If you have any questions abou
Hi Doug,
Returning the songs function results worked a treat. I'm looking into
the generic views part of Django at the moment as it seems to be what
I want or is it ok for me to do as you suggested above?
Cheers,
Chris
On Jan 7, 8:48 pm, Doug B <[EMAIL PROTECTED]> wrote:
> Couldn't you get what
Couldn't you get what you are looking for by just returning the songs
function results? The view are just python functions, so you can
return a view from a view. If things get to0 confusing that way,
making one or more helper functions shared between different views is
another option.
def add(r
Hi All,
Got a quick question for you. I have a page that lists songs. Each
song has a link that allows a user to add it to their songs list.
Here is the views.py file:
def songs(request):
songs_listing = []
for songs_list in Song.objects.all():
songs_dict = {}
I think I have MySQL and MySQLdb installed properly. Both of these
imports work
>>> import _mysql
>>> import MySQLdb
I am running on a Ubuntu 6.06 system with a svn checkout of Django
from yesterday.
There is a problem I don't recognize when I try to run syncdb.
What is mysql.base?
# python man
go into a python prompt and run:
>>> import MySQLdb
If it works, then your backend database is installed properly.
If not, you need to do more to get the DB configured.
http://www.djangoproject.com/documentation/install/#get-your-database-running
Ivan
On Jan 7, 12:02 pm, rob_mazur <[EMAIL PROT
If you are going to use a mysql database you need the mysqldb python
package installed.
http://sourceforge.net/projects/mysql-python
On Jan 7, 2008 3:02 PM, rob_mazur <[EMAIL PROTECTED]> wrote:
>
> I just installed Django 0.96 (Python 2.4.1) and am running through the
> tutorial at Django's site
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Mon, 7 Jan 2008 12:02:51 -0800 (PST)
rob_mazur <[EMAIL PROTECTED]> wrote:
>
> I just installed Django 0.96 (Python 2.4.1) and am running through the
> tutorial at Django's site. I can run "import django" at the
> interactive interpreter. But whe
I just installed Django 0.96 (Python 2.4.1) and am running through the
tutorial at Django's site. I can run "import django" at the
interactive interpreter. But when launching the integrated webserver
and viewing http://127.0.0.1:8000/ I get the error list below.
Can someone have a quick look, j
On Jan 7, 3:58 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote:
> My thoughts are: have you contacted the people behind either of the
> sites you mentioned, to see if they have existing plans for future
> expansion? I'd hate to see multiple sites go to all the trouble of
> building an "all-in-one"
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
PostgreSQL Conference East is being held on the weekend of March 29th
and 30th, 2008 in College Park, Maryland. The conference will have a
series of talks, mini-tutorials and tutorials and we are now accepting
submissions!
If you are a third pary vend
Looks like I'm having some problems with my MySQLdb install. To
install, I downloaded the tarball, &c.,and ran the installer script,
but it doesn't actually seem to work. From the errors I'm getting it
seems to be an issue with the way it actually installed. Here's what I
get if I go into the Pyth
Figured it out myself. In my django admin I had not properly set the
Site information when I went from the development server to the live
server.
On Jan 7, 10:57 am, RevMatt <[EMAIL PROTECTED]> wrote:
> I'm launching my first django site and am having an odd problem with
> syndication (I'm sure
Ramiro,
got it, thanks!
Rodrigo
On Jan 7, 3:20 pm, "Ramiro Morales" <[EMAIL PROTECTED]> wrote:
> Rodrigo,
>
> On Jan 7, 2008 4:05 PM, Rodrigo Culagovski <[EMAIL PROTECTED]> wrote:
>
> > [...]
>
> > Since this parameter is not passed from the generic view, the form
> > doesn't show. The form is
On Jan 7, 2008 12:40 AM, Mikey3D <[EMAIL PROTECTED]> wrote:
>
> Thank you so much it works. :-) One question, why is that I have Auth
> and Sites are showing up when my "class Admin: pass" were wrong way of
> coding still works?
>
Because these are different apps? and they have their Admin inner
Rodrigo,
On Jan 7, 2008 4:05 PM, Rodrigo Culagovski <[EMAIL PROTECTED]> wrote:
> [...]
>
> Since this parameter is not passed from the generic view, the form
> doesn't show. The form is defined in views.py and works for my other,
> non-generic views. Is there a way to pass the form via a generic
Ok I tried the sym link method and that doesn't seem to work. Grady,
what are you referencing from the documentation? Are you referring to
the tags? If so I have those tossed within the virtualhost
tag. Should I make those global and not within a virtual host tag?
On Jan 7, 4:51 am, Collin Grady
On Jan 7, 5:07 pm, Wes Winham <[EMAIL PROTECTED]> wrote:
> http://www.pointy-stick.com/blog/2008/01/06/django-tip-complex-forms/
>
> A shiny solution to the problem with code and the reasoning behind it.
> Simon Willison is awesome.
It's Malcolm that's awesome, I just link to his stuff!
Cheers,
I am using a generic view to view an individual item ('articulo') like
so:
urlpatterns = patterns('',
(r'^articulos/(?P\d+)/$', list_detail.object_detail,
articulo_detail_info)
The 'articulo_detail.html' template imports a "base.html" template,
which expects a 'form' parameter, like so:
It's not repeating yourself if the admin/auth interface isn't giving
you what you need.
On Jan 6, 4:30 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2008-01-06 at 15:51 -0800, Pete McVicar wrote:
>
> [...]
>
> > Because Django already has the concept of groups/permission my
> > imme
The book is online if you want to copy/paste code:
http://www.djangobook.com/en/1.0/chapter06/
Good luck and no problem.
On Jan 6, 6:40 pm, Mikey3D <[EMAIL PROTECTED]> wrote:
> Hi Elgringo,
>
> Thank you so much it works. :-) One question, why is that I have Auth
> and Sites are showing up whe
http://www.pointy-stick.com/blog/2008/01/06/django-tip-complex-forms/
A shiny solution to the problem with code and the reasoning behind it.
Simon Willison is awesome.
On Jan 4, 1:03 pm, Wes Winham <[EMAIL PROTECTED]> wrote:
> Thanks Malcom. That reassured me greatly. I didn't think of the cleve
I'm launching my first django site and am having an odd problem with
syndication (I'm sure there are more problems, but that's what I'm
hitting right now):
the rss file is spitting out the links as "http://example.com[path]";
rather than "http://mydomain.com/[path]";. Here's my model:
from djan
> i user django-register in my project,it is fatastic, but how to:
> 1. restrict username length must more than 5 words
> 2. make sure email is unique.
Good question. I don't recommend our short-term solution--modify the
contrib/auth code--but it was the only way I could figure out how to
do it a
On Jan 7, 2008 9:39 AM, Placid <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I'm a huge fan of Django. Let's face it, coding a Django site is just
> plain fun. And I've only just scratched the surface of what it's
> capable of. One of the things I've missed with Django is that I
> doesn't seem to ha
Thanks a lot.
On Jan 7, 1:19 am, Jeff Anderson <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > The number of features can grow or decrease depending on the user type
> > so I can't create a static form class with all the features listed.
>
> > Can someone please help to do this.
>
> Sur
On Jan 7, 2:59 pm, shabda <[EMAIL PROTECTED]> wrote:
> I want to have a models.py like this,
>
> class PageRevision(models.Model):
> """Stores a specific revision of the page"""
> text = models.TextField()
> revision_for = models.ForeignKey(Page, related_name =
> 'revision_for')
>
> cl
Hello all,
I'm a huge fan of Django. Let's face it, coding a Django site is just
plain fun. And I've only just scratched the surface of what it's
capable of. One of the things I've missed with Django is that I
doesn't seem to have much of a community past #django on
irc.freenode.net and sites suc
On Jan 7, 2008 7:59 AM, shabda <[EMAIL PROTECTED]> wrote:
> This line gives me an error,
> revision_for = models.ForeignKey(Page, related_name = 'revision_for')
> as NameError: name 'Page' is not defined, obviously because page is
> defined later in the file. I can not put PageRevision later as Pa
I want to have a models.py like this,
class PageRevision(models.Model):
"""Stores a specific revision of the page"""
text = models.TextField()
revision_for = models.ForeignKey(Page, related_name =
'revision_for')
class Page(models.Model):
"""Stores the latest page, the page which
i user django-register in my project,it is fatastic, but how to:
1. restrict username length must more than 5 words
2. make sure email is unique.
thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users"
> Does the function operate on a single model? Will it be run when you
> already have the instance of the model?
To add to Collin's comment, it doesn't even have to operate on a
single model. It simply has to be a property of the model
itself. Thus, it would make sense to have something like
Thanks for the replies. Makes sense.
The only reason I asked was because from my PHP MVC experience, all
logic went into the C which itself referenced the M when it wanted to
interact with the databse (such as inserting into a table).
But what appears to be the case here is that the Model should
im run a develop server ( python manage.py runserver ) on my deploy
server and the urlfield function good .. on mod_python with apache
not validate my url ?
im confused.
On Jan 6, 10:28 pm, zodman <[EMAIL PROTECTED]> wrote:
> 0.97-pre-SVN-unknown rev 7003
>
> i have a proble with de urlfield
Thanks alex, I think I'll leave it as-is for now, just getting my
teeth cut on writing some simple template tags of my own but I haven't
quite figured it all out yet. I'm so glad this list exists though. :-)
//emil
On 4 Jan, 23:41, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> How about a tem
It depends on concrete design decisions. Form wide initial data have
higher priority then the field's initial data. But if I don't want
init some field every time at form instance creation time I can pass
callable object to field declaration.
On 7 янв, 12:59, Collin Grady <[EMAIL PROTECTED]> wrot
When model method gets 'request' parameter its 99.99% ill-formed
design of application. All request/response handling and most of
business logic have to be in views.py or similar but not in models.py.
On 7 янв, 12:38, Darthmahon <[EMAIL PROTECTED]> wrote:
> Hey,
>
> I've just started working on m
I'm fairly new to django and am just starting to play with it as a
framework for web-based applications. The kinds of applications I
develop typically have some fields for entities that are non-editable,
with some of these being non-editable only some of the time (depending
on things like entity s
It doesn't have to be a callable, you just need to use the FORM's
initial arg, as Malcolm was initially referring to, not the field's
initial argument.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gr
Of course it's listing the same clients, you looked up the full list,
instead of, say, using the relations to category to get only those
clients which belong to that category :)
If a client has an fkey to category, then you need to be doing
something like {% for client in category.client_set.all
obj.user_id = request.user.id # this is too
really?
On 7 янв, 12:55, Collin Grady <[EMAIL PROTECTED]> wrote:
> On Jan 6, 1:36 pm, Darthmahon <[EMAIL PROTECTED]> wrote:
>
> > When I used request.user, it outputs the username of the currently
> > logged in user. When I try and use this as part of
On Jan 6, 1:36 pm, Darthmahon <[EMAIL PROTECTED]> wrote:
> When I used request.user, it outputs the username of the currently
> logged in user. When I try and use this as part of the entry into the
> table, it won't let me as it's expecting an integer.
You are mistaken. When /printing/ the user o
As zodman is getting at, django does not map your media for you - you
have to do that.
http://www.djangoproject.com/documentation/modpython/#serving-media-files
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
It depends a lot on the use case.
Does the function operate on a single model? Will it be run when you
already have the instance of the model?
If so, it may be a good case for a model function, since it will
already have access to the object it's a part of. General purpose
helpers can go in view
Hey,
I've just started working on my project but before getting too far
down the line I wanted to ask the opinion of people on here.
I've seen some code examples that show functions within the models.py
file like so:
from django.db import models
class SaveArticle(model
python manage.py runserver 0.0.0.0:8000
give someone your ip on port 8000 :)
Jeff Anderson escribió:
> Keith wrote:
>> Is there a way to
>> connect with the development server remotely
> Absolutely!
> By default the development server --only-- runs on localhost. If you
> want to make it access
92 matches
Mail list logo