On Mon, Nov 14, 2011 at 8:47 AM, ydjango wrote:
> I have all my static being served from https://www.example.com/media/
>
> in my code I have all images pointing to /media all over the code.
> for example:
>
> Is there a way I can point it to use S3 and cloudfront to serve
I had a similar requirement for a current project. Users in the admin
needed to be able to see ONLY the objects that they had created.
My solution was:
1) http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
2) Add foreign key to model to track which user created the object.
3) Use the
On Fri, Jan 8, 2010 at 1:25 PM, Biju Varghese wrote:
> if statement in template language checks only whether the variable is
> empty or not...
> comparison can be done with other variants of if such as ifequals
> ifnotequal etc...
>
OP is using django 1.2.
On Fri, Jan 8, 2010 at 10:50 AM, wormser17 wrote:
> mlooby$ sqlite3
> SQLite version 3.6.12
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> sqlite> .schema
> sqlite> .schema;
> unknown command
On Tue, Dec 22, 2009 at 3:24 PM, Bill Freeman wrote:
> If you are calling this from, for example, crontab note that each line
> in crontab is executed in its own subshell, so you have the choice of
> setting PYTHONPATH, or (my personal favorite because it works with so
> many
I'm at a loss as to understand why, but I've worked out what I need to
add to pythonpath.
PYTHONPATH=/home/user
i.e. The pythonpath needs to include NOT the project's root, but the
directory one level ABOVE that for custom commands to work properly...
Thanks for the help guys.
~Justin
--
You
On Tue, Dec 22, 2009 at 3:51 PM, Alex_Gaynor wrote:
>
> Do you have __init__.py files in each of those directories?
Of course - Else it woud not work from the project's root directory either.
~Justin
--
You received this message because you are subscribed to the Google
On Tue, Dec 22, 2009 at 12:16 PM, Doug Blank wrote:
>
> You probably just need to set your PYTHONPATH:
>
> cd /home/user
> PYTHONPATH=proj python proj/manage.py custom
>
That was my initial thought too, however setting the PYTHONPATH does
not affect the behaviour in this
Hi all,
I've written a custom command to use with manage.py, and from the root
of the project directory, it works great.
But the problem is, this command is almost never going to be called
from within the project directory.
(hoping the spacing doesn't get too mangled when I send this)
/home/
On Thu, Dec 17, 2009 at 12:26 PM, nodxof wrote:
> I've just started learning django using "The Definitive Guide to
> django" second edition.
>
> Going by the initial example in Chapter 3 I get this.
>
> Page not found (404)
> Request Method: GET
> Request URL:
On Wed, Dec 16, 2009 at 5:21 AM, Victor Hooi wrote:
> class ExaminationRecord(models.Model):
> assessment = models.OneToOneField(AssessmentTask)
I don't particularly understand the point of this class?
~Justin
--
You received this message because you are
On Wed, Dec 16, 2009 at 5:53 AM, chiranjeevi muttoju
wrote:
> hi as i said that i had installed the mysql in other machine. when i
> installing the python-mysql connector using the command
> python setup.py build
>
At a wild guess, not knowing what you've got installed
Hi,
I've created a custom user model in my application by subclassing
django.contrib.auth.models.User. This user model is working, but there
are a couple of problems I have with it.
1) The change password link in the admin site doesn't work?
2) The default password box on the add/edit page for
13 matches
Mail list logo