Thanks
This might have solved another issue i had not encountered yet, but it
did not solve my current issue :)
Form is still not valid and i have no idea why. If someone would tell
me how modelform error messages are supposed to be used, then they
might help me.
{% if
Ramiro:
I've set up some models / forms / formsets which demonstrate the
change here:
http://dpaste.de/YhrI/
My initial report wasn't correct - the change in behavior is only seen
when initalizing ModelFormSets . . . the ModelForm behavior is
unchanged. With a formset, the value use to get
Hi,
When I tested sql of MySQL in Python interactive shell, I got an
error of "not enough arguments for format string". I checked the
arguments however I could not find anything wrong.
Can anybody give me a clue?
Thanks so much.
>>> sql = Template('select dimension1
On Sat, Aug 1, 2009 at 8:28 PM, David Haas wrote:
>
> Hi:
>
> I'm hoping to get some feedback on a little change in behavior I'm
> seeing when initializing ModelForms between 1.1-beta & the official
> 1.1 release.
>
> The quick and dirty explanation is this: I have a
Also declare dan_id and stu_id as string. Unless request.GET can
magically return you number, which I am not sure.
Looks we are doing compilers job here :)
On Aug 2, 1:17 am, Alex Gaynor wrote:
> On Sat, Aug 1, 2009 at 6:59 PM, prabhu S wrote:
>
> >
On Sat, Aug 1, 2009 at 6:59 PM, prabhu S wrote:
>
> change student_id_validate to student_id_check
>
> Invalid variable dude.
>
> On Aug 2, 12:46 am, cprsystems wrote:
>> I'm trying to redirect users of an html page to another page depending
>> on the
change student_id_validate to student_id_check
Invalid variable dude.
On Aug 2, 12:46 am, cprsystems wrote:
> I'm trying to redirect users of an html page to another page depending
> on the user id entered. I'm using if else statements and declaring ids
> within views.py
I think this should fix. Additionally if you are using
render_to_response for some reason, it passes Context instead of
RequestContext.
To solve this do render_to_response('view', {},
context_instance=RequestContext(request))
On Aug 1, 9:10 pm, OIM wrote:
> You should use:
The method create_profile returns profile after saving. But this
object will not contain primary keys etc generated in the db. To work
around this common issue with django
profile.save()
# Get the data again from db.
profile = Profile.objects.get(user=username)
return profile
Let me know if
I'm trying to redirect users of an html page to another page depending
on the user id entered. I'm using if else statements and declaring ids
within views.py named htmlp2. I keep getting syntax errors, any
insight as to why would be much appreciated. My code is below
Thank you
from
On Sat, Aug 1, 2009 at 5:38 PM, Mirat Can
Bayrak wrote:
>
> i am playing a lot with my models in my project nowadays. On every change i
> am deleting my sqlite3 file and running syncdb again.. its ok but creating a
> admin user in every syncdb is booored me. is there
Your apache server would run as www user. Where as you have saved your
project in /root with root as the owner. To do this properly, do not
save your django project in /root. Have it somewhere like /var/www and
make "www" as the owner. Also fix execute permissions.
chmod -R 700 should do. Or
Hi:
I'm hoping to get some feedback on a little change in behavior I'm
seeing when initializing ModelForms between 1.1-beta & the official
1.1 release.
The quick and dirty explanation is this: I have a ModelForm which is a
subclass of another ModelForm. The parent ModelForm has the fields
Hacks which embed knowledge of the mount point in the application
generally indicate that you are doing something wrong in your
configuration.
Stop trying to jump to solutions when hasn't even been determined what
you are doing wrong.
As suggested, post the mod_wsgi configuration you are using
Figured it out. I was making a simple mistake using the actual html
file name instead of the incoming url that's mapped to its def. Thank
you for responding so quickly.
On Aug 1, 4:56 pm, Dan Harris wrote:
> what error are you getting?
>
> On Aug 1, 4:41 pm, cprsystems
On Sat, Aug 1, 2009, Ramiro Morales wrote:
>If you need this for the admin app and are using Django 1.1 read about
>the formfield_for_foreignkey ModelAdmin method:
>
>http://docs.djangoproject.com/en/dev/ref/contrib/admin/
what error are you getting?
On Aug 1, 4:41 pm, cprsystems wrote:
> I'm trying to write a simple html page using Django that passes one
> variable via a submit button and text line and prints it out to
> another hmtl document. I'm having trouble getting it to work. Could
>
Hi,
I am working on an image gallery. I am making use of django-imagekit. My
site is hosted at a VPS, with 80 MBs of memory. I use NginX with fastcgi.
What I am trying to accomplish is the following:
1. A logged-in user goes to an /upload page, where information about the ftp
server is listed
2.
On Sat, Aug 1, 2009 at 12:05 PM, Daniele
Procida wrote:
>
> I am trying to set up a model.
>
> A Person has a ManyToMany relationship with Entities. One of those
> relationships is special - we can capture that with a ForeignKey
> relationship to Entity.
>
> But, I want
I'm trying to write a simple html page using Django that passes one
variable via a submit button and text line and prints it out to
another hmtl document. I'm having trouble getting it to work. Could
someone explain what I'm doing wrong? I've included the code below.
urls.py
# -*- coding: cp1252
You should use:
{% block user_info %}
{% if user.is_authenticated %}
User {{ user.username }} (logout |
profile)
{% endif %}
{% endblock %}
It works.
--~--~-~--~~~---~--~~
You received
I figured ill add the code i have so far:
The models:
class ProfileManager(models.Manager):
def create_profile(self, username):
"Creates and saves a User with the given username, e-mail and
password."
now = datetime.datetime.now()
profile =
Hi Malcolm,
Thanks for the helpful reply.
On Sat, 01 Aug 2009 12:24:29 +1000, Malcolm Tredinnick
wrote:
> On Fri, 2009-07-31 at 11:42 -0400, Faheem Mitha wrote:
>>
>> Hi everybody,
>>
>> I upgraded from somewhere around Django 1.0 to 1.0.2, and some things
>>
You can access the page that they were previously on using
HttpRequest.META['HTTP_REFERER']. You'll probably need to persist it
in a session so you still have access to it after they submit their
login credentials (otherwise HTTP_REFERER would be the login page).
I'm not sure if HTTP_REFERER can
On Jul 31, 7:37 pm, Malcolm Tredinnick
wrote:
> On Fri, 2009-07-31 at 16:31 -0700,mviamariwrote:
> > Hello,
>
> > I'm trying to make a form for data entry into my database that uses
> > ChoiceFields for foreign keys. Obviously, the ideal choice would be
> >
The included login view (django.contrib.auth.views.login) takes an
optional "next" argument for this:
http://docs.djangoproject.com/en/dev/topics/auth/#django.contrib.auth.views.login
Hope that helps.
-Justin
On Jul 31, 9:15 am, When ideas fail wrote:
> I was
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Check out RequestContext and setting it up with the setting in
settings.py:
http://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors
Luke
luke.seelenbin...@gmail.com
"I [may] disapprove of what you say, but I will defend to
Thanks for the great replies here.
It seems from this there might be less repetition if I can just put a
SITE_URL attribute in my settings.py file and then make that available
to the template without having to go through the view. Is this
possible or easy? Custom template filter perhaps but
On Sat, 2009-08-01 at 18:35 +0200, Daniel Svonava wrote:
> Hi,
>
> I have a simple question regarding Django template system.
>
> Lets imagine I have two blocks defined in my base template like this:
>
> Search bar
> {% block A %}
> {% endblock %}
>
> Content
> {% block B %}
> {% endblock %}
Hi,
I have a simple question regarding Django template system.
Lets imagine I have two blocks defined in my base template like this:
Search bar
{% block A %}
{% endblock %}
Content
{% block B %}
{% endblock %}
I have 3 independent apps in my project called RenderA, RenderB1 and
RenderB2.
I am trying to set up a model.
A Person has a ManyToMany relationship with Entities. One of those
relationships is special - we can capture that with a ForeignKey
relationship to Entity.
But, I want to limit the choices for that special relationship to
Entities that the person already has a
Solved it by doing this:
def profile_detail(request, name):
p = get_object_or_404(Profile, name=name)
return render_to_response('profile_detail.html', {'name': p})
On 1 Aug, 12:22, "Rob B (uk)" wrote:
> Using the url to look up a user profile just not sure
Maybe this helps:
http://groups.google.com/group/django-multilingual/browse_thread/thread/a8f521068ab5e0a4
On 23 Jun., 14:08, Marco Bazzani wrote:
> ok this is a little bit complex problem (at least for me)
>
> let's supose that I've a model like this one:
>
> class
Hello folks,
I have facing the same problem mentioned in the stackoverflow question
here (
http://stackoverflow.com/questions/962533/django-modpython-error-importerror-could-not-import-settings
). The solution doesn't seem to work
Problem description The app runs fine using django internal
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Bryan,
I decided not to totally write a new module for it. I took pyaws, and
re-factored it to account for the secret key you now have to use with
requests.
If you want the new ecs.py from pyaws, I'll be happy to get it to you.
I'm not 100% sure it
Luke,
I was curious how this was going.
I did find this:
http://jjinux.blogspot.com/2009/06/python-amazon-product-advertising-api.html
import time
import urllib
from boto.connection import AWSQueryConnection
AWS_ACCESS_KEY_ID = '...'
AWS_ASSOCIATE_TAG = '...'
AWS_SECRET_ACCESS_KEY = '...'
> So is there a viable django solution for this problem?
To build on what Malcolm was saying, the problem you have is that
the only things your server knows are (1) when a user last
engaged in a transaction with your server and optionally (2) when
a user has intentionally logged out. #2 is
Using the url to look up a user profile just not sure what to put in
the view. Any suggestions welcome.
Model:
class Profile(models.Model):
title = models.ForeignKey(User, unique=True)
name = models.CharField(max_length=50, null=False, blank=False)
def __unicode__(self):
I think, I found what I need! Thanx for your patience!
On 1 авг, 10:21, Unnamed_Hero wrote:
> > If these are meant to be referring to entries in the tables for
> > Translation1, etc, then make them ForeignKey fields, not IntegerFields.
> > The way you have set up your
hmm it works thank you
--~--~-~--~~~---~--~~
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
On Sat, Aug 1, 2009 at 10:38 AM, Mirat Can
Bayrak wrote:
>
> i am playing a lot with my models in my project nowadays. On every change i
> am deleting my
> sqlite3 file and running syncdb again..
You don't need to delete your entire database; it might be worth
checking
i am playing a lot with my models in my project nowadays. On every change i am
deleting my sqlite3 file and running syncdb again.. its ok but creating a admin
user in every syncdb is booored me. is there any way to give django a inital
user with username : admin, and pass : admin ?
--
Mirat
How can i see why my model form does not save?
I added messages into view and those messages tell me that the form
was not valid. Then i added
{% if pform.non_field_errors %}
{{ pform.non_field_errors.as_ul }}
{%
> If these are meant to be referring to entries in the tables for
> Translation1, etc, then make them ForeignKey fields, not IntegerFields.
> The way you have set up your models, there is no way for Django to know
> there is any relationship here.
The point is that database is already filled
44 matches
Mail list logo