Thanks heaps James, It works perfectly . :)
Cheers,
On Tue, Jan 13, 2015 at 12:48 PM, James Schneider
wrote:
> In your update_form.html, change the action to:
>
> action=""
>
> This will cause the form to POST to the same URL that generated the form,
> which should be what you want.
>
> More s
In your update_form.html, change the action to:
action=""
This will cause the form to POST to the same URL that generated the form,
which should be what you want.
More specifically, you don't have access to {{a.id}} in update_form.html
(since this is a separate request from the one that generate
How to you pass variable from one template to another template?
cheers
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com
Hi Colin.
On behalf of my colleague I will answer your question:
We did not have time (at this moment) to investigate this problem any
further. We've added a raw sql commands to disable foreign key checks
during this migration. We could do it since we are still learning Django
(and it's new mi
I am having a slight issue. click on the edit to working fine but when i
make change ans click save. i get this error
Page not found (404) Request Method: POST Request URL:
http://10.0.x.x:8000/update_form//
i think something is not right on th update_from.html. i just can't seem to
figure it ou
Hi James,
Thanks heaps for your help. your help is very much appreciated . I manage
to fix my issue. I wouldn't have done it without your help. :)
Cheers.
On Tue, Jan 13, 2015 at 10:24 AM, sum abiut wrote:
> Hi James,
>
> I have already coding the two views my problem is updating the rows. I
Hi James,
I have already coding the two views my problem is updating the rows. I am
a bit confuse on how to get that done.
Cheers,
On Mon, Jan 12, 2015 at 4:27 PM, James Schneider
wrote:
> You'll need two views to do this, one of them is the form, and that you
> already have written. Have yo
Thanks for the links. It might be related to that bug. In my scripts I
added another save() and then it works of course and as for the Admin
Panel, until I have a solution I put a message into the help text that
users have to click 'save and continue' first and then 'save' afterwards.
Then it's
Apologies, Vijay is right. Syncdb will only add new tables (models) on the
fly, not new columns to existing tables. It's been a while since I've had
to deal with syncdb. See here:
https://docs.djangoproject.com/en/1.6/ref/django-admin/#syncdb
The OP will need to issue direct ALTER TABLE commands
Is that related to this bug?
https://code.djangoproject.com/ticket/8892
https://code.djangoproject.com/ticket/10811
In short - if FK fields aren't saved as objects themselves first, then
they aren't correctly added to the new objects?
I had trouble with this once. Maybe put in a save after the g
I'm trying to access the value of a many-to-many relationship during the
save() method of my model but it always returns the state it had before,
even though the first thing I do is call super.save().
class Database(models.Model):
...
questions = models.ManyToManyField(Question)
path
Hi,
Are they not showing up in the admin at all, or are they showing up but
read-only?
Are you calling "admin.site.register(MyModel)" in admin.py?
Is your user a "superuser" in django?
Collin
On Sunday, January 11, 2015 at 4:30:50 AM UTC-5, Abhinav Agarwal wrote:
>
> I am not getting and 'cha
I just tested it with Django 1.6.9, syncdb does not add fields to existing
models
On Mon, Jan 12, 2015 at 5:20 PM, James Schneider
wrote:
> Adding a column to a model is supported by syncdb, no need for South
> migrations. Any other operation (ie changing/deleting an existing column)
> would req
Hi,
You can merge the two querysets like this. Would that help?
qs = Song.objects.filter(artist__made_by=request.user) | Song.objects.filter
(album__made_by=request.user)
or use models.Q
from django.db.models import Q
qs = Song.objects.filter(Q(artist__made_by=request.user) | Q(album__made_by=
Hi,
I personally always do it by hand without a library. What are you hoping to
get out of your form library?
Collin
On Friday, January 9, 2015 at 9:18:29 AM UTC-5, Frank Bieniek wrote:
>
> Hi All,
>
> I do need a recommendation for the current top notch forms library to use
> for a new bigger
Hi,
Did you figure it out? This seems like a bug. Can you reproduce it with a
fresh project?
Thanks,
Collin
On Friday, January 9, 2015 at 8:49:56 AM UTC-5, Maciej Szopiński wrote:
>
> Hi everyone,
>
> I've encountered an issue when working with django and I can't seem to
> find a way out of th
Adding a column to a model is supported by syncdb, no need for South
migrations. Any other operation (ie changing/deleting an existing column)
would require a South migration or a manual alteration on the DB itself.
-James
On Jan 12, 2015 12:16 PM, "James Schneider" wrote:
> The OP is running 1.
The OP is running 1.6 based on the output he provided, so migrations don't
apply.
You'll need to log into the database directly and interrogate the table to
see what columns actually exist. The error message is coming directly from
the database when the query is executed, not sourced from Django (
Then you need to install south and configure it or update to django 1.7
On Mon, Jan 12, 2015 at 4:54 PM, dennis breland
wrote:
> I am using Django 1.6
>
>
> On Monday, January 12, 2015 at 1:16:17 PM UTC-5, dennis breland wrote:
>
>> All works fine before making this change.
>>
>> I added new dat
I am using Django 1.6
On Monday, January 12, 2015 at 1:16:17 PM UTC-5, dennis breland wrote:
> All works fine before making this change.
>
> I added new data named "photo" in models.py and admin.py
> When I bring up the web page, I get this:
>
> ProgrammingError at /admin/recipe/dish/
>
> colum
sqlall only prints the commands that would be executed to create the
database from scratch, it does not output your current database schema
if you are using django 1.7, then you need to create a migratino and apply
it
python manage.py makemigrations
python manage.py migrate
On Mon, Jan 12, 2015
On Monday, January 12, 2015 at 1:16:17 PM UTC-5, dennis breland wrote:
>
> All works fine before making this change.
>
> I added new data named "photo" in models.py and admin.py
> When I bring up the web page, I get this:
>
> ProgrammingError at /admin/recipe/dish/
>
> column recipe_dish.photo doe
Hi,
Either use `./manage.py shell` or call `django.setup()` before using your
models.
Collin
On Friday, January 9, 2015 at 8:01:59 AM UTC-5, Ibrahim K wrote:
>
> Hi friends,
> I am new to django enivorment ... while using pyhton shell window
> for developing poll app,I got too many error
On 12/01/15 19:16, dennis breland wrote:
> I ran these after making the changes:
> python manage.py sqlall recipe
manage.py sqlall just prints the sql statements for your models
> python manage.py syncdb
Do you use migrations?
If so did you run migrate?
What was the output of syncdb?
-
Have you verified that syncdb ran correctly and that the column actually
exists in the database?
-James
On Jan 12, 2015 10:16 AM, "dennis breland" wrote:
> All works fine before making this change.
>
> I added new data named "photo" in models.py and admin.py
> When I bring up the web page, I get
I've got the same problem while using module django-modelclone.
I'd like to contribute in this module and fix the bug, can you help me wtih
it?
среда, 6 августа 2014 г., 18:06:51 UTC+3 пользователь Stodge написал:
>
> I'm trying to port my Django project to Dango 1.7rc2 but I'm hitting the
> app
All works fine before making this change.
I added new data named "photo" in models.py and admin.py
When I bring up the web page, I get this:
ProgrammingError at /admin/recipe/dish/
column recipe_dish.photo does not exist
LINE 1: ...ipe_dish"."dish_category", "recipe_dish"."style", "recipe_di..
My docker setup is pretty easy:
wget -qO- https://raw.github.com/progrium/dokku/v0.3.13/bootstrap.sh |
sudo DOKKU_TAG=v0.3.13 bash
cat ~/.ssh/id_rsa.pub | ssh r...@mynewhost.mydomain.tld "sudo
sshcommand acl-add dokku myproject"
git remote add production do...@mynewhost.mydomain.tld:myproject
g
Hello again Collin,
I am using your example as the basis for another similar set of forms and I
spotted something subtle that passed me by the first time through.
Namely, that to save the data, you are calling the model.save() method,
rather than the form.save() method that is generally shown i
Have you enabled autocommit to yes?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email
30 matches
Mail list logo