hello,
i noticed that if i put {%block%} tag inside {%if%} tag in my
template, the contents of the block gets rendered even when the {%if%}
test fails. is this a bug?
thanks
konstantin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
%}
{{ block.super }}
{% if my_list %}
<script src="{{media_url}}js/prototype.js" type="text/
javascript">
{% endif %}
{% endblock %}
On Nov 14, 11:57 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Fri, 2008-11-14 at 20:45 -0800, akonsu wrote:
> > hel
hello,
what is the difference between
MyModel.objects.filter(field=value) and
MyModel.objects.filter(field__exact=value) ?
i could not find an explanation in the docs.
thanks
konstantin
--~--~-~--~~~---~--~~
You received this message because you are subscribed
hello,
consider the code below. it has two print statements at the end. their
output should be identical, but it is not. i think there is a bug.
thanks
konstantin
class X(models.Model) :
name = models.SlugField()
def __str__(self) : return self.name
class Y(models.Model) :
name = m
hello,
i need to attach an existing file stored in the right location to a
FileField of my model. can this be done without copying the file?
thanks
konstantin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
hello,
is there a way to make my custom tags and filters available to a
template that i create from a string like this:
template = Template(string)
template.render(context)
i know that i can use the "load" tag in the template, but suppose that
the strings that i create templates from do not hav
hello,
on pgsql 'reset auth' fails with an error saying that it cannot drop
one of the tables (i do not remember which though) because other
objects depend on it. on sqlite it works fine. i did not try it on
mysql.
here is my apps:
INSTALLED_APPS = (
'django.contrib.admin',
'django.cont
hello,
one more reason to develop locally is because doing it on a remote
machine is very slow.
the way i do it, is i set up an svn repository on webfaction and
checked out files in to my django application subtree. i also check it
out to my dev machine, where i change files and when i am ready
hello,
would django dev server be a useful alternative for you? it picks up
most changes without a restart.
konstantin
On Sep 15, 11:27 pm, Cequiel <[EMAIL PROTECTED]> wrote:
> Hi all.
>
> I installed Django with Apache in my Windows. It was a little
> complicated but finally it is working fine
hello, try to save your file in utf8 encoding and load data again. may
be it will help.
konstantin
On Sep 15, 10:57 pm, JoeJ <[EMAIL PROTECTED]> wrote:
> 1- Data loaded in DB
> from:http://leathergallery.com/module/data/sql/products/Products.sql--
> includes the phrase "Thinsulate®"
>
> 2- Djan
restarting apache after every
single change :)
konstantin
On Sep 16, 8:17 am, Cequiel <[EMAIL PROTECTED]> wrote:
> Hi akonsu.
>
> I wasn't sure about the django dev server. I thought that the django
> dev server was created only to follow the tutorials and for making
> you
hello,
you could try named url patterns.
> I am also seeing strange things if I change the order of the URLs in
> my URL patterns list.
please define "strange things" :) in general, the order of urls
matters because django starts rverse lookup from the top of the list
and stops at the first mat
hello,
i am looking for an advice from people who know django internals well.
to simplify, i have a template that currently uses a custom tag. the
tag emits the needed markup. suppose the template includes several
instances of the tag to generate different pieces of the page.
so in other words
hello,
upload_to can take a callable, which can be used to change your files'
location.
konstantin
On Sep 17, 2:42 pm, Faheem Mitha <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I wrote some unit tests for file upload. since I didn't want the files in
> the unit tests to be uploaded to the "official lo
hm, i never used a callable for uplod_to and what you are saying might
be true, but if it is, how this behaviour would interact with the
possibility to use file storage for uploaded files where MEDIA_ROOT
would make little sense?
konstantin
On Sep 17, 11:00 pm, Faheem Mitha <[EMAIL PROTECTED]> w
ok :) so then your solution would be to set up your own file storage
with location that you need.
konstantin
On Sep 17, 11:45 pm, Faheem Mitha <[EMAIL PROTECTED]> wrote:
> [This message has also been posted.]
>
> On Wed, 17 Sep 2008 20:14:54 -0700 (PDT), akonsu <[EMAIL PROTECT
hello, to my knowlege, you would need a custom tag or filter for that.
konstantin
On Sep 18, 1:06 pm, Xiong Chiamiov <[EMAIL PROTECTED]> wrote:
> Is it possible?
>
> If in the templates I call section.foo (with section being a
> dictionary), then it's the equivalent of section['foo']. Is there a
wow, my thread has been hijacked :)
thanks to those who replied to my original question.
konstantin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-
hello,
i would start with tracing the request that is sent from your python
script and making sure it is similar to the one sent from the login
form by the browser.
konstantin
On Sep 18, 5:50 pm, Carol <[EMAIL PROTECTED]> wrote:
> HI,
>
> I'm writing a Django app that allows access to pages eit
hello,
syndication feeds have links for each item as well as for the feed.
right now i hard code urls and they are the same as the urls i have in
my urlpatterns. i want to follow django's DRY principle so i am
looking for a way to generate these urls in my feeds class in a way
similar to {% url %
hello,
what problems are you having?
btw, did you try the webfaction forum?
konstantin
On Sep 20, 5:28 pm, Bobby Roberts <[EMAIL PROTECTED]> wrote:
> hi.
>
> I'm setting up a small django project on webfaction and i'm havnig
> some issues getting my settings.py file correct in regards to media
hello,
i set up an SVN repository and checked out the files on to my dev
machine as well as in to the directory where the web server can find
them.
i do not have setting.py in my repository, and i have different
versions of settings.py on my dev machine and on the server. so al the
differences a
hello,
you can override the model's save() method.
konstantin
On Sep 23, 3:05 pm, "Владимир Сидоренко" <[EMAIL PROTECTED]> wrote:
> hi
>
> i need to process a set of denormalized data in single model field.
> for example,
>
> class Place(Model):
> location = LocationField()
>
> it's rendere
hello,
how about
for m in Membership.objects.filter(person=ringo) : print m.date_joined
konstantin
On Sep 23, 4:58 pm, Nate Thelen <[EMAIL PROTECTED]> wrote:
> So if I have a Person object "ringo" and I want to get info about the
> Groups he is a member of, I would do this:
>
> for group in ri
would work, too. I was thinking more like if you got the
> ringo like this:
>
> ringo = Person.objects.select_related(depth=2).get(name='ringo')
>
> how could you get the data without having to make another DB call.
>
> Ideas?
>
> Thanks,
> Nate
>
>
hello,
i do not see a way to do it without a custom tag. i myself do a
similar thing using my own tag.
konstantin
On Sep 24, 2:17 pm, David Koblas <[EMAIL PROTECTED]> wrote:
> I'm not sure if this is possible to do without writing a templatetag
> (ok, that's my theory).
>
> Basic idea is that I
hello,
this works with sqlite:
AppModel.objects.extra(select={'year':"django_date_trunc('year', \"date
\")"}).values('year').order_by().annotate(total = Count('id'))
i assume that for postgresql i would have to use date_trunc function.
is there a portable way to do this?
thanks
konstantin
--~
hello,
i have found an (undocumented?) way to get the db table name from a
model: Model._meta..db_table.
is there a way to get the name of the db column for a field?
thanks
konstantin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
r",
"mymodel"."date")
) AS "year", COUNT("mymodel"."id") AS "total" FROM "mymodel" GROUP BY
django_d
ate_trunc("year", "mymodel"."date")'}]
in sqlite a string in double quotes i not
hello,
try setting the logo.url property. i do it with FileFields all the
time and it works.
konstantin
On Oct 2, 4:12 pm, ringemup wrote:
> Say I have an image file on disk and a model that uses an ImageField.
> If I want to create a model instance with that image file in the image
> field wi
did you try
company.logo = relative_path
?
On Oct 2, 4:45 pm, Nan wrote:
> OK, this seemed to work:
>
> def create_a_company(name, logo_path):
> company = Company()
> company.name = name
> relative_path = path_relative_to_media_root(logo_path)
> company.logo.name = relative_pat
hello,
i need a datetime field with an associated precision value. the
precision shows which parts of the datatime field are used. in other
words, my datatime field can contain just a year, or a year and a
month, etc. similar to postgres' DATE_TRUNC function. i know i can
just throw in two fields
hello,
django.db.backends.dummy is a good starting point. i have used it to
implement a workaround for a problem in the sqlite3 backend and yu can
find it here: http://code.konstantin.co.uk/mysite/sqlite3_fixed/
hope this helps
konstantin
On Oct 9, 6:29 pm, Daniel Rhoden wrote:
> Can you direc
hello,
is there anything in the web server logs?
konstantin
--~--~-~--~~~---~--~~
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 fro
hello,
there is a setting in settings.py that controls where django searches
for templates.
konstantin
On Oct 21, 2:50 pm, NoviceSortOf wrote:
> Although I have 500.html in my
> site-packages/django/contrib/admin/templates folder 500.html does not
> appear when it should, below see my errors (
hello,
i have a datetime field in my model. is there a way to order a query
set by this field truncated to the given precision?
even worse. i have another field in the model that specifies the
precision ('year', 'day', etc), i need to order the query set by the
datetime field truncated using the
hello,
anything is possible. you just need to decide how you are going to
store your changes before the model gets "really" saved so that the
preview functionality works. where would preview get the values from?
i propose a "published" boolean field in the model.
konstantin
On Oct 21, 3:41 pm,
hello,
if you set the admin email address and the necessary email parameters
in your config file then django will send an email with all the
details to the admin when an exception is thrown. would this be
sufficient?
konstantin
On Nov 26, 11:15 am, Gabriel Rossetti
wrote:
> Hello everyone,
>
>
hello,
in my custom admin class that inherits ModelAdmin i need to set
ModelAdmin.exclude, ModelAdmin.list_display, etc based on whether the
logged in user is a superuser or not.
is this possible?
thanks
konstantin
--
You received this message because you are subscribed to the Google Groups
"
hello,
it would be easier to help if you provided your modes. are you missing
this:
http://docs.djangoproject.com/en/dev/ref/models/relations/#ref-models-relations
for example:
>>> b = Blog.objects.get(id=1)
>>> e = b.entry_set.create(
... headline='Hello',
... body_text='Hi',
... p
hello,
my model is flexible enough to represent different and unrelated
entities in the database. for example it can represent an
advertisement or a blog entry.
i would like to provide separate admin interfaces for creation of
different entities (adverts, blog entries, etc) each of which is
repre
hello, may be this will be useful:
http://code.djangoproject.com/wiki/DynamicModels
On Apr 22, 5:53 am, Massimiliano della Rovere
wrote:
> An external process creates tables whose names follow the pattern
> "collector_XYZ"; all the tables will have the very same structure.
>
> For each table I n
hello,
i would like to replace my models.py with a package that has a
hierarchical directory structure. in __init__.py i want to define my
base models, and the other files would contain models that inherit the
base models.
in particular i am trying to define proxy models for my models and put
the
hello, i myself cannot parse this. what is the question?
On Apr 30, 10:16 pm, kandee wrote:
> I just got this new phone, and was trying to download some sound
> affects, from a download Page, but an error page came on and said that
> I needed to go on my django setting file and change it to false
hello,
by default an admin url for a model looks like this:
http:///admin///...
is there a way to change it? for different models i need to have
different url structure. say, i want to replace "/admin/" with something else.
ModelAdmin.get_urls()? the documentation is not very helpful for me. i
hello,
i remember i got this error when i tried to save a file because my
database's auto field sequences were not set up correctly. i am using
postgresql and i use fixtures to populate the database. so there were
a bug in fixtures that did not set sequences in postgresql correctly
(i think it mi
hello,
my script creates a fixture file at FIXTURE_PATH, and then runs the
reset command on my application. the relevant code is listed below.
now that i synced to the latest trunk, this code no longer runs
because the management module has no procedure 'reset'.
what is the proper way to do what
Alex, thanks for your help.
the code that worked is:
call_command('reset', 'myapp', interactive = False)
call_command('loaddata', FIXTURE_PATH, verbosity = 0)
cheers
konstantin
On Aug 30, 2:51 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote:
> try this:
>
> from django.core.management imp
hello,
currently the upload_to parameter of FileField can contain only
strftime formatting patterns. i am looking for a way to extend this
and let it contain, say, %s patterns that would be replaced by given
strings during object creation. has anyone done this?
thanks
konstantin
--~--~-~
hello,
in my models.py i have two classes related as many-to-many. if i add a
ManyToManyField to one of the models, and run manage.py reset or
syncdb, and then move the field to the other model (which functionally
makes no difference) and run manage.py reset again, it fails to reset
the database
hello,
the tutorial on djangoproject.com explains how to set up views
generating error pages for responses such as 404 or 500. is there a
way to use mod_python functionality and make apache serve its own
error pages? in case when it is running under mod_python of course. or
is it against django d
hello,
you might consider a VPS hosting if you know how to administer an OS
yourself. this would allow you to set up anything you want on your
server.
konstantin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dj
www.prgmr.com seem to have affordable VPS hosting. but i agree, they
still offer less space and bandwidth than shared hosting.
konstantin
On Feb 17, 8:03 am, [EMAIL PROTECTED] wrote:
> Yes, most of the hostings have fastCGI, but not flup.
> I know the best is to have VPS hosting, but they are ve
Hello,
i have set A that has many-to-many relationship with set B
currently admin interface (at least) forces me to select at least one
object from B if i add an object to A and the other way around. i do
not want that. i want to add an object to A which has no related
objects in B.
i need to h
really necessary. or am i wrong?
konstantin
On Feb 17, 8:15 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2007-02-18 at 01:09 +0000, akonsu wrote:
> > Hello,
>
> > i have set A that has many-to-many relationship with set B
>
> > currently admin interface
hello,
class A(models.Model):
bs = models.ManyToManyField('B')
class B(models.Model):
how to implement this query:
select *
from myapp_a
inner join (select a_id, count(*)
from myapp_a_bs
group by a_id) as a
on myapp_a.id=a
myapp_a.id,
> myapp_a,
> ...,
> ( SELECT COUNT(*) FROM myapp_a_bs WHERE a_id = myapp_a.id ) AS "B_count"
> FROM
> ...
>
> or you could call
>
> .b_set.count() on every a object you would get (one query for every
> instance !! )
>
> there is no cl
> First of all, modpython is running through cgi. As Nathan said, this
> would be a a loss of permormance, but what about security? I have read
1. to me, the phrase "modpython is running through cgi" makes no
sense. do you mean to say "python is running through cgi"?
2. what kind of security do
>
> You can extract this information from the _meta attribute on a model.
> This isn't documented (yet), but it's on the TODO list for things to
> document before 1.0.
>
thanks, i will check out this _meta attribute.
it seems to me that ManyToManyField is not a field, it is a table. so
if we did
hello,
if i wanted to store my templates in the database so that the users
could edit the way the pages look through the admin interface, how
would i go about doing that?
thanks for any pointers
konstantin
--~--~-~--~~~---~--~~
You received this message because
hello,
given a string 's' with a template source, i am trying to render this
template in my view:
from django.template import Template
...
t = Template(s)
t.render(context)
...
where 'context' is some context.
the above code works fine as long as 's' has no custom tags in it. but
it fails with
hello,
do you mean like here: http://www.djangoproject.com/documentation/tutorial3/
konstantin
On Feb 25, 3:51 pm, "Mary" <[EMAIL PROTECTED]> wrote:
> How can i create a view that select data from database and then view
> it in html template
> i really appreciate any help :)
>
> Thank you in ad
Hello,
your post is confusing. to start with, when you create models you do
not deal with any database tables. django creates tables for you from
the models. then, what you said about different titles, and admin is
not sufficient for me to understand what you are trying to achieve.
konstantin
O
't know how i can develop this part]
>
> any help will be appreciated
>
> Thank you in advance;
> Mary Adel
>
> On Feb 25, 11:06 pm, "akonsu" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello,
>
> > your post is confusing. to start with,
;content
>
> Thank you :)
>
> On Feb 25, 11:58 pm, "akonsu" <[EMAIL PROTECTED]> wrote:
>
>
>
> > i assume that you have a model called "Article", right? what fields
> > does it have?
>
> > konstanti
>
> > On Feb 25, 4:3
hello,
my host has psycopg2 and does not have psycopg. is there a way to use
that? i have django installed as local module in my user directory so
i can tweak it if needed.
thanks for any help
konstantin
--~--~-~--~~~---~--~~
You received this message because yo
hello,
is there any way to set a database-level check constraint on a table?
validators do not solve the problem because database can be altered
directly.
thanks
konstantin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Hello,
i had the same error which went away after i added "Allow" directive
in to my httpd.conf.
konstantin
On Mar 4, 10:23 am, "Greg Donald" <[EMAIL PROTECTED]> wrote:
> I have a local Apache vhost issue. I cannot get the /media files to
> work with my admin, so my admin has no CSS.
>
> My vh
hello,
class MyFile(models.Model) :
content = models.FileField(upload_to = '.')
type = models.IntegerField(editable = False)
when a file is submitted through a form post i need to check whether
the file format is valid and set the "type" field to indicate the
format.
i can see two ways
hello,
can a template invoke a method with parameters on a QuerySet object?
e.g. get(), filter(), etc.
or do i need a custom filter/tag for that?
thanks
konstantin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
hello,
this might help:
http://www.djangoproject.com/documentation/settings/#using-settings-without-the-django-settings-module-environment-variable
cheers
konstantin
On Mar 6, 2:05 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I think I need to clean out old sessions, but when I try to
ng daily_cleanup.py properly.
>
> Unless I'm totally misunderstanding what you're trying to tell me.
>
> On Mar 6, 1:09 pm, "akonsu" <[EMAIL PROTECTED]> wrote:
>
>
>
> > hello,
>
> > this might help:
>
> >http://www.djangoproject.com/d
apparently you cannot run it from the command line unless you set the
environment variable.
konstantin
On Mar 6, 3:26 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> It appears my thick-headedness is acting up again. How would I go
> about adding that from the command line? How DOES one run
hello,
i am using fixtures for site deployment. it would be perfect if i
could pull large amounts of data for fields in to my fixtures file
from external files. say, for example, my models have text fields that
contain html markup. i am pretty sure this cannot be done but i wanted
to ask anyways
hello,
is there a way to automate creation of administrator role for
django.contrib.admin application?
if i run "./manage flush --noinput" it does not create one.
thanks
konstantin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to th
Hello,
may be your data model is not optimal? too many relations? relations
are too complex?
konstantin
On Mar 7, 10:26 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> My site just keeps getting bigger and bigger, and the performance has
> gotten excruciatingly slow.
>
> I think the proble
hello,
your error output shows that it did find django installation in the
egg in site-packages. do you mean that you have a separate
installation that you want to use?
konstantin
On Mar 7, 10:56 am, "Ryan Alexander" <[EMAIL PROTECTED]> wrote:
> I've gotten pretty much everything else done, but
i do not know the answer to your question, but it reminded me that
there is a decorator like @login_required or something that you could
use in stead of checking your self. (if it applies to your case).
konstantin
On Mar 7, 4:18 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> On a more spec
hello,
but the user will have to wait anyway until the file is processed, no
matter what approach you take. i think what you are doing now is fine.
it may even be better because this way the wait time might be shorter
compared to the cron job that migh ttake a while to get to the file.
konstanti
hello,
as the subject says, select_related() does not return many-to-many
relations. is this a feature or a bug?
thanks
konstantin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to t
hello,
i suspect you cannot do this (but i can be wrong because i myself do
not have much experience with django).
you could make your own association table manually in stead of using
ManyToManyField. of course in this case you won't have FOO_set methods
on your models.
konstantin
On Mar 8, 10
hello,
the code below generates two queries to the database. is there a way
to make it get all objects related to object 'aa' and then just look
up the right one when get() is called?
thanks
konstantin
class AA(models.Model) :
name = models.SlugField()
class BB(models.Model) :
name = m
manually:
d = dict()
for x in AB.objects.select_related().filter(aa__name = 'aa') :
y = x.bb
d[y.name] = y
i was trying to avoid this extra list traversal...
konstantin
On Mar 9, 11:28 am, Atilla <[EMAIL PROTECTED]> wrote:
> On 09/03/07, akonsu <[E
hello,
this page seems to have useful information:
http://www.b-list.org/weblog/2006/08/05/django-tips-simple-ajax-example-part-2
konstantin
On Mar 9, 11:20 am, "Jay Parlar" <[EMAIL PROTECTED]> wrote:
> On 3/9/07, ashwoods <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
>
> > with so many choices, you
t;
> On Mar 9, 8:29 am, Atilla <[EMAIL PROTECTED]> wrote:
>
>
>
> > On 08/03/07, akonsu <[EMAIL PROTECTED]> wrote:
>
> > > hello,
>
> > > as the subject says, select_related() does not return many-to-many
> > > relations. is this a feature
hello,
i have several questions:
1. why do you have s;ash (/) before quotes in some places like
> homebutton01up.src = /"media/images/welcome.jpg";
2. what does "The script doesn't work" mean? i suspect it means the
images are not shown. is this correct?
3. "django will not find the ima
i think i am going insane.
On Mar 11, 9:19 pm, "Cynthia" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am very new in developing systems. So I am seeking help on how to
> complete my system step-by-step. I am using Visual Basic 6.
> Currently,
> I have a form. In that form, I will need to input a Par
Hello,
please allow me to disagree. the first two queries in the original
post return result sets which overlap. but they combined return the
empty set. this is the problem.
konstantin
On Mar 12, 9:13 am, Atilla <[EMAIL PROTECTED]> wrote:
> On 12/03/07, Boris Smus <[EMAIL PROTECTED]> wrote:
>
hello,
regarding the last part of your post: i have an unconfirmed suspicion
that data validation should not be done in models but in the forms
that manipulate data. does anyone know if this is correct?
konstantin
On Mar 12, 9:56 am, "gorans" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to a
hello,
i think render_to_response takes a Context object not a dict as the
second parameter.
konstantin
On Mar 12, 10:56 am, "DvD" <[EMAIL PROTECTED]> wrote:
> I got the same problem in a different context:
>
>
> Exception Type: TypeError
> Exception Value:'dict' object is not call
hello,
yes, there is search functionality called database API:
http://www.djangoproject.com/documentation/db_api/
do you have anything specific in mind?
konstantin
On Mar 12, 7:09 am, "Mary" <[EMAIL PROTECTED]> wrote:
> is there any search functionality that has been implemented with
> Djang
mage?
>
> On Mar 13, 1:04 am, "akonsu" <[EMAIL PROTECTED]> wrote:
>
>
>
> > hello,
>
> > regarding the last part of your post: i have an unconfirmed suspicion
> > that data validation should not be done in models but in the forms
> > that manipulat
hello,
i do not know what causes this.
i am curious what happens if you replace
return HttpResponse(stdout or stderr)
with
return HttpResponse('hello world')
this is how i would debug
konstantin
On Mar 12, 10:03 pm, "Ino Pua" <[EMAIL PROTECTED]> wrote:
> Quick way of reproducing:
>
>1.
hello,
but model.py is imported it as any module. what prevents you from just
having it on the PYTHONPATH and not necessarily in the application
directory?
may be i misunderstood the question...
konstantin
On Mar 12, 9:37 pm, "Mark Engelberg" <[EMAIL PROTECTED]> wrote:
> So I've got several ap
or each entry in my INSTALLED_APPS (from
> settings.py), it looks in that directory, and expects to find a
> models.py there. So I'm looking for an alternative to duplicating the
> same models.py file in multiple directories.
>
> --Mark
>
> On 3/12/07, akonsu <[EMAIL P
/usr/local/lib/python2.4/site-packages/django/core/servers/
basehttp.py", line 383, in write
assert type(data) is StringType,"write() argument must be string"
AssertionError: write() argument must be string
On Mar 13, 8:46 am, "Ino Pua" <[EMAIL PROTECTED]>
hello,
in urls.py:
urlpatterns = patterns('', (r'^/?$', 'path.to.myview'), (r'^(\w+)/?$',
'path.to.myview'))
in views.py:
def myview(request, name = 'index') : ...
in template:
{% url path.to.myview var %}
the url tag in the template is rendered as "//?"
if i comment out the first item in
f
course i can always check if my name is the empty string, but using
default values for parameters looks cleaner...
konstantin
On Mar 13, 11:19 am, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
> akonsu wrote:
> > i think the reason is two entries in the urlpatterns with the sam
could you explain how to add it to an application exactly? the
explanations given with the snippet are not enough for me.
thanks
konstantin
On Mar 13, 8:25 pm, "Ross Poulton" <[EMAIL PROTECTED]> wrote:
> On Mar 14, 8:54 am, "Greg Donald" <[EMAIL PROTECTED]> wrote:
>
> > How can I see the sql Dja
hello,
urlpatterns = patterns(..., (r'^path/?$', 'path.to.view')...)
in template:
{% url path.to.view %}
rendered as
/path/?
note the trailing '?' which is a part of the regular expression.
konstantin
--~--~-~--~~~---~--~~
You received this message because
1 - 100 of 129 matches
Mail list logo