the environment is apache+django, accessing my app is ok,but i
can't access the admin interface.
the configuration of the httpd.conf is likes this below:
Listen 127.0.0.1:
SetHandler python-program
PythonPath "sys.path+['c:/']"
PythonHandler
Jim's right, but I'd also suggest redoing your CurrentRanking model so
it has just one foreign key, to SchoolSeason (since that in turn has
fk's to the School model):
class League(models.Model):
league_name = models.CharField(max_length=100)
class School(models.Model):
school_name =
What you might be asking for is the following syntax, that allows you
to perform queries against the data in more than one table:
CurrentRanking.objects.filter
(school__schoolseason__league__league_name="League Name").order_by('-
rating')
Those are double underscores between the model names and
Oops. I should have said my current view returns a list of rankings
(school_name, rating) rather than all schools.
On Sep 25, 7:59 pm, jeffself wrote:
> I've got the following models:
>
> class League(models.Model):
> league_name = models.CharField(max_length=100)
>
>
I've got the following models:
class League(models.Model):
league_name = models.CharField(max_length=100)
class School(models.Model):
school_name = models.CharField(max_length=100)
class SchoolSeason(models.Model):
season = models.IntegerField()
school =
On Fri, Sep 25, 2009 at 2:59 PM, Aaron wrote:
>
> I have a Django 1.1 project under Windows, and I am using an app that
> uses JavaScript (specifically, Page CMS). The JavaScript is in the js
> folder of the media folder, and I've set MEDIA_ROOT in my settings to
> the full
On Fri, Sep 25, 2009 at 11:34 AM, DavidA wrote:
>
> Thanks, Karen. You were right - I had overridden it. If I delete the
> __unicode__ method it works now. What's odd is that I can't seem to
> catch any exception. If I try the code below, the admin still breaks.
> And
El Fri, 25 Sep 2009 15:30:02 -0700 (PDT)
Ronen Gal escribió:
> I would like to build a website which sells videos (music lessons).
> The site would include ~50 videos, 150MB each.
> I need some kind of shopping cart, and the ability to recieve payment.
> I also need user
Hi,
I would like to build a website which sells videos (music lessons).
The site would include ~50 videos, 150MB each.
I need some kind of shopping cart, and the ability to recieve payment.
I also need user accounts, so I can learn my users flavour and offer
them appropriate videos.
I need some
Django Users,
I'm pretty new to django so please excuse my ignorance.
I'd like to redirect users to an "enter" page no matter where they
entered the site. The enter page would have the user read/check a
disclaimer type of box and then return to the page they were originally
going to.
Any
2009/9/24 Brian McKeever
>
> I would write a custom tag that wraps ugettext but checks for None.
>
> http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#writing-custom-template-filters
> http://docs.djangoproject.com/en/dev/topics/i18n/#standard-translation
>
> On
Is there an easy way to override strings like help_text or
verbose_name or __unicode__ methods for models in contrib or third-
party apps? I can't seem to find anything on Google.
Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed
You were exactly right, it was a sloppy mistake. Thanks for looking
at this. Time to move on to the next error I just got.
On Sep 25, 3:40 pm, Brian McKeever wrote:
> I'd guess that you didn't set AWS_SECRET_ACCESS_KEY correctly in your
> settings.
>
>
Dziękują!
(Thanks!)
--~--~-~--~~~---~--~~
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
I'd guess that you didn't set AWS_SECRET_ACCESS_KEY correctly in your
settings.
http://code.welldev.org/django-storages/wiki/S3Storage
On Sep 25, 2:12 pm, Nick wrote:
> something like this?
>
> Environment:
>
> Request Method: POST
> Request
something like this?
Environment:
Request Method: POST
Request URL: http://localhost:8000/admin/StoryWall/statefair/16/
Django Version: 1.2 pre-alpha SVN-11434
Python Version: 2.5.4
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
A stack trace would be more useful.
On Sep 25, 12:07 pm, Nick wrote:
> I'm using the django-storages backends from David Larlet to upload
> images to s3 from inside the admin. When i try to run everything I
> get an error:
>
> object of type 'NoneType' has no len()
>
> Here
On Sep 25, 9:59 am, dijxtra wrote:
> Hi everybody,
>
> Django applications, as I understood them should be pluginable on
> project basis. That is, I should be able to install them to my
> *project*, not to my django installation. So I downloaded django-
> tagging and run the
Thanks, that was it. Bit of a simple one I probably should have
spotted.
Andrew
On 25 Sep, 19:42, Tim Chase wrote:
> > Can somebody tell me why i get a syntax error with this named URL
> > pattern?
>
> > urlpatterns = patterns('',
> > url(r'^feed/(?P.*)/$',
I have a Django 1.1 project under Windows, and I am using an app that
uses JavaScript (specifically, Page CMS). The JavaScript is in the js
folder of the media folder, and I've set MEDIA_ROOT in my settings to
the full path to the media folder (with backslashes replaced by
forward slashes).
> Can somebody tell me why i get a syntax error with this named URL
> pattern?
>
> urlpatterns = patterns('',
> url(r'^feed/(?P.*)/$',
> 'django.contrib.syndication.views.feed',
> {'feed_dict': feeds}
looks like a missing comma here...
> name="feed"),
> )
-tim
On 24 sep, 15:36, Ali Rıza KELEŞ wrote:
> But i just defined document.domain in my tinymce initializer, nowhere
> else.. Is there anywhere else should I define it?
Yes, because *all* Javascript code that needs to work together must
have the same document.domain value.
On Sep 25, 7:54 pm, Javier Guerra wrote:
> On Fri, Sep 25, 2009 at 11:59 AM, dijxtra wrote:
>
> > Hi everybody,
>
> > Django applications, as I understood them should be pluginable on
> > project basis. That is, I should be able to install them to my
> >
I'm using the django-storages backends from David Larlet to upload
images to s3 from inside the admin. When i try to run everything I
get an error:
object of type 'NoneType' has no len()
Here is my model:
from django.db import models
from django.core.files.storage import default_storage as
Can somebody tell me why i get a syntax error with this named URL
pattern?
urlpatterns = patterns('',
url(r'^feed/(?P.*)/$',
'django.contrib.syndication.views.feed',
{'feed_dict': feeds}
name="feed"),
)
This is the traceback:
Traceback:
File
On Fri, Sep 25, 2009 at 11:59 AM, dijxtra wrote:
>
> Hi everybody,
>
> Django applications, as I understood them should be pluginable on
> project basis. That is, I should be able to install them to my
> *project*, not to my django installation.
'portable' means 'use from any
I'm not familiar with the plugin, but I would guess that it's trying
to add itself to the python path. That way it's easily available for
any django project without having to include it in an individual
project.
I would bet that it'd work just fine included manually in your project
without
Oh, it's just a preference. I don't like calculating stuff in the
template. It violates the MVT pattern to some minor degree.
On Sep 25, 6:41 am, Bryan wrote:
> I can't think of a reason, if nothing else its a matter or taste/
> preference. He said "I would probably...",
.count uses a sql function that just counts the rows.
Doing len(model.objects.all()) pulls ALL of the objects from the
database including all of the associated data and then counts them.
It should be a significant performance difference for any large data
set.
On Sep 24, 11:12 am, Chris
Hi everybody,
Django applications, as I understood them should be pluginable on
project basis. That is, I should be able to install them to my
*project*, not to my django installation. So I downloaded django-
tagging and run the python setup.py install. And it failed:
Thanks, Karen. You were right - I had overridden it. If I delete the
__unicode__ method it works now. What's odd is that I can't seem to
catch any exception. If I try the code below, the admin still breaks.
And what's also odd is that I never see my models.py file in the stack
trace.
def
Here it goes:
I wanted a clean url structure so i tried to abstract as much as i
could in one url pattern. it looks something like this:
url(r'^approved/((?P[a-zA-Z ,-]+)?)(/?)((?P[0-9]+)?)
(/?)
$', get_approved_images, name='approved_images')
this in theory should allow the return of
1) all
Hi folks,
My team has recently begun following a product development approach
modeled heavily on Customer Development and Lean Startup concepts. In
particular, we are now using a/b split-test experiments to measure the
impact of all visible changes on our users.
When we started out, we found
On Fri, Sep 25, 2009 at 9:05 AM, DavidA wrote:
>
> I'm getting this error when I try to remove an inline model instance
> in the Django admin:
>
>Traceback:
>File "C:\Python25\lib\site-packages\django\core\handlers\base.py"
> in get_response
> 92.
I'm getting this error when I try to remove an inline model instance
in the Django admin:
Traceback:
File "C:\Python25\lib\site-packages\django\core\handlers\base.py"
in get_response
92. response = callback(request, *callback_args,
**callback_kwargs)
File
I can't think of a reason, if nothing else its a matter or taste/
preference. He said "I would probably...", so he may have been
implying that there was a technical reason but most likely he was just
stating his preference.
On Sep 25, 5:03 am, Chris Withers wrote:
>
please add to the documentation:every site has to have the same SECRET_KEY,
too when you want to get session vars from a different host, as
the cookie-data is encoded by this key.
-- Hinnack
--~--~-~--~~~---~--~~
You received this message because you are
Don't know if this is the solution for you, but you could take a look
here: http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#id1
and do something like this:
class Product(models.Model):
name = models.CharField(max_length=64)
class Meta:
Not much you can do apart from track IP addresses and enable recaptcha
for it for a certain period of time. The client can manipulate
everything else they send to you.
Sure you'll end up annoying some innocent people, but because you're
only enabling it for a limited period of time, it shouldn't
Thanks a lot Nabil servais. its works for me too
On Fri, Sep 25, 2009 at 2:06 PM, Nabil Servais wrote:
>
> Hello,
>
> I use json for output instead of cvs, and it works. Also I convert the
> lattitude and longitude into float.
>
> enjoy
>
> def
Hello,
I use json for output instead of cvs, and it works. Also I convert the
lattitude and longitude into float.
enjoy
def get_lat_long(location):
key = settings.GOOGLE_API_KEY
output = "json"
location = urllib.quote_plus(location)
request =
Hi all,
I use this code to show a recaptcha after several incorrect logins.
The essence of the work is this:
It creates the session to count the number of invalid logins and after
3 times wrong authentication emergence recaptcha. But you can simply
delete the session and thus bypass a
Hello,
I solve your probleme in changing the output format into json, then I
convert the coordinates into Float.
def get_lat_long(location):
key = ''
output = "json"
location = urllib.quote_plus(location)
request = "http://maps.google.com/maps/geo?q=%s=%s; %
Jani Tiainen wrote:
> Chris Withers kirjoitti:
>> Brian McKeever wrote:
>>> .count is definitely the way to go. Although, I would probably pass it
>>> to your template instead of determining it there.
>> What difference does it make?
>
> len(qs) evaluates queryset - thus pulling in _every_
On Sep 25, 9:08 am, Jani Tiainen wrote:
> Chris Withers kirjoitti:
>
> > Brian McKeever wrote:
> >> .count is definitely the way to go. Although, I would probably pass it
> >> to your template instead of determining it there.
>
> > What difference does it make?
>
> len(qs)
Hi
I need to assign one form field dynamically inside django admin when
user change value in select box
class One(models.Model):
name = models.CharField(max_length=200)
code = models.CharField(max_length=100)
class Two(models.Model):
two_name = models.CharField(max_length=200)
On Sep 25, 3:30 am, luciferleo wrote:
> Hi, I am using Django 1.0
> Suppose I have two models in one file:
>
> class BaseModel(models.Model):
> # attrs
> creator = models.ForeignKey('User', related_name='%(class)
> s_creator_set')
>
> class User(BaseModel):
> #
Wiadomość napisana w dniu 2009-09-25, o godz. 10:16, przez mike:
>
> Hi. Im migrating from an old PHP piece of junk to Django (hooray) and
> this client is very insistent on maintaining all of his old PHP-based
> URLs, which will be 301 redirected so as to not lose SEO. As there
> are 1000s of
Hi. Im migrating from an old PHP piece of junk to Django (hooray) and
this client is very insistent on maintaining all of his old PHP-based
URLs, which will be 301 redirected so as to not lose SEO. As there
are 1000s of these links, mod_rewrite might not be the best solution,
especially since
Chris Withers kirjoitti:
> Brian McKeever wrote:
>> .count is definitely the way to go. Although, I would probably pass it
>> to your template instead of determining it there.
>
> What difference does it make?
len(qs) evaluates queryset - thus pulling in _every_ object from DB to
Python -
I feel happy that it can you:)
On Sep 25, 2:47 am, dimitri pater - serpia
wrote:
> 2009/9/24 玉东 :
>
>
>
> > Hi, guys,
>
> > I've made afirefoxsearch plugin for django documents. It can save your
> > time if you often search the official django
Hi all,
I have a problem to convert latitude and longitude values into point
field value.
def get_lat_long(location):
key = settings.GOOGLE_API_KEY
output = "csv"
location = urllib.quote_plus(location)
request = "http://maps.google.com/maps/geo?q=%s=%s=%s;
I needed a simple way to append new records from many Oracle dbs to
one Mysql db, and came up with this solution. As part of the mantra
"Release Early, Release Often" I'm putting it into a separate app,
making it more generic and releasing it on google code.
Code is at:
hi,
I do have only set SESSION_COOKIE_DOMAIN = '.dev.miadi.net' in both
sites
and now I am expecting to be able to set a value under
host1.dev.miadi.net and to read it under host2.dev.miadi.net - but
this does not work.
the browser does send the cookie he got from host1 to host2, but the
site
54 matches
Mail list logo