Hi,
i have this error , why ?
(1062, "Duplicate entry '1' for key 'start_work_id'")
Exception Type: IntegrityError Exception Value:
(1062, "Duplicate entry '1' for key 'start_work_id'"
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
Den 12/05/2014 kl. 10.53 skrev hito koto :
> Hi,
>
> i have this error , why ?
>
>
> (1062, "Duplicate entry '1' for key 'start_work_id'")
> Exception Type: IntegrityError
> Exception Value:
> (1062, "Duplicate entry '1' for key 'start_work_id'"
Please post your code for the model
Ok, Thank you!
So, this is my the full codes;
class Staff(models.Model):
user = models.OneToOneField(User)
user_name = models.CharField(max_length=255,)
first_kana = models.CharField(max_length=255,)
last_kana = models.CharField(max_length=255, )
employee_number = models.Cha
This the error is came out when edited and saved
2014年5月12日月曜日 18時21分45秒 UTC+9 Erik Cederstrand:
>
> Den 12/05/2014 kl. 10.53 skrev hito koto >:
>
>
> > Hi,
> >
> > i have this error , why ?
> >
> >
> > (1062, "Duplicate entry '1' for key 'start_work_id'")
> > Exception Type:Integ
Den 12/05/2014 kl. 11.38 skrev hito koto :
> Ok, Thank you!
>
> So, this is my the full codes;
Are you sure your database is in sync with your model? The error message
implies that the field is defined with unique=True, but your model doesn't
define it so:
start_work = models.ForeignKey(Sta
Anyone have an insight into this please?
--
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 e
Reset your database and test again.
2014-05-12 10:46 GMT+01:00 Erik Cederstrand :
> Den 12/05/2014 kl. 11.38 skrev hito koto :
>
> > Ok, Thank you!
> >
> > So, this is my the full codes;
>
> Are you sure your database is in sync with your model? The error message
> implies that the field is defi
Hi Timothy
thanks for your suggestions. I'm still on the path. I'll put more details in my
reply to WongoBongo below.
cheers
Dave
--
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
Hi folks
I'am new to django and try to follow the tutorial to digg into the code.
I am using eclipse 4.3.SR2 with PyDev 3.4.1 and Django 1.7.b2 (because of
the new features)
In Tutorial Part 3
(https://docs.djangoproject.com/en/1.7/intro/tutorial03/) the database API
is used to get the latest
thanks for your reply WB.
I was hoping to avoid virtualenv. My webapp is a frontend to a vulnerability
scanner in a large corporation.
They are very picky about what I can use and what I can't. Is virtualenv
suitable for such a production system?
They insist that I cannot use mod_wsgi (it annoy
I can't imagine virtualenv being a vulnerability risk. AFAIK; All it does
is create a set of scripts to isolate the executing Python environment.
http://virtualenv.readthedocs.org/en/latest/virtualenv.html
In fact, I would almost say that it improves your ability to know EXACTLY
what is in your e
But the code works, right?
This is a PyDev issue, not a Django issue.
(If you can only use code that your IDE understands, that leaves out a lot
of interesting programs.)
On Mon, May 12, 2014 at 4:04 AM, Florian Auer wrote:
> Hi folks
>
> I'am new to django and try to follow the tutorial to d
On Mon, May 12, 2014 at 12:09 PM, David Malcolm wrote:
> thanks for your reply WB.
>
> I was hoping to avoid virtualenv. My webapp is a frontend to a vulnerability
> scanner in a large corporation.
> They are very picky about what I can use and what I can't. Is virtualenv
> suitable for such a p
I saw it
here http://www.slideshare.net/jacobian/the-best-and-worst-of-django on
slide 41. That's a lot to go through, I know, sorry about that. But I
googled it and of course got nothing because Google ignores things like +
and = now. And I know in this particular example he says 'don't do thi
On Mon, May 12, 2014 at 2:22 PM, Malik Rumi wrote:
> I saw it here
> http://www.slideshare.net/jacobian/the-best-and-worst-of-django on slide 41.
> That's a lot to go through, I know, sorry about that. But I googled it and
> of course got nothing because Google ignores things like + and = now. And
a += b
is nominally the same as
a = a + b
To make class instances support this behavior the class can implement the
__iadd__ special method. See docs.python.org and read about special
methods.
This notation originated, so far as I know, in the C language. It at least
goes back that far.
On
Wow, really quick replies! thanks to both of you!
On Monday, May 12, 2014 8:26:57 AM UTC-5, Tom Evans wrote:
>
> On Mon, May 12, 2014 at 2:22 PM, Malik Rumi
> >
> wrote:
> > I saw it here
> > http://www.slideshare.net/jacobian/the-best-and-worst-of-django on
> slide 41.
> > That's a lot to g
Hi,
I am really new to django (and python as well).
I now try to create an app from the django.
I want to view the database table on something like phpmyadmin, does django
come with administration tool?
I installed the django on virtualenv on my local computer (Arch Linux), and
it already have
Also, I don't think that it's the += that he's worried about. What he's
saying is that you shouldn't expect every sub-directory of BASE to always
be an app, and/or that the order of INSTALLED_APPS can be important, and/or
that your settings.py file should document what you are using.
On Mon, May
Apparently nobody is interested in WizardView and related features, much
less with the proposed[1][3] improvements.
[1] https://code.djangoproject.com/ticket/21644
[2] https://code.djangoproject.com/ticket/21667
[3] https://github.com/thenewguy/django_formwizard_mixins
[4] https://github.com/the
Thank you !
I was should be set up unique=True
2014年5月12日月曜日 18時46分22秒 UTC+9 Erik Cederstrand:
>
> Den 12/05/2014 kl. 11.38 skrev hito koto >:
>
>
> > Ok, Thank you!
> >
> > So, this is my the full codes;
>
> Are you sure your database is in sync with your model? The error message
> implies
I am new to Django and am learning it baically because I wanted to create a
BookMarker project. A project for managing bookmarks. For this I am going
to create a UI through Django and a JavaScript for sending the URLs to the
app. There is a problem of CSRF token in Django. I was able to do a dum
Hi Aseem,
On Mon, May 12, 2014 at 11:25 PM, Aseem Bansal wrote:
> I am new to Django and am learning it baically because I wanted to create a
> BookMarker project. A project for managing bookmarks. For this I am going to
> create a UI through Django and a JavaScript for sending the URLs to the ap
Hi Sanjay
I think you misunderstood a bit. The JS that I am talking about will not be
inside the web pages of the project. The JS is supposed to be used as a
Bookmarklet in the web browser. I intend to use the bookmarklet for sending
the current webpage's url to the app via a POST request. The
On Mon, May 12, 2014 at 9:01 PM, Aseem Bansal wrote:
> Hi Sanjay
>
> I think you misunderstood a bit. The JS that I am talking about will not be
> inside the web pages of the project. The JS is supposed to be used as a
> Bookmarklet in the web browser. I intend to use the bookmarklet for sending
>
Hi you read this part of the exempt, if you not need csrf
https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#django.views.decorators.csrf.csrf_exempt
cheers
On Mon, May 12, 2014 at 2:01 PM, Aseem Bansal wrote:
> Hi Sanjay
>
> I think you misunderstood a bit. The JS that I am talking about
On Mon, May 12, 2014 at 9:08 PM, Tom Evans wrote:
> On Mon, May 12, 2014 at 9:01 PM, Aseem Bansal wrote:
>> Hi Sanjay
>>
>> I think you misunderstood a bit. The JS that I am talking about will not be
>> inside the web pages of the project. The JS is supposed to be used as a
>> Bookmarklet in the
Views.py
from django.shortcuts import render
from django.http import HttpResponse
from vmware.models import Customer
from django.shortcuts import render_to_response
from vmware.models import Vms
def index(request):
customers = Customer.objects.all
vms = Vms.objects.all
On Mon, May 12, 2014 at 10:02 PM, G Z wrote:
> Views.py
>
>
> from django.shortcuts import render
> from django.http import HttpResponse
> from vmware.models import Customer
> from django.shortcuts import render_to_response
> from vmware.models import Vms
>
> def index(request):
> customer
I'm just trying to associate each vm tied to the customers id and display
the vms under the customer that are associated with his id.
On Monday, May 12, 2014 3:02:34 PM UTC-6, G Z wrote:
>
> Views.py
>
>
> from django.shortcuts import render
> from django.http import HttpResponse
> from vmware.mo
so as you can see when ever the vm field customer id matches the customers
name i want to display the vm with the customer. To create a table of vms
that each customer has. I also will be associating a third database with
vmspecs to each vm.
I know there is an easier way to do this with django
On Mon, May 12, 2014 at 10:47 PM, G Z wrote:
> I'm just trying to associate each vm tied to the customers id and display
> the vms under the customer that are associated with his id.
>
Normally, you would have some sort of relationship between those
models, and the template code would look someth
this is my models
from django.db import models
# Create your models here.
class Customer(models.Model):
NAME = models.CharField(max_length=200)
WEBSITE = models.CharField(max_length=200)
PHONE = models.CharField(max_length=200)
EMAIL = models.CharField(max_length=200)
ADDRES
also thank you so much for your help.
On Monday, May 12, 2014 4:00:27 PM UTC-6, Tom Evans wrote:
>
> On Mon, May 12, 2014 at 10:47 PM, G Z >
> wrote:
> > I'm just trying to associate each vm tied to the customers id and
> display
> > the vms under the customer that are associated with his id.
>
> ok its still not putting out the vm data i get
Grant - google.com - 7029855378 - zuk...@gmail.com - 2332 oakland st
- -
{% for customer in customers %}
{{ customer.NAME }} - {{ customer.WEBSITE }} -
{{customer.PHONE}} - {{ customer.EMAIL }} - {{ customer.
On Monday, May 12, 2014 3:37:47 PM UTC-7, G Z wrote:
>
> ok its still not putting out the vm data i get
>
>
> Grant - google.com - 7029855378 - zuk...@gmail.com - 2332
> oakland st
> - -
>
>
> {% for customer in customers %}
> {{ customer.NAME }} - {{ customer.W
Hi Guys,
I need to replace results in a queryset and then perform counts and further
queries on the set and have been trying to find a way of doing it.
Basically in some but not all cases I get a set of results eg select * from
table and then I want to do a: case when column = 'some value' then
Hi,
On Sun, May 11, 2014 at 11:42 PM, ?manu* wrote:
> I noticed that django admin "add" page reads GET parameters and uses them
> as initial values in the form. However I was not able to pass DateTime
> values in this way. In particular if I try to pass a DateTime value I get a
> "server error".
Hello,
I have 3 project,
CentOS
Apache
Django1.6
Mod_wsgi
I have the following error:
[Tue May 13 14:43:47 2014] [warn] The Alias directive in
/etc/httpd/conf.d/wsgi.conf at line 17 will probably never match because it
overlaps an earlier Alias.
This is my the : /etc/httpd/conf.d/wsgi.conf
39 matches
Mail list logo