Do you have CSRF protection enabled?
https://docs.djangoproject.com/en/dev/ref/contrib/csrf/
It will 403 POST requests unless they have the right token.
Jim
On Sun, Mar 25, 2012 at 11:24 PM, drk wrote:
> Hi, so I have a application that works offline (with localStorage),
> and now I'm trying t
Hello,
in my App I would like some Models to accept some custom Meta options like this:
class MyModel(models.Model)
name = models.CharField(...)
other = models.CharField(...)
more = models.CharField(...)
class Meta:
db_table = "my_table"
custom_option = True
It would be quite
On 25 March 2012 11:56, Homer wrote:
> I tried to create an index webpage but Django told me I had a template
> error:
>
> Invalid block tag: 'endblock', expected 'empty' or 'endfor'
>
> Here is the code of index.html:
>
> {% extends "base.html" %}
>
> {% block title %}Home{% endblock %}
> {% bloc
On 25 March 2012 11:56, Homer wrote:
> I tried to create an index webpage but Django told me I had a template
> error:
>
> Invalid block tag: 'endblock', expected 'empty' or 'endfor'
>
> Here is the code of index.html:
>
> {% extends "base.html" %}
>
> {% block title %}Home{% endblock %}
> {% bloc
Ok. Let me send you a gist about how I achieved mine to give you an idea.
On Sat, Mar 24, 2012 at 4:46 PM, jbr3 wrote:
> Babatunde,
>
> Yes, that's basically the same idea. The questions would all be on the
> same page, however, and I wouldn't incorporate the time limit. But,
> that's mostly wha
jbr3,
https://gist.github.com/2204408
The code is most likely buggy and might be insecure because I'm not really
sure if hackers can use radio buttons to submit malicious stuff.
The idea is using the model structure Shawn gave. I created a custom form
class which extracts some Question instances. S
Hi,
I have searched high and low to an answer to this, but have been
unable too turn anything up. Apologies if I have overlooked an answer
or explanation elsewhere.
I have set up a very simple model as follows:
---
from djang
In the example given in doc of tweepy, the process_status is a user
defined method. You have to define this method.
Its just a reference given. Define a method process_status and do
whatever you want to do with status.
On Mar 26, 3:57 am, coded kid wrote:
> Hi guys, I been trying to iterate ove
On 23-03-12 22:01, darwin_tech wrote:
Yes, that is true. I set the virtualenv with --no-site-packages as I
want a reproducible environment for my Django project. This should not
mean that I cannot install matplotlib within the virtualenv though, surely?
You can install matplotlib just fine in
On 26-03-12 02:21, Jojo wrote:
Hi guys, I'm new in Django (I started with the 1.3 and now I'm playing
with the 1.4) and I'd like to understand better the phylosophy behind
the concepts of sites and applications.
Ok a site can contain multiple applications and an application can live
in many sites
Hi all,
I'm wanting the same code to run many fairly simple, near-identical
websites. That's the bottom line.
I've had a look through the group archives and found a couple of
hints.
My planned application serves small grocery businesses taking orders
and making weekly home deliveries for their c
On 25-03-12 08:04, Micky Hulse wrote:
Hello,
This is is probably a silly question, but...
I just installed a fresh copy ofDjango 1.4 (mod_wsgi 3.3/Python 2.7)
on my WebFaction server.
In 1.3, the command startproject (IIRC) generated a myproject.wsgi
that lived next to myporject folder
On Mar 26, 12:26 pm, Roman Klesel wrote:
> Hello,
>
> in my App I would like some Models to accept some custom Meta options like
> this:
>
> class MyModel(models.Model)
>
> name = models.CharField(...)
> other = models.CharField(...)
> more = models.CharField(...)
>
> class Meta:
>
>
I've just created a model in Django and want to use the admin form to
enter information for it. The problem I'm having is that my field
names are so long that they overlap the edit boxes where their values
are to be entered.
If one follows the tutorial in the Django website, it's as if the
label "
On Mar 26, 4:53 pm, Steven wrote:
> I've just created a model in Django and want to use the admin form to
> enter information for it. The problem I'm having is that my field
> names are so long that they overlap the edit boxes where their values
> are to be entered.
>
> If one follows the tutorial
Yea, that was it.
Also changing the url to just '/logout'
Thanks!
I'm having other problem now, the data that is getting sent to the
javascript code from the server is json data, but the quote symbol " is
returned as "
and so I get an error when trying to parse it.
Segunda-feira, 26 de Março
Just to rephrase it, I'm setting the data through a variable in a django
template, maybe that's not the best way to do it, I guess.
Segunda-feira, 26 de Março de 2012 16h23min15s UTC+1, drk escreveu:
>
> Yea, that was it.
> Also changing the url to just '/logout'
>
> Thanks!
>
>
> I'm having oth
I tried changing width from 8em to 16em in /usr/local/lib/python2.7/
dist-packages/django/contrib/admin/static/admin/css/forms.css in the
two places where it appeared:
.aligned label{
display: bloack;
padding: 3px 10px 0 0;
float: left;
width: 8em;
}
and
.inline-group .aligned-label{
w
I'm working on a rewrite of an app that has three categories of users
and I'm wondering about the best way to link them to the
authentication system:
In-House Staff.
Contractors
Customers who interact via the app.
The in-house staff model doesn't store any address info. Contractor
and Customer ha
Thank you for taking the time to help Babatunde; it's very much
appreciated.
On Mar 26, 7:00 am, Babatunde Akinyanmi wrote:
> jbr3,https://gist.github.com/2204408
> The code is most likely buggy and might be insecure because I'm not really
> sure if hackers can use radio buttons to submit malici
On Mar 25, 3:29 pm, Larry Martell wrote:
> I have a client that has an app built with django. On every page of
> their app is a link to their admin site. They tell me the admin site
> is generated entirely by django, and they've never customized it
> before. On the very first line of the admin pag
On 27/03/2012 9:16am, larry.mart...@gmail.com wrote:
On Mar 25, 3:29 pm, Larry Martell wrote:
I have a client that has an app built with django. On every page of
their app is a link to their admin site. They tell me the admin site
is generated entirely by django, and they've never customized it
On Mon, Mar 26, 2012 at 5:14 AM, Reinout van Rees wrote:
> In 1.3, there was no wsgi file. So either you added it yourself or
> webfaction automatically adds it.
> 1.4 started adding that wsgi.py file. It should be a drop-in replacement for
> the one you have now, basically.
> (Only thing to watch
On Mon, Mar 26, 2012 at 4:37 PM, Mike Dewhirst wrote:
> On 27/03/2012 9:16am, larry.mart...@gmail.com wrote:
>>
>> On Mar 25, 3:29 pm, Larry Martell wrote:
>>>
>>> I have a client that has an app built with django. On every page of
>>> their app is a link to their admin site. They tell me the adm
There are a few choices that I'm familiar with.
1) Create a separate project/settings file for each of your stores,
overriding templates as needed by placing assigning a template path
for the project. I think this is pretty much the recommended way to
do things, especially if the number of sites
Hello Django Nerds!
So I have a (somewhat) complicated lookup I'm trying to do; here's the
gist of it:
1. I have a Store class, with a User ManyToManyField, Store.users
2. I have a user profile class associated with each user,
UserProfile, accessible through the usual User.get_profile()
3
On 27/03/2012 10:16am, Larry Martell wrote:
On Mon, Mar 26, 2012 at 4:37 PM, Mike Dewhirst wrote:
On 27/03/2012 9:16am, larry.mart...@gmail.com wrote:
On Mar 25, 3:29 pm, Larry Martellwrote:
I have a client that has an app built with django. On every page of
their app is a link to their a
On Mon, Mar 26, 2012 at 7:25 PM, Mike Dewhirst wrote:
> On 27/03/2012 10:16am, Larry Martell wrote:
>>
>> On Mon, Mar 26, 2012 at 4:37 PM, Mike Dewhirst
>> wrote:
>>>
>>> On 27/03/2012 9:16am, larry.mart...@gmail.com wrote:
On Mar 25, 3:29 pm, Larry Martell wrote:
>
> I have
Larry
Here is a working setup ...
From settings.py
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # #
# if templates are not found here look in app_name/templates
TEMPLATE_DIRS = (
os.path.join(SRC_ROOT, 'templates/').replace('\\','/'),
)
# List of callables tha
I should have mentioned that {% extends "admin/base.html" %} is actually
extending the django admin/base.html in site-packages because there is
no such file in my SRC_ROOT/templates/admin directory.
Mike
On 27/03/2012 2:19pm, Mike Dewhirst wrote:
Larry
Here is a working setup ...
From set
Now that Django 1.4 is among us, function-based generic views are really
being phased out, and for those who use 'extra_context', but dislike the
method used implement it:
class MyListView(ListView):
def get_context_data(self, **kwargs):
context = super(MyListView, self).get_context_
On Tuesday, 27 March 2012 02:15:04 UTC+1, bcrem wrote:
>
> Hello Django Nerds!
>
> So I have a (somewhat) complicated lookup I'm trying to do; here's the
> gist of it:
>
> 1. I have a Store class, with a User ManyToManyField, Store.users
> 2. I have a user profile class associated with ea
Hello,
How do i transform this SQL query into a queryset?
select membership_type from memberships where id ='4'
i tried the following:
queryset = Memberships.objects.get(id__exact=4)
however django is throwing me an error with the following:
Memberships has no attribute all.
I know this is
33 matches
Mail list logo