Thanks Russell :)
Now, no error pops up but when i press the login button the same page
reloads..by the way, Django is awesome :)
--
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
On Wed, Sep 29, 2010 at 2:20 PM, Saad Sharif
wrote:
> Thanks for your help :) Yup, I already did that, added {% csrf_token %} just
> after tag..still the same error comes up :(
The error page that comes up comes with a list of three possible
sources of error.
Have you ruled out those?
Yours,
R
Thanks for your help :) Yup, I already did that, added {% csrf_token %} just
after tag..still the same error comes up :(
On Wed, Sep 29, 2010 at 11:44 AM, Yo-Yo Ma wrote:
> User logs into your site (SaadsDjangoSite.com). User goes to
> CriminalCSRFSite.com while logged into yours. They put a sc
User logs into your site (SaadsDjangoSite.com). User goes to
CriminalCSRFSite.com while logged into yours. They put a script tag in
their page that has a post-back to
ttp://saadsdjangosite.com/delete-everything-and-kill-kittens/.
This causes the user's logged in browser to make a request to your
s
While I wouldn't say Pycharm is 'terribly slow' (on my dual-quad xeon Mac Pro
w/8 gigs of ram running OSX 10.6.4), I will say that it is noticeably slower
than my current Python IDE of choice, Netbeans 6.9.1 which is relatively snappy
though YMMV.
On 28 Sep, 2010, at 20:46 , pixelcowboy wrote
Thanks a lo :)
but there is a new error
The Error:
Forbidden (403)
CSRF verification failed. Request aborted.
Help
Reason given for failure:
CSRF token missing or incorrect.
In general, this can occur when there is a genuine Cross Site Request
Forgery, or when Django's CSRF
mechani
(r'^login/', include('macrohms.views.login')), is incorrect.
the include() function, pertaining to urls.py is for including other
URL confs (so you can have sub-sections of your site contain their own
urls.py). You'll want to replace that line with:
url(r'^login/$', 'macrohms.views.login')),
No
I have two models that are identical in structure except one has 2
extra fields. The second one is used for record keeping and is never
edited by users. The system takes the first model and copies it to the
second model, adding some extra meta information, all when a certain
action is performed aga
Hi all,
I created a simple login form
My code:
{% csrf_token %}
username
password
login
In views.py i added
def login(request):
return render_to_response('login.html')
In urls.py i added
(r'^login/', include('macrohms.views.login')),
The Error when i press login button:
ImportError
Alec,
Thanks.. yeah, your fix forces the fields to pk=True, which doesn't
redundantly serialize the field with it's custom name in my case. If
for some reason you wanted to ensure that the field was serialized
using it's custom field name though.. there doesn't appear to be a way
to do that. I'm p
Well that would require me to use simplejson.dumps(data) right? I need to
use my custom serializer in order to do a deep serialization of the model to
model dependencies. As far as I understand, serializers are meant to take
querysets or something of the sort, not dictionaries containing various
ki
On 9/28/2010 10:42 PM, Dmitrij wrote:
> I am trying to implement paging across ajax calls. The page should not
> refresh when the user wants to see the next x num of results.
>
> Here is my problem. Returning the QuerySet is super simple. I just do
> (sumaJson is custom)
>
> data = serializer
Using *args and **kwargs might work
then maybe
self.website = kwargs.get('website', 'default.com')
On Sep 28, 1:45 pm, adj7388 wrote:
> Django newbie issue. Just trying to understand. I'm setting up a
> simple UserProfile class to link to User (as described in several
> places in documentation)
Overriding __init__ might be a little shady, but you probably can get
away with it if you use *args and **kwargs
On Sep 28, 1:45 pm, adj7388 wrote:
> Django newbie issue. Just trying to understand. I'm setting up a
> simple UserProfile class to link to User (as described in several
> places in do
I am trying to implement paging across ajax calls. The page should not
refresh when the user wants to see the next x num of results.
Here is my problem. Returning the QuerySet is super simple. I just do
(sumaJson is custom)
data = serializers.serialize('sumaJson', result_page.object_list,
rel
On Sep 28, 6:45 pm, adj7388 wrote:
> Django newbie issue. Just trying to understand. I'm setting up a
> simple UserProfile class to link to User (as described in several
> places in documentation). Here's what I have --- a simple example of
> storing the user's website in a profile
>
> #In myapp/m
Good grief. After spending hours trying to figure out what was wrong,
I immediately found the problem after making this post. Here's the
solution:
I had overridden UserProfile.__init__() like this:
class UserProfile(models.Model):
def __init__(self, website='http://www.default.com'):
while i
On Tue, Sep 28, 2010 at 2:45 PM, adj7388 wrote:
> Django newbie issue. Just trying to understand. I'm setting up a
> simple UserProfile class to link to User (as described in several
> places in documentation). Here's what I have --- a simple example of
> storing the user's website in a profile
>
Hi all,
I want to create a simple login form in django..Please
help I am a complete beginner
My Code:
{% csrf_token %}
username
password
login
Error Message (when I press login button) :
Forbidden (403)
CSRF verification failed. Request aborted.
Help
Reason given for failure:
User.objects.get(pk=Session.objects.get(pk=session_id).get_decoded()
['_auth_user_id']) via @SmileyChris
On Sep 28, 9:36 pm, Danny Bos wrote:
> Heya,
>
> I've got a Django application talking to an iPhone sending photos and
> User data back and forth. I figured the best way to approach this
> (te
hi Erik
that was food for thought..content length may not work if
substitutions leave length unchanged..
Will look into L distance ..thanks for the suggestion
regards
harry
> Content length (which you could also get using the HTTP header "Content
> Length") won't necessarily tell you if content h
class Asset(models.Model):
languages = models.ManyToManyField('account.Language', null=True,
blank=True)
class AssetLanguageForm(forms.ModelForm):
languages = forms.ModelMultipleChoiceField(
queryset=Language.objects.all(),
required=False,
widget=forms.
Thanks, Steve. Sounds like a plan.
On Sep 28, 10:48 pm, Steve Holden wrote:
> On 9/28/2010 10:39 PM, Derek wrote:
>
> > I have a model which has choices specified for the "offer_type" field:
>
> > class Coupon(models.Model):
> > offer_types = (
> > (1, 'Percentage Off'),
> >
Hi Tim,
Good idea, but that won't work unfortunately as we use the 'Site'
functionality between the 40-odd sites.
Thanks though!
Ethan
On Sep 28, 7:50 pm, "Tim Sawyer" wrote:
> > Hi all,
>
> > I'm trying to have comments on my sites shown on all other sites, as I
> > have a 'mobile' skin for m
On 9/28/2010 10:39 PM, Derek wrote:
> I have a model which has choices specified for the "offer_type" field:
>
> class Coupon(models.Model):
> offer_types = (
> (1, 'Percentage Off'),
> (2, 'Amount Off'),
> (3, 'Free'),
> )
>
> business
I have a model which has choices specified for the "offer_type" field:
class Coupon(models.Model):
offer_types = (
(1, 'Percentage Off'),
(2, 'Amount Off'),
(3, 'Free'),
)
business = models.ForeignKey(Business)
offer_
Heya,
I've got a Django application talking to an iPhone sending photos and
User data back and forth. I figured the best way to approach this
(tell me otherwise) was to log the user in on the server and pass the
iPhone back the 'session ID' in a JSON array.
Then when the iPhone sends me back some
Thanks for the help guys. I started trying to log things, and only
then did I notice that I'd missed the obvious - one of the few queries
was taking 11s!
Turns out it was a pointless join from a weird use of queries (a
queryset contructed one place with more filters added elsewhere in an
odd order
For me, at least in ubuntu 64 bit, pycharm is indeed terribly slow.
And this on a icore7 machine with 8 gigs of ram. Otherwise I like it,
but it does have a few bugs.
On Sep 28, 10:53 am, Masklinn wrote:
> On 2010-09-28, at 02:01 , tayfur yilmaz wrote:> pycharm is very slow
>
> It's not.
>
> > ı
On Tue, Sep 28, 2010 at 7:35 PM, octopusgrabbus
wrote:
> I am getting a Missing Template exception
>
> Exception Type: TemplateDoesNotExist
> Exception Value:
>
> registration/login.html
What's your TEMPLATE_DIRS value in settings.py?
Inside your template dir you need to create the file
I am getting a Missing Template exception
Exception Type: TemplateDoesNotExist
Exception Value:
registration/login.html
My urls.py looks like this:
from django.conf.urls.defaults import *
from django.contrib.auth.views import login
.
.
.
urlpatterns = patterns('',
(r'^$', main_page)
Hello again,
after some trying and not coming to a successful end I might need a hint or
two with the following construction.
Assume a pilots flight log: Each flight can have several legs, and a
purpose. So basically the model looks like this:
Mission:
Pilot
Purpose
...
Leg:
Mis
Harryos,
Den 28/09/2010 kl. 09.56 skrev harryos:
> thanks Erik,
> By 'update' I meant a major addition/removal of text(say 100
> characters).
> Initially I thought of making hash of a page and comparing it to the
> saved hash of the same page at a different moment of time..But ,this
> would
> ca
Django newbie issue. Just trying to understand. I'm setting up a
simple UserProfile class to link to User (as described in several
places in documentation). Here's what I have --- a simple example of
storing the user's website in a profile
#In myapp/models.py
class UserProfile(models.Model):
d
Are you running with the same data set both places?
The biggest speed problem I ever had in deployment was because real data
blew the database up with a huge join. My dummy data on the test box didn't
evoke it. (Fix was to get a simple query set and loop over it so that another
query could be qu
On 28 sep, 17:32, Thomas Weholt wrote:
> Inspired by the discussions in this thread I've created a reusable app
> that mainly consists of a couple of management commands, like
> startbigapp ( working name ) which is a crude hack of the startapp
> code in django. It creates module for models and vi
As to whether it's a bug or not I have no idea, though it seems so.
If you use:
entity = models.OneToOneField(Entity, parent_link=True, primary_key=True)
it will create the primary key in both Kid and Adult tables, which
sounds like what you want?
On Tue, Sep 28, 2010 at 1:06 PM, phill wro
Hi django group users,
I solved the problem with another solution, but i think that the issue
is with the Content-Length of the header.
Kind Regards,
César
On Sep 28, 11:43 am, nerv82 wrote:
> Hello django experts,
>
> I'm creating a web service that returns a json application as content
> type
On 2010-09-28, at 02:01 , tayfur yilmaz wrote:
> pycharm is very slow
It's not.
> ı think for pycharm is wrote java programming
> language..wing ide is best..
Wings is written in Python, which is slower than Java...
--
You received this message because you are subscribed to the Google Groups
"D
On 2010-09-28, at 01:03 , Jason wrote:
> PyCharm is pretty amazing but it costs $ after its out of beta. Best
> code completion I've seen for Django.
>
> My ONLY complaint is you can't open up a python console during debug.
> It has a pretty good debugger but seeing as other IDEs have no problem
>
A small feature suggestion for @All,
Please address with @ symbol and name if you are actually intending
someone to read,
and then please delete the already existing message in your reply.
That makes us poor people to read things clearly and make up something
out of important discussions like thes
> can u please tell me which is it..
Emacs + Ropemacs + pylint + pyflakes + pep8.
Have a nice day,
Nikolay.
--
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 f
Don't forget Editra.
It is cross-platform (windows, linux, mac os).
It was code using python.
It is not heavy.
I like it.
I am currently using Coda (only for mac os)
It is beautiful but only for that platform.
My 2 cents
--
You received this message because you are subscribed to the Google Grou
This looks quite a bit like a bug, but we may be off the reservation
in terms of how we're using the product. (Disclaimer: I'm relatively
new to Django, and extremely new to the codebase that I ran into this
on).
We've got a form of schema-inheritance going on in this project in
order to accomplis
Have you guys seen adoptahacker.com? I'm sure that Jon Wegener and the team at
New Work City would be happy to help with finding places for visitors to stay
(as in couches/extra rooms).
In terms of getting hotel rooms sponsored, we might be able to VCs to offer
sponsorship for this (though we s
Inspired by the discussions in this thread I've created a reusable app
that mainly consists of a couple of management commands, like
startbigapp ( working name ) which is a crude hack of the startapp
code in django. It creates module for models and views instead of the
standard views.py and models.
http://djangocon.blip.tv/file/3322277/
--
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.
Do you see anything at all like this if you run your app from your development
box?
You can always use the Python debugger to trace for your code and look for
bottlenecks.
(Awesome tutorial) http://www.doughellmann.com/PyMOTW/pdb/index.html
Also, put in logging and add log.debug statements in
Guys,
James Bannett the release manager for Django gave a very comprehensive
talk during Pycon2010, "Django In Depth".
Where can i get that video for download.
Download link please.
Gath.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To po
Hi all,
I'm trying to figure out possible causes for really slow performance
of my site on my production server on webfaction - it can take up to
15s to load!
It only seems to be a problem on the home page of my site and it also
doesn't seem to be anything like too many queries. Using the debug
t
Hello django experts,
I'm creating a web service that returns a json application as content
type but every time that I try to consume this with a blackberry
application in a HttpConnection nothing is return in the inputstream.
I try with another json service and it's working fine in the
blackberr
Seems to be a general ferment on the topics of reusable Django apps
and best practices for modularizing large projects.
For example,
http://groups.google.com/group/django-users/browse_thread/thread/22875fd287d0aa81
I expect the situation to improve, or at least change, a lot over the
next year.
On Sep 28, 12:16 pm, graeme wrote:
> I need to do one of the following in the admin using Django 1.2:
>
> 1. Validate a value in a form against which objects have been added
> using an inline form.
> 2. Add or delete related objects depending on the value in the main
> model from.
>
> The first wo
On Sep 28, 12:08 pm, dPeS wrote:
> Hi all,
>
> Anyone has explanation to this? :
>
> >>> len(models.Rezerwacja.objects.all())
> 9
> >>> len(models.Rezerwacja.objects.annotate(przyjazd=Min('transza__zajetosc__dzien')))
> 9
> >>> models.Rezerwacja.objects.annotate(przyjazd=Min('transza__zajetosc__dz
On 9/28/2010 9:44 AM, Dana Spiegel wrote:
> Steve,
>
> This seems totally reasonable.
>
> Looking at this from a different perspective, given that there are a
> large and increasing number of python-based startups in NYC, would it
> make a difference re: which city was chosen if we (in NYC) were
Steve,
This seems totally reasonable.
Looking at this from a different perspective, given that there are a
large and increasing number of python-based startups in NYC, would it
make a difference re: which city was chosen if we (in NYC) were able
to solicit sponsorships from VCs and tech firms her
I have a slightly strange occurrence happening which makes no real
sense to me so I thought I'd see if anyone had any helpful hints...
My app stores people's first and last names, however for privacy
reason unless a user is logged in when browsing the website they will
only see "Firstname Initial"
Without wishing to seem non-responsive, can I just point out that we
can't keep extending the search indefinitely. First of all, we need to
make a decision reasonably quickly.Secondly, these venue searches take
time. While it costs nothing to "toss something out there", there *are*
costs involved w
On Sep 27, 11:35 am, Skylar Saveland
wrote:
> I have some modelforms within a . Each form has one
> checkboxselectmultiple that is not required. If I post nothing (all
> checkboxes are empty) then all of the forms are invalid. If I post
> anything then all of the forms are valid. This anything
It seems like no one has suggested New Orleans yet, so I'm just going
to toss that out there.
-Johnny
On Tue, Sep 28, 2010 at 7:31 AM, Franklin Einspruch
wrote:
> You might also have a look at Providence, RI. There's an airport, it's
> an hour from Boston by car, and they have an active tech com
Hi,
Problem: sometimes (not always) get_or_create is trying to create
duplicated record.
Model:
class online(models.Model):
postac = models.OneToOneField('postac.postacie',
related_name="lista_online")
data = models.DateTimeField()
Code snippet:
o =
online.objects.filter(postac__user
You might also have a look at Providence, RI. There's an airport, it's
an hour from Boston by car, and they have an active tech community
there:
http://rinexus.com/
http://providencegeeks.org/
http://www.pbn.com/Schillings-38-Studios-signs-lease-at-One-Empire-Plaza,52603
Good restaurants abound a
Give your solution.
On Aug 4, 3:54 pm, kostia wrote:
> SOLVED!
>
> On Aug 4, 3:48 pm, kostia wrote:
>
>
>
>
>
>
>
> > After I do:
>
> > kos...@baikal$ python manage.py runserver
> > Error: No module named messages
> > kos...@baikal$
>
> > Django 1.2.1 with python 2.6.5+ devel installed.
--
You
On 9/28/2010 1:19 AM, Kenneth Gonsalves wrote:
> On Mon, 2010-09-27 at 22:51 -0400, Steve Holden wrote:
>> I'd just like to briefly report back on the inquiries Nancy and I have
>> been making into East coast venues for DjangoCon 2011.
>
> just curious - why a hotel? In India we hold such confere
There seemed to be a general feeling that a change of venue should head
Eastwards rather than South. So we are looking primarily for East coast
locations as an alternative to Portland for 2011.
regards
Steve
On 9/27/2010 11:49 PM, David Zhou wrote:
> Is the bay area right out for cost reasons?
>
Hi,
I am receiving an error:
AttributeError: 'Manager' object has no attribute 'using'
when i run:
result = Tusers.objects.using('lysgbl').filter.all()
where Tusers is the table and lysglb is the schema
Is there something wrong in the code i am using or what is the problem?
Any hel
I need to do one of the following in the admin using Django 1.2:
1. Validate a value in a form against which objects have been added
using an inline form.
2. Add or delete related objects depending on the value in the main
model from.
The first would be preferable as the user would be able to dec
Hi all,
Anyone has explanation to this? :
>>> len(models.Rezerwacja.objects.all())
9
>>> len(models.Rezerwacja.objects.annotate(przyjazd=Min('transza__zajetosc__dzien')))
9
>>> models.Rezerwacja.objects.annotate(przyjazd=Min('transza__zajetosc__dzien')).dates('utworzona','year')
[datetime.datetim
On 28 sep, 11:43, mf wrote:
> After finishing the core functionalities of my project it's time to
> begin with other secundary but important things.
>
> I've something like the following models.py file:
>
> class Category(models.Model):
> name = models.CharField(max_length=30)
>
> class Transac
> Hi all,
>
> I'm trying to have comments on my sites shown on all other sites, as I
> have a 'mobile' skin for my site on a separate domain and site_id.
>
> So for example:
> Joe posts a comment on http://www.site1.mydomain.com
>
> Mary goes to http://www.mobilesite.mydomain.com and can see and
>
After finishing the core functionalities of my project it's time to
begin with other secundary but important things.
I've something like the following models.py file:
class Category(models.Model):
name = models.CharField(max_length=30)
class Transaction(models.Model):
name = models.CharFi
django-todo is a multi-user, multi-group, pluggable todo-list/
ticketing system for individuals and organizations. The project,
formerly on google code, has been relaunched on githhub:
http://github.com/shacker/django-todo
with lots of bugs fixed and features added recently. Includes a
setup.py
On 28 sep, 10:02, Benedict Verheyen
wrote:
> I agree with Thomas that at least some guidelines would be nice.
> As what you and Steve have been saying about the need for a "Python for
> Djangonauts" class,
> i think it would be a good idea also.
> I'm wondering though what specific Python topics
On 28/09/2010 0:48, bruno desthuilliers wrote:
>
>
> On 27 sep, 17:31, Thomas Weholt wrote:
>> On Mon, Sep 27, 2010 at 4:52 PM, bruno desthuilliers
>>
>
>>> ??? Which "django specific magic" ???
>>
>> I was referring to syncdb. As far as I know, models defined outside
>> any models.py or models
> You could also try looking at the HTTP headers for a request for e.g.
> "index.htm" using urllib. Specifically the "Expires" and "Last-Modified".
> Using headers values requires that you can trust the site on the header
> content. Web servers and caching proxies can do all sorts of things with
On 27/09/2010 12:19, Tim Sawyer wrote:
>> On 25/09/2010 18:32, Tim Sawyer wrote:
>>> On 25/09/10 15:57, craphunter wrote:
Yes, I have read it, but I don't really get it. What is the meaning of
it?
>>>
>>> Consider a website that has multiple blogs, all of which are deployed to
>>> the sam
On 27/09/2010 23:59, Diederik van der Boor wrote:
> SInce watching that video, my projects are composed by default of 2 apps. A
> "projectname" for the core backend stuff, and a "projectname-site" with the
> templates, settings, and frontend media. This is imho a nicer base to start
> "hooking
Hi guys,
I'm trying to make the rss work. I managed to call the
"LatestGalleriesFeed" function by using direct pointing in url
(commented out in the urlpatter bellow), but when trying to use the
generic view with the feeds mapping I get the error "object.__new__()
takes no parameters"
Thanks!
Gab
Thanks
On Tue, Sep 28, 2010 at 12:06 PM, Daniel Roseman wrote:
> On Sep 27, 9:43 pm, Bill Seitz wrote:
> > I know Django will support multiple SQL databases by just having a
> > tuple of DATABASES entries in settings.py.
> >
> > But can I put a single item in DATABASES for a SQL part, and a 'fro
I've used Aptana for a while now and it's worked great for me.
http://www.aptana.com/
rgds
On Sep 27, 2:07 pm, Carlos Daniel Ruvalcaba Valenzuela
wrote:
> So far there is 3 big ones for django, Eclipse + PyDev or Aptana +
> PyDev, WingIDE (latest version can even debug django templates) and
> P
80 matches
Mail list logo