Re: Corrupted Migration?

2015-09-30 Thread Mike Dewhirst
On 1/10/2015 1:36 PM, Daniel Chen wrote: I have tried that (by the way, the offending migration didn't show up in the django_migrations table because the migration failed). I think we might be talking past each other. Sorry if I'm being unclear. Here's an example of what's going on: You haven'

Re: Corrupted Migration?

2015-09-30 Thread Daniel Chen
I have tried that (by the way, the offending migration didn't show up in the django_migrations table because the migration failed). I think we might be talking past each other. Sorry if I'm being unclear. Here's an example of what's going on: 1. Before migration, my database is at state X, a

Re: Corrupted Migration?

2015-09-30 Thread Mike Dewhirst
On 1/10/2015 6:51 AM, Daniel Chen wrote: Thanks for the reply. I should have mentioned that I tried all of that: the problem is the model state is ahead of the database state, not behind it. It seems that the database migration was atomic, so everything was rolled back as that transaction failed,

Re: can't find static file

2015-09-30 Thread James Schneider
Also, your error indicates that your URL request is using the 'image' directory, not 'images', which doesn't match your directory structure. -James On Sep 30, 2015 2:15 PM, "José Javier Castro Matamoros" wrote: > Hi Gary. Did you read the section *Serving static files during > development*. If y

Re: can't find static file

2015-09-30 Thread José Javier Castro Matamoros
Hi Gary. Did you read the section *Serving static files during development*. If you don't maybe this happen because you didn't add this code in the project/urls.py. rom django.conf import settingsfrom django.conf.urls.static import static urlpatterns = patterns('', # ... the rest of your URLco

can't find static file

2015-09-30 Thread Gary Roach
Hi all; Stats: Debian Linux 8 (jessie) python = 2.7.9 Django 1.7 (To match tutorial) sqlite data base Using virtualenv I'm working my way through the Tango With Rango tutorial and have hit a snag. I added the static/images directory and put in a jpg photo for data. The system can't find the fi

Re: upload zip or rar files

2015-09-30 Thread dk
FYI, it works if the zip or the rar files were generated in windows, not if they come from Linux =(... On Tuesday, September 29, 2015 at 1:41:27 PM UTC-5, dk wrote: > I set up a form to upload files, and every thing works fine, the only > problem is when I am in the webpage and I click

Re: Corrupted Migration?

2015-09-30 Thread Daniel Chen
Thanks for the reply. I should have mentioned that I tried all of that: the problem is the model state is ahead of the database state, not behind it. It seems that the database migration was atomic, so everything was rolled back as that transaction failed, but the same thing didn't happen at the

Re: csrf token

2015-09-30 Thread Ezequiel Bertti
More friendly reply: https://docs.djangoproject.com/en/1.8/ref/csrf/ On Wed, Sep 30, 2015 at 5:18 PM, Larry Martell wrote: > On Wed, Sep 30, 2015 at 4:15 PM, Bhanu Kathuria > <001kathuriabh...@gmail.com> wrote: > > What is the use of csrf token in forms? > > http://lmgtfy.com/?q=CSRF > > -- > Y

Re: csrf token

2015-09-30 Thread Larry Martell
On Wed, Sep 30, 2015 at 4:15 PM, Bhanu Kathuria <001kathuriabh...@gmail.com> wrote: > What is the use of csrf token in forms? http://lmgtfy.com/?q=CSRF -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop rece

csrf token

2015-09-30 Thread Bhanu Kathuria
What is the use of csrf token in forms? -- 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 em

Re: Admin: Unknown fields

2015-09-30 Thread Rolston Jeremiah
Hello Florian Schweikert, Thank you. The commas (',') were the problem. Consider this user-issue closed. Great place to learn Thanks to all. Rjae On Monday, September 28, 2015 at 6:56:42 PM UTC-4, Rolston Jeremiah wrote: > > Hello, > > I am new to Python and Django so please bear with me.

Re: E-commerce

2015-09-30 Thread Paul Savignano
Thanks Ezequiel! I'll check it out. *Paul* On Sun, Sep 27, 2015 at 12:44 PM, Ezequiel Bertti wrote: > http://www.getlfs.com/ > > On Fri, Sep 25, 2015 at 8:59 PM, Paul Savignano > wrote: > >> Thanks luisza14 ! >> >> On Thursday, September 24, 2015 at 1:30:46 PM UTC-7, luisza14 wrote: >>>

Re: Foriegn key error--> no such column: eduplus_choice.question_id

2015-09-30 Thread Bhanu Kathuria
Thank you . I found the solution to my problem.I didn't use syncdb command before applying foriegn key. On Wed, Sep 30, 2015 at 9:43 PM, Gergely Polonkai wrote: > Did you run your migrations? > On 30 Sep 2015 15:35, "Bhanu Kathuria" <001kathuriabh...@gmail.com> wrote: > >> Settings,admin and mod

Re: Foriegn key error--> no such column: eduplus_choice.question_id

2015-09-30 Thread Gergely Polonkai
Did you run your migrations? On 30 Sep 2015 15:35, "Bhanu Kathuria" <001kathuriabh...@gmail.com> wrote: > Settings,admin and model file are attached. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop

Re: Foreign key in sqlite3

2015-09-30 Thread Gergely Polonkai
Assuming you are using Django and it's ORM, the same way as in any other database: fieldname = models.ForeignKey(AnotherModel) On 30 Sep 2015 15:18, "Bhanu Kathuria" <001kathuriabh...@gmail.com> wrote: > I am using sqlite3 database. > How can I add foreign key between two tables. > > -- > You

Foriegn key error--> no such column: eduplus_choice.question_id

2015-09-30 Thread Bhanu Kathuria
Settings,admin and model file are attached. -- 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, sen

Foreign key in sqlite3

2015-09-30 Thread Bhanu Kathuria
I am using sqlite3 database. How can I add foreign key between two tables. -- 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...@googlegro

Re: Corrupted Migration?

2015-09-30 Thread Mike Dewhirst
On 30/09/2015 4:16 PM, Daniel Chen wrote: Hi all, A migration I was running (manage.py migrate) died in the middle. I deleted the migration file, fixed the problem (wrong default value), recreated the migration, and re-ran it. But now, I'm getting an inconsistent state (error message: [Model] ha

Corrupted Migration?

2015-09-30 Thread Daniel Chen
Hi all, A migration I was running (manage.py migrate) died in the middle. I deleted the migration file, fixed the problem (wrong default value), recreated the migration, and re-ran it. But now, I'm getting an inconsistent state (error message: [Model] has no field named [field]). When I check t