Hi, I had a somewhat similar question. I've followed the setup and
when the dashboard, etc, are uncommented in installedapps, i merely
get a stripped down version of the admin page without the default
styling. Mine is a local development server. The command prompt is
posting this:
[TIMESTAMP] "GET
nevermind my last mail, solved.
Helpful link:
http://docs.djangoproject.com/en/1.1/howto/static-files/#howto-static-files
On Jun 1, 8:46 am, izi wrote:
> Hi,
>
> As I said in my previous mail, you should bring this to the django-
> admin-tools mailing list:http://groups.google.com/group/django-
HI,
I've got a session object which is a dict. I'm using it to track the
state of screen elements (an expanding tree).
request.session['mystate'] = {'1':'true', '2','false'}
In my template I'm looping through the branches:
object.id is 1
object.id is 2
So:
I want to test:
request.session['m
Thanks for that link up there, David, solved my (similar, but not
really similar) problem.
Although this has me concerned about deployment issues...
-gnarmis
On Jun 1, 8:46 am, izi wrote:
> Hi,
>
> As I said in my previous mail, you should bring this to the django-
> admin-tools mailing list:http
On Jul 27, 2:49 pm, Dennis Kaarsemaker wrote:
> Are the tracebacks all the same? Can you share a traceback?
Sure, here's one (search/replaced to make it generic):
http://dpaste.com/222645/
It's happening on various (and unrelated) pages, but the tracebacks
are all equally uninformative.
Thanks
On Jul 28, 6:24 am, iJames wrote:
> HI,
>
> I've got a session object which is a dict. I'm using it to track the
> state of screen elements (an expanding tree).
>
> request.session['mystate'] = {'1':'true', '2','false'}
>
> In my template I'm looping through the branches:
>
> object.id is 1
> obj
If it is a CSRF issue, then perhaps using this setting will help you
get to the bottom of what's going on:
http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#rejected-requests
As it says there, a 403 may be due to a lack of the {% csrf_token %}
in the form that is being posted.
Steven.
--
Yo
Hi,
i have cache enabled on a few heavy statistical views.
I would like to generate the pages before a user goes to that page and maybe
even
regenerate the pages every hour to avoid the initial delay.
However, i can't seem to automate the caching as my site's authentication gets
in the way
of a
On 28/07/10 03:45, Kieran Farr wrote:
> Finally figured out what's going on.
>
> My hypothesis:
> An HTTP request with POST method sent to a Django view wrapped with
> @csrf_exempt will still raise a 403 CSRF error if the wrapped view
> raises an Http404 exception.
>
Ah, but was your handler404
I have checked mysql database, maybe have no issue, but still show the same
error.detail as below:
mysql> SHOW VARIABLES LIKE 'character%';
+--+
-+
| Variable_name| Value
|
+--+
It's probably best to do this in a custom Manager.
This code is based on this answer: http://markmail.org/message/kwwuskco4gilej2w
You get the idea
class GetPrevNextManager(models.Manager):
def get_next_by_id(self, object):
qs = self.filter(id__gt=object.id)
if qs.count() > 0:
On Wed, Jul 28, 2010 at 1:48 AM, jerry wrote:
> Hi:
> I build a website and want to login the admin form by python code. I
> have disabled the CSRF in my project and use urllib2 to post data.
> here are my codes:
>
> --
I have a model Favourite with fields User, Project, Date, what means
that some user put some project as favourite on some date. I take all
favourites filtered by this user and I want to INNER JOIN that info
with Project model. How can I do that?
Something like projects = Favourite.objects.filter(u
On Wed, Jul 28, 2010 at 3:18 AM, shacker wrote:
> On Jul 27, 2:49 pm, Dennis Kaarsemaker wrote:
> > Are the tracebacks all the same? Can you share a traceback?
>
> Sure, here's one (search/replaced to make it generic):
>
> http://dpaste.com/222645/
>
> It's happening on various (and unrelated) p
I'm sure this is simple... but, how do I change the header text that
appears at the top of every change list?
i.e. instead of "Select XXX to change", I'd like to have "List of
XXX's" (where XXX's is the plural form of the object name)
Is this in an admin template and, if so, which one?
Thanks
D
It would help if you submitted your models
- Sævar
On Jul 28, 2:29 pm, kostia wrote:
> I have a model Favourite with fields User, Project, Date, what means
> that some user put some project as favourite on some date. I take all
> favourites filtered by this user and I want to INNER JOIN that info
On 28/07/2010 3:54, Kieran Farr wrote:
> Further research shows that CSRF is enabled regardless of my
> settings.py if we use Django's built-in auth.
>
> Obviously, we need to still use Django's auth, so we can't just
> disable CSRF site-wide like this hack:
> http://stackoverflow.com/questions/16
On 27/07/2010 17:48, jerry wrote:
> Hi:
> I build a website and want to login the admin form by python code. I
> have disabled the CSRF in my project and use urllib2 to post data.
> here are my codes:
> -
Hi,
I have pretty big django app running on django 1.0.2 and I want to
move it to django 1.2.1 since I want to use multiple databases.
What are the minimal changes that I need to make in order to work with
1.2.1?
I mean, what should I do regarding csrf and so on...
Is there a good place to read ot
import datetime
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User
class Project(models.Model):
author = models.ForeignKey(User, verbose_name=_('Author'),
related_name='projects')
title = models.CharFiel
Hi! I'm using the Django GEOS API [1] in my project to see the distance
between two users.
I get the coordinates from google maps in latitude/longitude mode and I need
to calculate the distance between them. I'm testing with .distance() method
at GEOSGeometry but I receive a strange value.
This i
On Jul 28, 3:13 pm, knight wrote:
> What are the minimal changes that I need to make in order to work with
> 1.2.1?
Did you have a look at
http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges
?
--
You received this message because you are subscribed to the Google Groups
"Django use
On Wed, Jul 28, 2010 at 3:29 PM, Massimiliano Ravelli
wrote:
> On Jul 28, 3:13 pm, knight wrote:
>> What are the minimal changes that I need to make in order to work with
>> 1.2.1?
>
> Did you have a look at
> http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges
> ?
This link in wort
On Jul 26, 6:52 pm, "Casey S. Greene" wrote:
> Does anyone have a hint for this (or an idea of where to get started in
> the documentation)? This seems relatively simple so my best guess is
> that there is something that I am just missing.
>
> Thanks!
> -- Casey
>
> On 07/22/2010 10:16 AM, Casey
On Jul 26, 6:52 pm, "Casey S. Greene" wrote:
> Does anyone have a hint for this (or an idea of where to get started in
> the documentation)? This seems relatively simple so my best guess is
> that there is something that I am just missing.
>
> Thanks!
> -- Casey
>
> On 07/22/2010 10:16 AM, Casey
Is anybody knows a good post or blog about these thing including csrf
changes?
On Jul 28, 4:33 pm, Maksymus007 wrote:
> On Wed, Jul 28, 2010 at 3:29 PM, Massimiliano Ravelli
>
> wrote:
> > On Jul 28, 3:13 pm, knight wrote:
> >> What are the minimal changes that I need to make in order to work w
Does anybody knows a good post or blog about the changes including
csrf?
On Jul 28, 4:33 pm, Maksymus007 wrote:
> On Wed, Jul 28, 2010 at 3:29 PM, Massimiliano Ravelli
>
> wrote:
> > On Jul 28, 3:13 pm, knight wrote:
> >> What are the minimal changes that I need to make in order to work with
>
@etone: has this discussion of CSRF enabled you to hunt down your
problem?
Steven.
On Jul 26, 4:30 pm, etone wrote:
> Hi there,
>
> I'm trying to sent a HTTP POST from a client application to my Django
> app. Django does indeed receive the HTTP POST as I do hit
> _HandleRequest(), however it r
On 28 Lug, 15:33, Maksymus007 wrote:
> The same all the sentences link '1.1 and 1.2 are compatible'.
> They are not.
You are right: that page doesn't mention csrf changes.
I upgraded few installations from 1.0 and from 1.1 to 1.2
and the only undocumented change I remember is exactly the csrf.
I
On 28 Lug, 15:44, knight wrote:
> Does anybody knows a good post or blog about the changes including
> csrf?
I forgot to suggest reading
http://docs.djangoproject.com/en/dev/releases/1.2/#backwards-incompatible-changes-in-1-2
--
You received this message because you are subscribed to the Google
Hi Artem,
I don't know about it specifically but I have one possible solution.
That may not be what you want and I'd like to hear critique on it:
Have a model with fields id (or url or slug), status and filename (and
more if you wish).
This could be filled with: id=42, status=no_downloads_yet,
fi
Still need your help
--
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...@googlegroups.com.
For more options,
Dear Kostia
On Jul 28, 2010, at 2:29 PM, kostia wrote:
I have a model Favourite with fields User, Project, Date, what means
that some user put some project as favourite on some date. I take all
favourites filtered by this user and I want to INNER JOIN that info
with Project model. How can I do t
>
>fav_and_projs = ((f, f.project) for f in favourites)
>
This may not be a Django question. But, I'm not familiar with this syntax.
Is this returning a tuple for ever item in favourites? So, fav_and_projs
would be a tuple of tuples, like ((f1, f.project1), (f2, fproject2),
.(fn, fproje
Thank you very much Roald,
What is faster:
projects = Project.objects.filter(favourites__user = request.user)
or
select_related('project')
?
Kostia
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
On Jul 28, 4:16 pm, backdoc wrote:
>
>
>
>
> > fav_and_projs = ((f, f.project) for f in favourites)
>
> This may not be a Django question. But, I'm not familiar with this syntax.
> Is this returning a tuple for ever item in favourites? So, fav_and_projs
> would be a tuple of tuples, like ((f1
On Jul 28, 2010, at 5:19 PM, kostia wrote:
Thank you very much Roald,
What is faster:
projects = Project.objects.filter(favourites__user = request.user)
or
select_related('project')
?
I think it doesn't matter much, but if one is faster, it should be the
first one. If you only use the
One issue that bit me that has also been mentioned here in other
threads: errors that were previously caught are now raised as errors.
So technically it was wrong previously but functionally it only breaks
on 1.2. I haven't found a good explanation / summary of what/why/
which errors it now affect
On 27 July 2010 17:51, Wadim wrote:
> Hello.
> I have a list that i want to present in a table.
> Each row should have 5 items.
> For now i create the function that returns me new grouped list, that i
> use later in a template.
> def groupListByRow(list):
> cnt=0
> rows=[]
> w
Well, I used
projects = projects.filter(favourites__user = request.user)
And then I tired to order by 'date' field, which is in the Favourite
model like here:
projects = projects.filter(favourites__user =
request.user)#.order_by(filter_field)
And it throws me an error: "Cannot resolve keyword '
Hi,
we've been trying for hours now to include a css-file in our project,
but it just doesn't work and we don't know why. We've already reduced
the project to the absolute minimum of necessary code:
#settings.py:
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__)
Hello,
I am trying to configure my django project to use sqlite3. As of now I
do not have database creation permission for SQL, so i decided to try
and do my prototyping locally. I set the following:
DATABASES = {
'default' : {
'NAME' : 'C:/python-dev/pythonprojec
Did you run ./manage.py syncdb?
--
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...@googlegroups.com.
For mor
Thanks, David -- you're right on, now I just return an HttpResponse
with result code 404.
Benedict, could you post the view for /management/statistics/top/user/
yearly/ that is causing the 403?
Kieran
On Jul 28, 6:47 am, steven314 wrote:
> @etone: has this discussion of CSRF enabled you to hunt
I use in settings.py:
MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'main',
'templates', 'static').replace('\\', '/')
MEDIA_URL = '/static/'
And then simply in an html file:
Where the full folder path is the ../project_name/main/templates/
static/styles/nav.css
--
You received this
Those settings are not all. You need to check the table definition with
either describe or show create table.
On wo, 2010-07-28 at 19:40 +0800, pengbo xue wrote:
> I have checked mysql database, maybe have no issue, but still show the
> same error.detail as below:
>
> mysql> SHOW VARIABLES LIKE
On wo, 2010-07-28 at 00:18 -0700, shacker wrote:
> On Jul 27, 2:49 pm, Dennis Kaarsemaker wrote:
> > Are the tracebacks all the same? Can you share a traceback?
>
> Sure, here's one (search/replaced to make it generic):
>
> http://dpaste.com/222645/
>
> It's happening on various (and unrelated)
the css should be {% MEDIA_URL %} but you have to be sure you pass the
RequestConext on your render_to_response method.
If you're are on the development server you have to add additional
urls to urls.py to serve static content.
Is explained in the docs, but I suppose some examples you'll be
better
I had not, i ran it and created a superuser. should I be changing my
setting file for my user info?
I also changed DATABASE_ROUTERS = [] because it was previously set to
['test.ReportAdmin.routers.ReportAdminRouter']
and I went back to
DATABASES = {
'default' : {
> i have cache enabled on a few heavy statistical views.
> I would like to generate the pages before a user goes to that page and maybe
> even
> regenerate the pages every hour to avoid the initial delay.
> However, i can't seem to automate the caching as my site's authentication
> gets in the wa
Having done my geo distance by "hand" instead of Django GEOS, it may not
be relevant, but have you tried multiplying the result you get by the radius of
the earth? Most formulas for this kind of thing are applicable to any
size sphere,
not just the earth, and return the distance as an angle, as se
Hi guys,
I manage a Brazilian free ads portal and recently I migrated the
static files to rackspace cloud files [1] (Amazon S3 like). Now the
site open much faster but the media files are still in the same server
of django.
I couldn't migrate the dynamic media files to rackspace cloud files
becau
I've tested it yet multiplying in miles and kilometers but the result if K
miles/kms instead the correct result.
Thanks for your reply.
On Wed, Jul 28, 2010 at 19:00, Bill Freeman wrote:
> Having done my geo distance by "hand" instead of Django GEOS, it may not
> be relevant, but have you tried
(lat , lon in radians)
pt 1 = lat, lon, alt=0
pt 2 = lat, lon, alt=0
p1_gcc = gd2gcc(p1)
p1_gcc = gd2gcc(p2)
gd2gcc ( is a standard operation found on the itnernet)
dis = sqrt(sum(pow(p1_gcc-p2-gcc, 2)))
cheers,
2010/7/28 Alexandre González :
> Hi! I'm using the Django GEOS API [1] in my proj
Hello Kostia,
I get a template syntax error with your method, since I haven't
defined a "static" view. How does your static-view look like?
I've already tried it like described here --> but I don't get it
work either, I get a TypeError: bad operand type for unary +: 'list'
for the urlpattern that
I have the python-mysqldb installed already and i have django up and
running. when i installed the python-mysqldb i had to hack the code kind of
so that it didnt check if the versions were the same so that it would work.
I got this idea from online. but anyways, I am wondering how to access
recor
2010/7/28 Andreas Pfrengle :
> Hello Kostia,
>
> I get a template syntax error with your method, since I haven't
> defined a "static" view. How does your static-view look like?
> I've already tried it like described here --> docs.djangoproject.com/en/dev/howto/static-files/> but I don't get it
> w
For example:
class ArticleForm(ModelForm):
class Meta:
model = Article
widgets = {
'pub_date': SplitSelectDateTimeWidget(),
'expire_date': CalendarWidget(attrs={'class':'date-
pick'})
}
And in a view function:
...
ArticleFormSet = modelfo
On Jul 28, 4:21 pm, Andreas Pfrengle wrote:
> Hi,
>
> we've been trying for hours now to include a css-file in our project,
> but it just doesn't work and we don't know why. We've already reduced
> the project to the absolute minimum of necessary code:
>
> #settings.py
On Jul 28, 7:08 pm, Jason wrote:
> For example:
>
> class ArticleForm(ModelForm):
> class Meta:
> model = Article
> widgets = {
> 'pub_date': SplitSelectDateTimeWidget(),
> 'expire_date': CalendarWidget(attrs={'class':'date-
> pick'})
> }
>
> A
static is a folder, it is not a view
our project code can be found here
http://github.com/vaxXxa/projector
You may look at and compare.
Good luck.
--
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.
Our startup http://github.com/vaxXxa/projector has to be hosted
somewhere.
I'm looking for someone who can help.
Be happy,
Kostia.
--
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.
Hallo everyone,
thanks for the many answers, the problem is solved. There must have
been an error in the urls.py. Now it works with the static serving:
# from urls.py:
site_media = os.path.join(os.path.dirname(__file__), 'site_media')
urlpatterns += patterns('',
url(r'^site_media/(?P.*)$', 'djang
On Jul 28, 2010, at 6:02 PM, kostia wrote:
Well, I used
projects = projects.filter(favourites__user = request.user)
And then I tired to order by 'date' field, which is in the Favourite
model like here:
projects = projects.filter(favourites__user =
request.user)#.order_by(filter_field)
And it
Traceback:
File "C:\Python25\lib\site-packages\django\core\handlers\base.py" in
get_response
100. response = callback(request,
*callback_args, **callback_kwargs)
File "C:\Documents and Settings\goodrich\PycharmProjects\CCC\Aggregator
\newsmail\views.py" in manage_articles
17
On Jul 27, 12:51 pm, Wadim wrote:
> Hello.
> I have a list that i want to present in a table.
> Each row should have 5 items.
> For now i create the function that returns me new grouped list, that i
> use later in a template.
> def groupListByRow(list):
> cnt=0
> rows=[]
>
Hello list,
I was wondering which would be the best way to handle this situation
with ModelChoiceFields:
I have a form with a ModelChoiceField, the options presented in this
field may change at the view depending on the user, however,
ModelChoiceField requires the queryset to be given as a parame
Well, I think I've got a culprit on this one. I was seeing occasional
"/tmp is out of space" messages from the server lately as well, and
wondered whether these two things might be connected. It's a VPS and
the /tmp partition is locked at 100MBs - can't be made larger. So I
reconfigured mysql to us
This question has been in the forum for about almost a week & no
response. So please help a newbie out: is it too easy or too difficult
to answer?
On Jul 24, 7:29 pm, BobAalsma wrote:
> I'm working on a programme where I want the user to register comments
> on a third party web page.
> To show th
This question has been in the forum for about almost a week & no
response. So please help a newbie out: is it too easy or too difficult
to answer?
On Jul 24, 7:29 pm, BobAalsma wrote:
> I'm working on a programme where I want the user to register comments
> on a third party web page.
> To show th
This question has been in the forum for about almost a week & no
response. So please help a newbie out: is it too easy or too difficult
to answer?
On Jul 24, 7:29 pm, BobAalsma wrote:
> I'm working on a programme where I want the user to register comments
> on a third party web page.
> To show th
This question has been in the forum for about almost a week & no
response. So please help a newbie out: is it too easy or too difficult
to answer?
On Jul 24, 7:29 pm, BobAalsma wrote:
> I'm working on a programme where I want the user to register comments
> on a third party web page.
> To show th
Well, that's what I intended to do - a least I would know a file is
started to download.
Problem is - way of file transfer. I got something like:
response = HttpResponse(open('/way/to/file/test.rar'),
mimetype='application/x-rar-compressed')
response['Content-Disposition'] = 'attachment;
f
Have you already looked through this list? http://djangofriendly.com/hosts/
-- Horst
On Wed, Jul 28, 2010 at 9:41 PM, kostia wrote:
> Our startup http://github.com/vaxXxa/projector has to be hosted
> somewhere.
>
> I'm looking for someone who can help.
>
> Be happy,
>
> Kostia.
>
> --
> You rece
I'm using the auth module for my project and I've got a registration
form that's based on the "UserCreationForm" provided by
"django.contrib.auth.forms" but it's only showing the username and
password fields.
I want a registration process that requires users to fill out ALL of
the "User" fields pl
This question has been in the forum for about almost a week & no
response. So please help a newbie out: is it too easy or too difficult
to answer?
On Jul 24, 7:29 pm, BobAalsma wrote:
> I'm working on a programme where I want the user to register comments
> on a third party web page.
> To show th
Hello, your question probably does not have much to do with Django (as
a framework), but you may be able to check at the iframe url by
quering the DOM using javascript, either directly or via a library
like jquery if you are already using one.
Check the W3C documentation for the frame/iframe DOM:
For the UserProfle model you've provided you won't be able to user
the UserCreationForm as there are a load of extra fields. Moreover
because User is a foreign key from that model it isn't a straight-
forward matter of using a model form. To get a single model form to
split the work to two underly
I believe ModelChoiceField is meant to be used with ModelForm. I'd
stick to one or the other. Either use ModelForm and let it do the
work, or use Form and do the work yourself rather than trying to get
ModelChoiceField to work.
Euan
On 29 July, 05:23, Carlos Daniel Ruvalcaba Valenzuela
wrote:
>
79 matches
Mail list logo