I have a question on django model. I want to create a magazine model
that allow admin to add gadget, sport articles. And there are classes
for gadget, sport and food for adding only that specific article. How
to model this? I read through one to one field and many to many field.
I just could not ge
Hi Alex,
I follow the steps in http://wiki.dreamhost.com/Django.
I manage to do it successfully.
Cheers,
Ivan
On Wed, Jul 14, 2010 at 6:52 AM, Alex s wrote:
> Hi people,
>
> I just got a dreamhost account and I need to install Django there.
>
> I follow some usual links like w
Hi Justin,
What is the error message?
Cheers,
Ivan
On Sat, Jul 17, 2010 at 7:09 AM, justin jools wrote:
> RE: http://djangoadvent.com/1.2/everything-i-hate-about-mingus/
> I tried following this to install Django-Mingus, it says it is easy
> but not for a newbie who knows noth
/virtualenv-helper-for-windows.html)
Hope it helps.
Cheers,
Ivan
On Sat, Jul 17, 2010 at 7:42 AM, justin jools wrote:
> Hi,
> sorry was
>
> c:\django>mkvirtualenv myblog
> 'mkvirtualenv' is not recognized as an internal or external command,
> operable program or ba
http://charlesleifer.com/blog/djangos-inlineformsetfactory-and-you/
might be the one you're looking for.
Cheers,
Ivan
On Wed, Jul 21, 2010 at 7:30 AM, Renne Rocha wrote:
> Hello all,
>
> I want to create a page that the user will be able to include one
> 'Projec
Do you write your own context processors?
If yes, you need to add 'django.core.context_processors.media' in
TEMPLATE_CONTEXT_PROCESSORS manually.
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.media',
)
Cheers,
Ivan
On Fri, Aug 20, 2010 at 4:07 A
SQL
Server through pyodbc
Thanks.
Ivan
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@google
Hi all,
I'm trying to build a Django project by working through the handbook
but I'm having some problems accessing the database by referencing the
model I've created from it (by inspectdb). When attemping to do some
"Basic Data Access" (Chapter 5) I can't import the models I've made
(from [app nam
Personally, I like hand on. "Practical Django Projects" is
recommended. http://apress.com/book/view/9781590599969
On Fri, Sep 24, 2010 at 12:38 PM, Tim Johnson wrote:
> Thank you -
> Shawn Milochik and Tran Cao Thai. :) thus far.
> I'll check back in the morning.
> cheers
> --
> Tim
> tim at
Try to replace your patern '^admin/' this '^admin/$', or swap
( r'^admin/', include( admin.site.urls ) )
and ( r'', include( 'role.company.urls' ) )
> my urlconf look like this
>
> from django.conf.urls.defaults import patterns, include
>
> # Uncomment the next two lines to enable the admin:
> fro
Hi all,
With Django, what is the easy and best way to serialize/deserialize
objects that are no Django objects?
django.core.serializers only works with Django objects. But what
happens if we have other object type?
How to serialize this:
class MyClass(object):
a = 'a'
b = 'b'
xm
Tnxs a lot Russ,
Then I will take a look on the state-of-the-art of this libraries. ;-)
On 8 nov, 05:22, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote:
> On Sat, Nov 8, 2008 at 1:35 AM,IvanTarradellas<[EMAIL PROTECTED]> wrote:
>
> > Hi all,
>
> > With Django, what is the easy and best way to s
default=1,
help_text=u"Zoom level ktory sa použije pri zoomovaní na objekt pri
vyhľadávaní")
sql_hladanie = models.TextField(u"Vyhľadávací SQL", blank=True)
class Meta:
ordering = ['kategoria','poradie']
verbose_na
e first line in my models.py is # -*- coding: utf-8
-*-. Please see : http://gista.sk/dl/bugs/django/models.py
>
> Regards
> Luke
>
> On Nov 15, 11:09 am, Ivan Mincik <[EMAIL PROTECTED]> wrote:
> > Hi,
> > I have a problem when adding record by Django Admin and I am
ting
> __unicode__ method generated an error generated yet another error, and I
> haven't quite figured that one out yet. But if you want to make progress
> you can just fix your __unicode__ method.
What to do with this? Do I have to fill some bug report ?
>
> Karen
>
> >
7timesTom wrote:
> cars = Car.objects.filter(...) #upto 2000 items
> msg =... len(cars) # can you see the massive memory use here?
This is actually well documented:
http://docs.djangoproject.com/en/dev/ref/models/querysets/#when-querysets-are-evaluated
--~--~-~--~~~-
Chris wrote:
> try:
> push = getattr(self, 'get_%s_content' % self.name)
> except AttributeError:
> raise "Method does not exist"
> if callable(push):
> push(**argv)
There are a couple of problems with this code.
1. It's more readable to call hasattr than to catch an exception from
Ivan Sagalaev wrote:
> if hasattr(self, 'get_%s_content' % self.name):
> raise Exception('Method does not exists')
Typo: there should be `if not hasattr`, obviously.
--~--~-~--~~~---~--~~
You received this message because you ar
Komodo Edit 5 couldn't run at Debian Etch. Has anybody some older version ? (4)
Ivan
On Wednesday 26 November 2008 17:50, vivek wrote:
>
> I also use komodo ide :
> - It can be used with other dynamic languages like php, so if you
> sometimes need to do something in lan
fabio natali wrote:
> This is the urls.py I created: http://dpaste.com/72138/
> It doesn't work though: I get a
> KeyError at /manufacturer
> u'manufacturer'
> when accessing http://localhost:8000/manufacturer
> (manufacturer being one of my model)
KeyError says that it can't find a key 'manufact
fabio natali wrote:
>> import models
>
> I added the line
>
> import arteak.management.models
It's not the same thing :-). This line won't load the name "models" into
your local environment. If you want import from some path this should be:
from arteak.management import models
fabio natali wrote:
> That's right! So here comes my current urls.py:
>
> http://dpaste.com/72638/
>
> then the traceback I get at http://localhost:8000/:
>
> http://dpaste.com/72639/
Oy! I've found it :-). It has nothing to do with model_view decorator or
anything that we're talking here abo
fabio natali wrote:
> For the sake of clarity, my django project is named arteak, the models
> we are using belong to an app called "management".
Ah! Then there should of course be get_model('management',
kwargs.pop('model')). I thought 'arteak' was the name of the app. This
is why it returns N
Frantisek Malina wrote:
> Sadly, I am not aware of any current Slovak Django users.
> E.g. First 50 results on http://google.sk/search?hl=sk&lr=lang_sk&q=django
> won't return a single blog-post about Django web framework in Slovak.
May be contact one of those: http://djangopeople.net/sk/ ?
Gábo
dankelley wrote:
> In other words, should I (or typical users) download the official 1.0
> version, or will it still be advised to track the development version?
Nothing can stop you from using trunk :-)
I'm not a core developer so don't take it as an official advice. But I
do think that living
tsmets wrote:
> OK !
> I found it : http://code.djangoproject.com/wiki/AutoEscaping
>
> {% autoescape off %}
> {{ body }}
> {% endautoescape %}
Or just {{ body|safe }}.
Better yet, the thing that creates colorizedCode should mark it as
"safe" (i.e. not requiring escaping) in this fashion:
Malcolm Tredinnick wrote:
>> Better yet, the thing that creates colorizedCode should mark it as
>> "safe" (i.e. not requiring escaping) in this fashion:
>>
>> from django.utils.safestring import mark_safe
>> def colorize():
>> # ...
>> return mark_safe(result)
>
> Alt
truebosko wrote:
> What I found though, is that the view that is being called from JS
> will finally have access to the session variable after the upload is
> complete
Looks like you're doing it with development server. It's single-process
and can't handle and upload and another view simultaneou
w.py" there are these lines:
response = HttpResponse(mimetype='application/pdf')
response['Content-Disposition'] = 'filename=gisplan.pdf'
Please, can anybody see where can be the problem ?
Ivan
--~--~-~--~~~---~
On Monday 26 January 2009, Vinay Sajip wrote:
>
> On Jan 26, 7:59 am, Ivan Mincik wrote:
> > Dear django users,
> > we have a problem with filename of resulting PDF generated by reportlab and
> > then downloaded by browser.
> >
> > Generated PDF is OK, but
n, no documentation
* djangochat
http://github.com/dmm/djangochat/tree/master
"Django-based jabber client app"
no documentation
Thanks and best wishes
Ivan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
usage?
Best
Ivan
> Are you looking for a multi-user chatroom, or private chat? I'm
> guessing you want the first, but you included a jabber client in there
> as well, which, to my knowledge, only supports 1-to-1 conversations.
>
> The approach I've seen for most sites i
On Tue, Aug 11, 2009 at 10:09 AM, gentlestone wrote:
>
> My settings:
>
> DEFAULT_CHARSET = "utf-8"
> TIME_ZONE = 'Europe/Bratislava'
> LANGUAGE_CODE = 'sk'
> USE_I18N = True
>
> DateTime fields are displayed in the admin page incorrectly. If I
> change the language code for 'en' or 'cz', the disp
Hello Django Users!
I wish customize standart Group model to add some fields (is_region,
is_managers).
how i can do this? true way:)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to t
me know if you need more information.
Can anyone help? Unfortunately, I think we have to stick with CentOS.
With apologies, thanks and best wishes
Ivan
* What I did
As CentOS uses python 2.4, I installed python 2.6 into /opt. I compiled
from source using the following configure:
.
of apache altogether and
have nginx talk to django directly via fastcgi (e.g., [1]) (will also
give me an excuse to try out git instead of svn). If you don't hear
back from me in a day or two, it worked.
With thanks and best wishes
Ivan
[1] http://code.djangoproject.com/wiki/ServerArrangements
works on ubuntu would raise 403s on
centos (just checked: on the ubuntu machine /home/siteuser/ was 775).
Best wishes
Ivan
[1] http://djangoadvent.com/1.2/deploying-django-site-using-fastcgi/
On May 10, 10:25 am, Tom Evans wrote:
> On Mon, May 10, 2010 at 9:39 AM, Ivan Uemlianin wrote:
@Graham see my reply this morning to your post on the modwsgi list:
http://groups.google.com/group/modwsgi/browse_thread/thread/a157d0eba50b826a
@Sam I didn't change the home directory permissions on either machine:
they seem to have different default settings (775 on ubuntu, 700 on
centos).
chat application.
His blog also mentions Speeqe [5], which is a chat application
integrating Django and ejabberd, the erlang xmpp server.
Let us know how you get on.
Best wishes
Ivan
[1]
http://pythonhaven.wordpress.com/2009/07/13/django-powered-ajax-chat-%E2%80%93-part-2/
[2]
Hi,
I would like to ask, what is the best way to change some of the
translation messages in Django Admin to custom ones. Is there any good
way, how to override system translations of Admin in some projects
where I need it ?
Thanks
Ivan
--
You received this message because you are subscribed to
self).
Do let us know how you got on.
Best wishes
Ivan
On Sep 1, 3:05 pm, yves_s wrote:
> I also looking for realtime messaging for django and found this two
> links.
>
> http://www.clemesha.org/blog/realtime-web-apps-python-django-orbited-...
>
> http://bitshaq.com/2010/07
sh is possible
with apache, ... If you're sharing web server resources, your hosts
might not be too friendly about your doing server push.
If you can't run these systems with your current host, try them out on
your own machine while you're looking for a new host;)
Best wishes
Ivan
line 1, in
ImportError: No module named CsrfViewMiddleware
>>> import django.contrib.csrf.middleware.CsrfResponseMiddleware
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named CsrfResponseMiddleware
>>> import django.contrib.csrf.middleware
>>>
Please can anyone help
need them (dave.favourite_colour =
'orange'; bob.online = True, etc).
Is that second method just reinventing the fixture, or is it more
appropriate here?
Thanks and best wishes
Ivan
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To pos
Dear Ian
That's great! Exactly my use case. Thanks very much for your help.
Best wishes
Ivan
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe
choices=colours)
and
fave_colour = forms.ChoiceField(initial="Please choose a colour:"
choices=colours)
and I've scoured the net for clues, but found nothing which works.
Please can anyone here help me work out how to do this with
django.forms
n means the form cannot be
submitted without choosing a colour, and somehow (because empty string
always sorts before anything else?) the 'invalid' choice is displayed
by default and can act as a prompt.
Thanks (for the facility), apologies and best wishes
Ivan
On Mar 23, 2:56 pm,
Dear Dave
Thanks, that does look useful. Seeing Ian's solution I was wondering
if I could manage.py in some way.
Best wishes
Ivan
On Mar 23, 4:55 pm, Dave Murphy wrote:
> On Mon, Mar 22, 2010 at 12:26 PM, Ivan Uemlianin wrote:
>
> > I'm now thinking a fixture might n
t full of holes?
Thanks and best wishes
Ivan
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googl
Hi Daniel
many thanks...
that help me a lot..
now it works.. ;-)
ivan
>
> That method should have gone in the TipoIndagine model.
> --
> DR.
>
--
Ti prego di cercare di non inviarmi files .dwg, .doc, .xls, .ppt.
Preferisco formati liberi.
Please try to avoid to send me .
Malcolm Tredinnick wrote:
> One other thing that I forgot in my earlier email: it's not actually
> clear why the database connections get "lost" in the current
> implementation. We close the connection too early, but when the template
> rendering needs to access the database, it just opens a new o
Malcolm Tredinnick wrote:
> Thanks, Ilya. I'd gotten that far, too. Unfortunately, though, it isn't
> quite that easy. Well, it is that easy for mod_python, however for WSGI
> compliance, we can't do that (since the WSGI handler returns an
> iterable).
But a WSGI server calls "close()" on the ite
Malcolm Tredinnick wrote:
> Perhaps read the remainder of the thread? :-)
Sorry, I was too impatient this time :-)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send em
Vladimir Pouzanov wrote:
> Hi all,
>
> I have two sites that run nearly identical django instances. I wonder
> if it's possible to somehow set per-domain ROOT_URLCONF and
> TEMPLATE_DIRS to serve both sites from one django process.
Why not just have two settings files? If you have common setting
Jeremy Dunck wrote:
> Two settings files being used by a single process?
>
> How would that work?
Oh... I missed the bit about a single process. But now I wonder why
require this? One server can happily serve two sites either from
separate mod_python handlers or separate FastCGI servers.
Vlad
brutimus wrote:
> {% block content %}
>
> {% include "whatever.html" %}
> {% endblock %}
This is most certainly a BOM -- Byte Order Mark of a UTF-8 charset that
your text editor has added at the beginning of the 'whatever.html'. It's
a part of UTF-8 and those symbols are normally not seen
Alex Nikolaenkov wrote:
> Hello guys,
> I like just about everything in django, but at this point of me reading django
> book I can't imagine the way of xmlizing django.
There are serializers in Django:
http://www.djangoproject.com/documentation/serialization/
> Is there a way to use XSLT templ
sago wrote:
> The feed approach for routing urls is everything that django's url
> system was designed not to be: it imposes a hierarchical structure on
> the url, distributes the configuration over multiple representations,
> and could be avoided by having a feed view that behaves more like
> gen
Wiley wrote:
> I was wondering if anyone else had trouble or a workaround for dumping
> and loading data with mixed character sets using a postgres backend.
> My data has quite a few Chinese characters, they run from my normal
> installation fine, but when i dump and reload the data, it's all
> co
Ilya Semenov wrote:
> === apps/app1/views/__init__.py ===
> @url(r'^index/$')
> def index(request):
> ...
>
> @url(r'^news/$')
> def news(request):
While the decorator looks nice it creates in my opinion at least as many
problems as it solves.
1. You can apply decorators only to custom v
Ilya Semenov wrote:
> Second, I think the use of generic views is over-estimated. Generic
> views do not even support access restrictions (@user_passes_test) and
> thus are most of the time proxied via custom one-line views.
Actually they support decoration perfectly well, right in urls.py:
On 17 янв, 05:58, otonk <[EMAIL PROTECTED]> wrote:
> hi, i am currently designing two or more django application, one
> application act as the master application, contains all the data, the
> other application has partial function of the master application. The
> master database belongs to the mas
gt; > records from master database where 'modified' is greater than last
> > sync date and INSERT/UPDATE it into other database.
>
> cool thanks Ivan..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Piotr, having django-multilingual features in the core won't make them
any better. Complex models and use-cases will still need custom/manual
solutions. It will add unneeded overhead to single-language sites and
may even break the sites that use explicit custom solutions (like
mine).
I am develop
Models that need flexibility have `lang` and `is_translation_of`
fields. Views (or custom managers) filter the output based on `lang`
and add the link to other language if translation exists. Some models
just have two separate text fields for each language and views (or
custom managers) display th
[EMAIL PROTECTED] wrote:
> This seems kind of hacky, but it really seems like it makes sense to
> show this as a form error. The only other way I could think to solve
> this was to pass the request to the model and then check the above in
> the clean method, however this seems just as bad as it br
metaclass will create
`title` property that will get the right filed based on
settings.LANGUAGE_CODE.
Hope this helps.
--Ivan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to th
Made some corrections:
http://pastebin.com/d6337d211
On Jan 28, 10:45 pm, Ivan Illarionov <[EMAIL PROTECTED]>
wrote:
> IMO code_berzerker's approach is the best for complex models. But in
> many cases that don't require a lot of flexibility it can be better to
> use s
> Fortnately, Python makes this very easy with the built-in
> property() call:
>
> class MyModel(Model):
> surname = CharField(...)
> forenames = CharField(...)
> def _get_name(self):
> return self.forenames + ' ' + self.surname
> name = property(fget=_get_name)
Python (2.
After discussion on Django developers group about
Model.__init__(*args) deprecation I found the way to dramatically
optimize instantiation of Django models. Here is a code:
http://pastebin.com/m8e7e365
You may add this code to your Django model class and then instead of
obj = YourModelClass(titl
I had A LOT of similar problems when I need to work with cyrillic. I
can easily replay your problem. Fortunately I'm on localized Windows
machine.
So:
>>> path = r'C:\Documents and Settings\vanilla'
>>> os.path.isdir(path)
True
>>> os.listdir(path)[-1]
'\xd8\xe0\xe1\xeb\xee\xed\xfb'
>>> a = os.lis
It looks that you have encoding problem. You have wrong characters
somewhere. The solution is to find the text that causes problems and
create custom encode and/or decode function that fixes this.
--~--~-~--~~~---~--~~
You received this message because you are subsc
> Our database is utf8 we explicitly convert ignoring errors to utf8
> before passing to textile. Also it's not 1 page that poops it's every
> site pooping at once.
That means that the problem is inside something that shows on every
page.
--~--~-~--~~~---~--~~
You r
You have this in your log:
func
ignore_failures
False
Maybe try to change this to True. And double check that everything is
converted with 'ignore'.
Another option: store the textiled xhtml in database.
--~--~-~--~~~---~--~~
You received thi
You pass unicode value to textile.textile. I was able to repeat your
error by doing the same: textile.textile breaks with similar error
when it recieves a unicode string. It can be fixed by encoding your
value as utf-8 before passing to textile.textile.
Your error log has:
return textile.textile(
Your problem was solved here:
http://code.djangoproject.com/changeset/5609/django/trunk/django/contrib/markup/templatetags/markup.py
You may have other problems if you mix trunk with 0.96. Many bugs are
solved in trunk - the best strategy is to update everything.
Hope, this helps.
-- Ivan
On
> Hm, a code running fast is really good but this solution seems to be really
> experimental and hard-to-use, as well as making code kinda unreadable. It
> would be great if it's implemented in next django releases to make django
> fast :). Is it possible to do it?
It depends on Django developers
The problem here is not about wrong encoding of strings - it's all
about unicode/string relationship and from-unicode-to-string/from-
string-to-unicode problem.
I really think that it will be fixed if you replace
return textile.textile(value, encoding=settings.DEFAULT_CHARSET,
output=settings.DEF
If you don't want to rely on Django's smart_str, you can do following:
if isinstance(value, unicode):
value = value.encode('utf-8', 'ignore')
return textile.textile(value, encoding=settings.DEFAULT_CHARSET,
output=settings.DEFAULT_CHARSET)
textile.textile() certainly breaks with your error if
There is 'post_save' signal with 'created' parameter. But,
unfortunately, this feature is undocumented...
On Jan 31, 6:44 am, Julien <[EMAIL PROTECTED]> wrote:
> Hello there,
>
> Does the title says it all? When overriding the save method of an
> object, I'd like to know if that object is being
Example of post_save with 'created' flag is in Django tests:
http://code.djangoproject.com/browser/django/trunk/tests/modeltests/signals/models.py
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
> def save(self):
> if self.stuff !=
> magic_function_that_tells_what_is_in_database_for('stuff')
> do_this()
> super(A, self).save()
This 'magic function' is
self.__class__.objects.get(id=self.id).stuff
if self.stuff != self.__class__.objects.get(id=self.id).stuff:
do_this()
de without dispatcher.send() lines you'll get a
reasonable speed increase.
--Ivan
--~--~-~--~~~---~--~~
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
d replace model.Model with MyModel in class definitions.
I know it's hackish, but it's easier and it works. :)
Hope this helps,
Ivan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gr
http://djangoamf.sourceforge.jp/index.php?DjangoAMF_en
On 1 фев, 18:33, "Ronaldo Z. Afonso" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm new in Django and Web development and I just want to know if it's
> possible to have a flash script showing elements that was retrieve from
> a data base by django?
> def create_user(self, username, email, password=None):
> def make_random_password(self, length=10,
> allowed_chars='abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789'):
>
> These two methods seem to involve situations where they need to act on
> a model, but the object instance hasn't been
fizban wrote:
> On 12 Apr, 12:54, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>> It sounds like you're using markdown 1.7. We haven't yet incorporated
>> the patch necessary to handle markdown 1.7 along with the earlier
>> versions. That will go in soon, though -- there's already a ticket in Tra
,
--
Ivan
On Apr 13, 3:23 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> We're getting pretty close to merging queryset-refactor into trunk and
> would like to do this as soon as practical. There are still a couple of
> enhancements to add (#5420, mostly), one bug to fix (#5937)
shabda wrote:
>> You could use SQLAlchemy to access your forum database, as long as you
>> don't need it in the admin.
>
> As, I just need to access the other DB in one place, I think this is
> the way to go here.
Come on guys! If you just need to create a record in a DB you certainly
don't nee
this helps.
Ivan
On 19 май, 03:22, Austin Govella <[EMAIL PROTECTED]> wrote:
> I used MacPorts to install jpeg (libjpeg), freetype, zlib, and then
> Python Imaging Library.
>
> When I validate, I get the "no PIL" error.
>
> Error: One or more models did not vali
e 133, in
> md5 = __get_builtin_constructor('md5')
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/
> lib/python2.5/hashlib.py", line 60, in __get_builtin_constructor
> import _md5
> ImportError: No module named _md5
>
> Thanks f
omat * gezgin.com wrote:
> And url pattern that matches the view is
> (r'^photo/(?P[-\w]+)/(?P\d+)/$',
> 'artist.views.artist_photo'),
>
> Images are displaying fine but the links does not appear. (i.e. {% url
> artist.views.artist_photo slug=artist.slug,id=photo.id %} does not
> render anything.
Dirk Eschler wrote:
> you can try to add this as first line in your file:
>
> # -*- coding: utf-8 -*-
And after this there's no need to write u'ç'.encode('utf-8') but is
enough to write just 'ç'.
--~--~-~--~~~---~--~~
You received this message because you are su
omat * gezgin.com wrote:
> Yes, but I want the application to be internationalized. I want only
> one of the installations to have only one translation.
I had this problem on my site. I don't know if it's a bug or not but I
managed to make it work by choosing English as a default language and
R
[EMAIL PROTECTED] wrote:
> Is this truly the case? I thought Django used a persistent db
> connection.
No, Django closes connections upon each request. There were some
discussions about it in the early days and some consensus was along the
lines that a simple ad-hoc solutions like "just don't c
Ilya Semenov wrote:
> What different approach could I choose? I'm writing real-life model -
> a Ticket can either have a User (who resolved it), or not (if the
> ticket has not been yet resolved). Listing all resolved Tickets with
> corresponding Users is a simple real-life task, too.
Indeed... H
Iapain wrote:
> Hello,
>
> I am writing a SQL logviewer for sql queries fired by django. If I use
> below code then i get an empty list of dictionary.
>
> from django.db import conneciton
> from django.conf import settings
> debug = settings.DEBUG #btw its always True, because i set it to true
>
[EMAIL PROTECTED] wrote:
> def update_snip(request):
> u = User.objects.get(id=request.session['userid'])
> snip = Snippet.objects.filter(id=snippet_id,user=u)
> snip[0].active = 0
> snip[0].save()
> print "Active = %s" % snip[0].active
>
> This NEVER works. What am I doing wr
akonsu wrote:
> i think the reason is two entries in the urlpatterns with the same
> view. is this a bug?
Well, not exactly a bug but a limitation of "reverse" function that {%
url %} uses to do actual resolving. Incidentally there is a thread in
django-developers[1] about solving a similar iss
akonsu wrote:
> thank you Ivan,
>
> the problem with collapsing is that the 'name' parameter in my view
> does not get the default value then if the url is empty.
Oh... Indeed :-( Then may be just checking the value inside the function
is your
1 - 100 of 514 matches
Mail list logo