I can't rewrite the mysite/polls form into classes.help me. I get
different errors every time.
{% csrf_token %}
{{ form.as_p }}
# forms.py:
from django import forms
from .models import Choice
class VoteForm(forms.ModelForm):
choices = [(ch.pk, ch.choice_text) for ch in
Choi
there is no such check for PY2? Why not to decode only if it's
not unicode?
With such implementation it is not possible to pass unicode object that
contains non-ascii characters to QueryDict.
Can somebody give me a hint on why things wre done in this way?
Thanks,
Alexey.
--
You re
Why "flat" keyword is accepted that way? Why not just as def
values_list(self, *fields, flat=False)? Because of that I cannot have
support in my IDE (autocomplete)
def values_list(self, *fields, **kwargs):
flat = kwargs.pop('flat', False)
if kwargs:
raise TypeError(
I found this issue in my big project. And then I started new Django project
from scratch, and reproduced the problem.
You can reproduce this bug:
1) start new Django project
2) create context processor that raises Http404
3) set Debug=False
4) create custom '404.html' template
And then you get
Django doesn't catch django.http.Http404 exception in my context processor
when Debug=False and when I have custom '404.html' template. It just throws
Internal Server Error. Is it Django bug?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
Hello everyone!
I would like to collect thoughts, articles, posts, code bases, actually any
shared experience on how to port existing project from PHP to Python/Django.
Platform agnostic advises or thoughts are appreciated as well.
There are my initial quick thoughts and findings on what shou
Im developing small intranet web service. I want authenticate users over
kerberos in MS AD or with basic auth. For that reason i need to set two
'WWW-Authenticate' http headers in response 401. How can i do it with
Django ?
Should be something like this:
Client: GET www/index.html
Server: H
Hi, Surya!
My practice is to have 'settings_template.py' in repository and
'settings.py' ignored, so 'settings.py' looks like:
from settings_template import *
# and here's confidential settings and other
There also may be many 'templates' for settings, like
'settings_dev.py', 'settings_pr
Hello, everyone!
I've released 1.0 beta of the app:
https://github.com/05bit/django-smarter
It helps with adding generic views. Actually, I've build this app for
one of my projects, which is 80% based on generic views, and it seemed
very useful for that particular case :)
As my project evolved a
You are welcome :)
I'm just interesting what kind of task and environment do you have?
I've never played with Jython and never needed to use it, so it's
uncommon for me.
Sure. If you need your Python code to interact "directly" (not through
network API) with Java code, Jython seems reasonable sol
Hi, SeeGull!
It seems that Django 1.5 is incompatible with your version of Jython
(or with Jython at all, I don't know).
I've looked at 'django/utils/version.py' (you can see from traceback -
exception raised in this file):
https://github.com/django/django/blob/master/django/utils/version.py
So,
Hi, Derek!
First of all, thank you! :)
> Looks good ... I think a demo with more items in it would be useful se we
> can see how page navigation works. It also seems that there is no record
> count when you add a filter (eg. "displaying 5 of 20")?
Sure, you're right - actually with large amount
You are welcome! :)
Alex
///
On Thu, Mar 14, 2013 at 12:33 AM, VVilku wrote:
> Thanks a lot :)
> You're right.I did not notice it.
>
> Working when add 'atest':
>
> or
>
> or
> when remove this namespace from project/urls.py.
>
> regargs
>
>
>
> W dniu środa, 13 marca 2013 20:46:41 UTC+1 użytko
Hi VVilku!
It should work if you remove `namespace='atest'` from 'auth_project/urls.py'.
regards,
Alex
///
On Wed, Mar 13, 2013 at 10:14 PM, VVilku wrote:
> No, I dont't. :)
> The attachment in the first post it is my attempt to isolate the problem.
> (assumption "blog"=="atest")
>
>
>
> W dni
Hi dj-konst!
Static files in production are generally served by web server - Nginx
or Apache or something else. And it's safer to place static files dir
outside of your project dir and use 'collectstatic' command to grab
static files there.
Here are some examples of Nginx config with static files
Hola David! :)
I appreciate your attempt and systematic approach :) It might be interesting.
I write web-services using Python and Django since 2008, before that I
worked for some projects in PHP/WordPress/Drupal (less then 1 year
exp.), I've programmed several games in Flash/AS3 (about 3 years e
Thank you, Mário! :)
Alex
///
On Tue, Mar 12, 2013 at 11:23 PM, Alexey Kinyov wrote:
> Hi Tomas,
>
> thank you! :) It's really inspiring :)
>
> Yes, I looked through all well known admin customization/skin apps -
> some of them a really nice. I'm trying to buil
>
> Anyway, I wish you good luck in future development.
>
> Cheers,
> Tom
>
>
> Dne Tue, 12 Mar 2013 19:58:22 +0400
> Alexey Kinyov napsal(a):
>
>> Hello everyone!
>>
>> Today we've released alpha of Brillixy https://github.com/05bit/brillixy.
>&
Hello everyone!
Today we've released alpha of Brillixy https://github.com/05bit/brillixy.
This is a Django admin skin with some extras. Actually it's an
alternative to Grapelli, Admin Tools and other apps that changes
standard Django admin look and user experience. It's simple and
minimal at the
http://rutracker.org/forum/viewtopic.php?t=3720635
On 22 май, 09:05, Ali Shaikh wrote:
> Hey Django.!!
>
> Please can anyone share Python Web Development with
> Django by Wesley Chun E-Book??
>
> Thank Yooo
--
You received this message because you are subscribed to the Google Gr
Hi!
I wonder what are pros and cons of explicit import views in urls.py.
There are at least 2 ways of defining urlpatterns.
* explicit import
from . import views
urlspatterns = patterns('',
('а/', views.a),
)
* lazy import
urlspatterns = patterns('path.to.app.views',
('a/', 'a'),
)
The fir
s a User.
https://docs.djangoproject.com/en/1.4/topics/auth/#django.contrib.auth.models.UserManager.create_user
I think the problem is that 'user.password' is hashed value but
login() method receives raw plain text password, as I answered above.
Alexey
///
On Wed, Mar 28, 2012 at 12:27 PM, Reinou
Hello, Jonathan!
I think issue is in the fragment 'password=user.password' in the line:
> response = self.client.login(username=user.username,
> password=user.password)
'user.password' - is not plain text password, it's encrypted and it's
not equal
We are using PDFs.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/EfQeowVhrBoJ.
To post to this group, send email to django-users@googlegroups.com.
To unsu
Hi!
We are using http://PythonReports.sf.net/.
--
Regards,
Alex.
--
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 group, send email to
django-users+un
Hi!
We are using TimedRotatingFileHandler with overridden stream with a class
that opens log file for append on every write.
--
Regards,
Alex.
--
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@go
I need to make a report with django .
This report supports (chart , export PDF, Excell ...,)
please give me some recommendations with tool i must use for this case.
To produce printable reports, you can try
http://pypi.python.org/pypi/PythonReports/.
--
Regards,
Alexey.
--
You received this
Hi, I enabled django auth middleware, so now I have a user variable
in my request context. In this case for each page request user object
is queried from the database. Is it possible to set up this middleware
to use a cached user object (for example, put by me in session)? User
objects are not upd
Hi,
try executing
import logging
logger = logging.getLogger('testlogger')
logger.warn('hello')
logger.info('please appear')
in ./manage shell.
--
Alex
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django
daemons do, but this is a bit more
expensive.
--
Regards,
Alexey.
--
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 group, send email to
dj
es it allow access to the other app
by direct url after successful login and redirect?
--
Regards,
Alexey.
--
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 unsubsc
ingly?
You can try redirect twice. Set fixed LOGIN_REDIRECT_URL to a view that
makes further redirect based on user permissions.
Or you can try fixed hidden input next in the login templates.
--
Regards,
Alexey.
--
You received this message because you are subscribed to the Google Groups &q
pt that imports
settings and then calls a manage command manually like that:
from django.core.management.commands import syncdb
syncdb.Command().execute()
If one will try to make a solution, count me in.
--
Best regards,
Alexey.
--
You received this message because you are subscribed to th
https://docs.djangoproject.com/en/1.3/intro/install/
On 11 июн, 15:01, ihsan mokhlisse wrote:
> hi all . i'm so exited to be a member in this wonderful group . i
> wanna start learn Django but the problem is . that i need who can
> guide me to accomplish the task (learning Django) .
> so plz i n
Tomas, try this: https://github.com/jaddison/django-cachebuster
On 9 июн, 11:09, Thomas Guettler wrote:
> Hi,
>
> My static files (JS/CSS) are cached in the browser. But if there is a bug
> in a file, an update won't help people which have already cached the old file.
>
> You would need a new URL
Hi,
check that directory with python binary is added to your system PATH
environment variable.
On 7 июн, 09:59, Dori Rutkevitz wrote:
> Hi all,
>
> I am new to programming in general and recently decided to pick up Django.
> Im reading bits of a book on Python, and im starting to stumble through
Tim, thanks for your help!
Also, I've found another solution for this problem:
http://stackoverflow.com/questions/6241906/display-number-of-instances-for-each-model-in-djangos-admin-index
On 5 июн, 16:50, Tim Shaffer wrote:
> You could probably do it using a signal. Every time a record is created
Hi, I need to display number of objects at main django site admin
page.
For example, in list of models I need to display
Elephants (6)
instead of
Elephants
I added this code to my model:
class Elephant(models.Model):
class Meta:
verbose_name_plural = 'Elephant ' + '(' +
unicod
act that my test code runs inside a method decorated
with @django.db.transaction.commit_on_success?
Alexey
--
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
Thanks, Piotr.
It was a solution with custom tag but implementation with database
requests from template looked not too elegant for me.
I'll look into custom context processors.
On Dec 19, 1:25 pm, Piotr Kilczuk wrote:
> Hi,
>
> I have a block, included into several pages (for example, in all
>
>
Hi,
I have a block, included into several pages (for example, in all
sections of my website you can see top rated articles in the right
column). I can include a template, that prints this list into base
template and avoid any copy-paste here.
But I need to provide it with context variable, that con
mentation It will be really good to know.
>
> thanks
>
Hi!
You can find useful links at Django Documentation project
http://docs.djangoproject.com/en/1.1/
Also you can read Django Book here - http://www.djangobook.com/
--
Alexey Kostyuk
--
You received this message because you are su
#x27;)
>
> will return an unicode string, u"public_html", instead of a normal
> string, 'public_html'.
>
>
> If it works with the byte string, try changing the line to
>
> subdir_path = str(request.GET.get('subdir'))
>
> Nuno
>
> 2010
52AM -0400, Bill Freeman wrote:
> 1. Why is this view code in urls.py?
>
> 2. What is the value of subdir_path in the trace back? (There's a
> little arrow you can click to
> see the variable values fro the frame.)
>
> 2010/4/7 Alexey Vlasov :
> > Hi.
> >
erstand it why "subdir_path" getting the same very value in one case
works perfectly and in the
+other fails.
Django runs following the instuctions
+http://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/#running-django-on-a-shared-hosting-provider-wit
+h-apache
--
BR
rote:
> Hi Alexey,
>
> But how do you set a permission for a view? There's no underlying
> model to which to add the custom meta permissions.
>
> ALJ
>
> On Feb 18, 12:48 pm, Alexey Kostyuk wrote:
> > On Thu, 2010-02-18 at 02:30 -0800, ALJ wrote:
> > > Fir
uired in your views.
See link[1] for details.
[1]http://docs.djangoproject.com/en/dev/topics/auth/#the-permission-required-decorator
--
Alexey Kostyuk
--
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...@googleg
First, the code of my tests.py
def test_get_current(self):
m = Member.objects.create(...)
q = Question.objects.create(name="q1", text="q1",
start_datetime=self.day_before, close_datetime=self.day_after,
type=self.type)
r = Response.objects.create(question=q, text='response')
expect
I guess that video is a dictionary with one element. But dictionary.
Try video[0].id
On Feb 1, 1:06 pm, grimmus wrote:
> When i write out just {{video}} it outputs the id of the object, but
> when i try {{video.id}} or {{video.title}} i get nothing.
>
> On Feb 1, 11:03 am, grimmus wrote:
>
> > I
You should inline Books, not Author.
So:
class BookInline(admin.TabularInline):
model = Book
class AuthorAdmin(admin.ModelAdmin):
...
inlines = [BookInline, ]
and then you'll be able to create books in the same time as creating
authors.
(Books form already has author (foreign key)
Hi!
I'm using dango 0.97 pre (yep, my site still was not upgraded to be
compatible with trunk). I use apache + fastcgi for it. And I have a
strange problem: sometimes (I can't guess the order) some of the views
throw such error:
Tried audio_index in module mysite.audio.views. Error was: 'module'
Hi!
I use django feed framework to organize rss feeds for my website.
I need to put some hyperlinks to feed items, but al of them are
autoescaped ( "<" is replaced with "<" and so on).
Is it possible to keep tags in my feed (as I understand, I can't use
{% autoescape off %} tag in feed templates)?
You can try Dreamhost Private Server. Also they have added root access
for PS not long ago.
On 24 сен, 05:54, "neri...@gmail.com" wrote:
> I think I'm ready to finally switch to a django vps host due to
> problems with django on DreamHost. Can anyone recommend a good vps
> host?
--~--~-~
Hello!
Perhaps, there is no answers to your questions because of some of them
are already discussed here and in other django-related places (like
cache perfomance e t.c.), some of them are closed to holywar :) (like
to use or not to use of the ORM), and some of them like "How about
Django in that
Is it possible to send responce with non-parseable header from django
app?
afaik, my hoster support it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django
Hi, I am using Django + Apache (via FastCGI).
I've made my own 404 page (404.html in templates dir) and turned debug
mode off.
When I'm requesting for non-existed page I see my custom error page,
but in Apache's log there is something like this:
"GET /authors/333.html HTTP/1.1" 200 368 "-" (the re
Hi, I am trying to send mail from my website.
Here is my settings py:
EMAIL_HOST = 'mail.mydomain.ru'
EMAIL_HOST_USER = '[EMAIL PROTECTED]''
EMAIL_HOST_PASSWORD = 'pass'
EMAIL_PORT = 587
(credentials are correct, them work from PHP-script), telnet to smtp
server works fine.
But when I launch my sc
Hi, I have developer (win) & production (debian) installations of
Django 0.97. There is one difference in admin app.
I have a photogallery, and Picture model has this method:
def show_thumb(self) :
return '%s' %
(self.get_image_url(), self.get_image_thumb_url(), self.image)
also
Thanks for quick reply, Malcolm.
Now anything is ok.
On 3 мар, 21:12, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> On Mon, 2008-03-03 at 10:04 -0800, Alexey Moskvin wrote:
> > Hi! I am trying to compile django.po file for Russian language from
> > HEAD django revis
Hi! I am trying to compile django.po file for Russian language from
HEAD django revision using bin/compile-messages.py, but there is such
error:
processing file django.po in locale\locale\ru\LC_MESSAGES
locale\locale\ru\LC_MESSAGES\django.po:1649: a format specification
for argu
ment 'counter' do
Ramadas, I want to run my django website (it is not highload, about
1000 visitors per day) on Dreamhost. I have no problems with running
up Django there, but now I moved all development to local machine
(according to high latency when working with DH using ssh). But I want
to move my app there, wh
The correct directory for your tags is "templatetags", not
"templatetag"
On 13 янв, 19:47, Alessandro <[EMAIL PROTECTED]> wrote:
> I'm trying to create a custom template tag. I've added a feedimport
> app in my project, added it on my installed apps, and inside it I've
> created a templatetag dir
As a first step, let's vote for it on Digg:
http://digg.com/search?s=django+book&submit=Search§ion=all&type=both&area=all&sort=score
:)
On 27 дек, 21:39, walterbyrd <[EMAIL PROTECTED]> wrote:
> A lot of people read slashdot, and slashdot has never done any sort of
> story on Django. There have bee
Looks strange, I have never used "install.py" for WinXP, see this
tutorial: http://thinkhole.org/wp/django-on-windows/.
On 19 дек, 23:55, Trev <[EMAIL PROTECTED]> wrote:
> Hi, This should take 2 seconds for an experience Django user.
> I'm trying to install Django on windows XP. I've installed py
Thanks for your article! I am using Dreamhost too :), thinks, it will
be useful.
On Nov 18, 10:34 pm, Dima Dogadaylo <[EMAIL PROTECTED]> wrote:
> With WebAlchemy only pages involved in form processing are served
> directly by Django, the rest of the pages most of the time are served
> directly by
give him the file only if code he enters is right.
How can I do this with django?
Thanks in advance,
Alexey.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, sen
66 matches
Mail list logo