The code runs and all fields except the manytomany field is written into
the mysql database. I am posting json to the django backend which will be
written into the database. For more information:
https://stackoverflow.com/questions/71849923/django-serializer-inserting-nothing-into-database-no-er
I hope to increase OneToOne mode GenericForeignKey,
For example, a passport (one user has only one passport, but there are many
user roles, such as staff, drivers, customers, but they are one to one)
--
You received this message because you are subscribed to the Google Groups
"Django users" gro
Hola que tal.
Si es posible.
Checa este video
:
https://codigofacilito.com/videos/18-curso-django-crud-con-dos-formularios-parte-2
Creo que es lo que buscas.
Saludos.
On Thursday, July 27, 2017 at 5:38:43 PM UTC-5, Nelson Fernando Garcia
Gomez wrote:
>
> hola Buenas soy algo nuevo en django
8d0cd8ffc78b531
(get_model(, ) was messier, due to the need for exception
handling).
On Friday, August 29, 2014 10:57:05 AM UTC-4, Alex Chiaranda wrote:
>
> Hi, can't you guys mock these models ?
>
> On Thursday, August 28, 2014 9:31:04 PM UTC-3, Yo-Yo Ma wrote:
>>
>> Ugh...
Ugh... same problem here. It seems you can't really create a model in setUp
anymore. I'll post a reply, if I find anything.
On Wednesday, July 16, 2014 10:17:56 AM UTC-4, Alisue Lambda wrote:
>
> Hi all.
>
> Well today I tried Django 1.7c1 with my program and found that the
> previous testing s
Hello, I know there are a bunch of threads on this topic (on stacked
overflow at least), but I am having trouble understanding something.
In this post:
http://stackoverflow.com/questions/1921523/django-what-is-the-difference-b-w-httpresponse-vs-httpresponseredirect-vs-rende
-- the accepted
I might be worth checking out some sort of API library, like
https://github.com/orokusaki/django-jsonrpc-2-0, which will allow you to
perform whatever business logic you need to, and then simply return
something like {"success": True, "errors": errors_list} - your templates
and ordinary views c
Hi,
I have a question about the internationalization feature ...
I have a country model:
class Country(models.Model):
nameKey = models.CharField(max_length=50)
shortNameKey = models.CharField(max_length=30)
The properties 'nameKey' and 'shortNameKey' contain resource keys like
'_country
Thanks, Tom. That does help.
On Wednesday, September 5, 2012 6:02:27 AM UTC-4, Tom Evans wrote:
>
> On Wed, Sep 5, 2012 at 1:45 AM, Yo-Yo Ma >
> wrote:
> > restaurant =
> >
> Restaurant.objects.select_for_update().select_related('owner').get(name=u'
restaurant =
Restaurant.objects.select_for_update().select_related('owner').get(name=u'Koala
Kafe')
Assuming the ``owner`` field points to a ``Person`` table, will the
aforementioned query prevent the ``Person`` row returned for the Koala
Kafe's owner from being saved in a separate transaction
Given a model ``Employee`` with a foreign key ``company`` pointing to a
model called ``Company``, would the following example lock both the
``Employee`` and ``Company`` rows that were selected?
employee =
Employee.objects.select_for_update().select_related('company').get(pk=1)
Or, would only t
Example:
Company has many Tickets
Tickets have a PK, as well as a "number".
Each Ticket's "number" should be the highest prior "number" for a
Ticket with the same Company
Ticket: pk: 1, number: 1, company: XYZ
Ticket: pk: 2, number: 1, company: Acme
Ticket: pk: 1, number: 2, company: XYZ
unique_
request.GET.get('subtopic') is returning a string, so your if
statement is roughly equivalent to:
>>> 1 == '1'
False
The sub_topic = int(request.GET.get('subtopic')) is the correct way to
do that. At first glance it seems like a lot of work, but if Django
tried to deserialize URL params automatic
Thanks guys. I appreciate the help.
On Sep 29, 6:43 am, bruno desthuilliers
wrote:
> On 29 sep, 12:31, Steve Holden wrote:
>
> > On 9/29/2010 5:25 AM, Daniel Roseman wrote:
> > > You can use the get_all_field_names method in model._meta to get all
> > > the actual fields, and set them on the dup
csrf_token template tag, as well as those that accept the POST data.
>
> You're seeing the help section of this page because you have DEBUG = True in
> your Django settings file. Change that to False, and only the initial error
> message will be displayed.
>
> You can cust
(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
Anyone have any thoughts.
--
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.
For more opti
Let's say I have a model with a field called "status". I could set the
choices in three ways:
1) status_choices = ((1, 'Completed'), (2, 'Unfinished'), (3,
'Cancelled'))
2) status_choices = (('COM', 'Completed'), ('UNF', 'Unfinished'),
('CAN', 'Cancelled'))
Or, 3 ):
db_choices = Choice.obj
Hey Russell,
Do you think a round table discussion in a real person context with
whiteboards and the best of the bunch (ie, at Django con or similar
event) would be a good time/place to re architecture of the
abstraction layers, perhaps to address some of the concerns brought up
in the slide show
Any thoughts on this?
On Sep 22, 10:47 am, Yo-Yo Ma wrote:
> Anyone know how to do this?
>
> On Sep 21, 10:35 pm, Yo-Yo Ma wrote:
>
>
>
> > I have a model with:
>
> > parent = ForeignKey('self', blank=True, null=True)
>
> > In that model I
Anyone know how to do this?
On Sep 21, 10:35 pm, Yo-Yo Ma wrote:
> I have a model with:
>
> parent = ForeignKey('self', blank=True, null=True)
>
> In that model I've overridden clean() to contain:
>
> if self.parent:
> # Do some stuff
>
> It ra
I have a model with:
parent = ForeignKey('self', blank=True, null=True)
In that model I've overridden clean() to contain:
if self.parent:
# Do some stuff
It raises an attribute error saying that parent.pk doesn't exist. How
can I get around this. Note that my foreign key is recursive.
--
This might not be any help since I know nothing of VOIP, but for the
chat portion take a look in to Ape ( a comet server written in C ).
On Sep 16, 9:41 am, Sithembewena Lloyd Dube wrote:
> Indeed it is, but the media server isn't :).
>
> On Thu, Sep 16, 2010 at 5:35 PM, esatterwh...@wi.rr.com <
Anyone?
On Sep 15, 1:18 pm, Yo-Yo Ma wrote:
> I'm wondering how to do this:
>
> instance = SomeModelWithFile.objects.create(
> file = some_file,
> spam="Spam",
> foo="Foo"
> )
>
> How can I manually pass in a file like this?
I'm wondering how to do this:
instance = SomeModelWithFile.objects.create(
file = some_file,
spam="Spam",
foo="Foo"
)
How can I manually pass in a file like this? In file=some_file should
some_file be a FileUpload instance? How do I create one of those?
--
You received this mes
I haven't tried http://code.google.com/p/django-nav/ but I would
imagine that it probably has issues because it hasn't changed since
2007. Does anyone know if there is a very intuitive navigation helper
like this, but newer?
--
You received this message because you are subscribed to the Google Gr
I'm wanting to build out a list template that can display any list of
objects in this manor (pseudo code:
{% for thing in things %}
{{ thing.foo }}
{{ thing.bar }}
{{ thing.spam }}
{{ thing.eggs }}
{% endfor %}
The problem is, of course, that I want to list more than just "thing
This thread shows a very prevalent side of most developers that makes
me ashamed to tell people that I'm a developer.
The OP is not saying that we should go out and advertise that Django
is a great CMS. In fact he spends half of his post making trying to
preemptively shut all the know-it-all folks
You bring up a very interesting question It seems to make little sense
to put this kind of data into a table of it's own. The ORM usually
maps a class to a table. in this case you want to map the class to a
group of columns in a single table.
How do you use a class based compound data type and s
ulipad !!
2009/9/7 Samuel Hopkins
> Hello Django peeps,
>
> I am a Django newbee. I have had my eye on Djanjo for a year or so now but
> held off because I had limited python experience. However, after a summer of
> python and watching Django's popularity snowball, I think I am ready to go
> :)
Hi,
Since our management team is trying to select the platform for
further development, I'm in process to prepare the case
( presentation) Django vs. WObject(s).
Though both frameworks seems to be very similar in the goals, they are
obviously quite different in their internals.
I'm wondering
Does the development enterprise application have the available report
library?
--~--~-~--~~~---~--~~
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
T
Thank you!
On Thu, Oct 23, 2008 at 2:21 PM, web_geek <[EMAIL PROTECTED]> wrote:
> hi,
>
> I'm running Django-1.0-1.el5 and mysql-5.0.45-7.el5 on a Red Hat
> Enterprise Linux 5.2 box. Some how I still confuse what must be done
> to set up Django to talk to MySQL. May I ask for your advice about
>
In django ;How to compare datetime.datetime and datetime.date
--~--~-~--~~~---~--~~
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 fro
I need to add some checkboxes to filter the change-list in django admin. I
extend "admin/change_list.html" in order to avoid write
codes myself. Please give me some simple way to achieve that.
--~--~-~--~~~---~--~~
You received this message because you are subscribe
I do not know if a decision has been made on the ajax framework in 1.0.
Anyone knows some message about this.
By the way, how about the Eclipse + pydev comparing with the Wing IDE?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goo
what's the pure-HTTP deployment mean???
On 12/21/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote:
On 12/20/06 10:46 PM, Jeremy Dunck wrote:
> http://us.pycon.org/TX2007/TutorialsPM#PM1
Oh, God -- who the hell put *that* picture there? I have got to change that...
Jacob
>
--
[EMAIL PROTE
you need the python with data module.
On 11/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Thanks James,
>
> I figured it out after a while, but it seems not to be a good idea to
> install development version. I did that and made a mess of my computer.
> I guess there is a version catch u
what are you want to say?
On 6/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hello,
> I am working on a cms that would involve several sites. I am wanting
> to filter several things by site, but the domain names are sometimes
> too long and run off the side of the filter box. I was wo
I think django has automatic CRUD method to any DB object,
So, without DB maybe so diffcult on It's archieve .
On 5/12/06, Peter Ma <[EMAIL PROTECTED]> wrote:
> can Django's database-roadmap add XML or CSV ./etc
>
> On 5/12/06, Vladimir Pouzanov <[EMAIL PROTECTED]
can Django's database-roadmap add XML or CSV ./etc
On 5/12/06, Vladimir Pouzanov <[EMAIL PROTECTED]> wrote:
>
> You can use sqlite, fast and easy db interface.
>
> On 5/12/06, Anja <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> > we are thinking about creating a small application with Django and
> > de
expect solutionthe same question 2006/1/17, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
Actually, I had messed up my DocumentRoot and /etc/host file which waspointiong to my PHP projects path. The Welcome screen was from symfony
framework, which I had installed previously.Now, after I fixed it, I'm gett
The same question I meet, not resolve yet
OS is debian SID
error: invalid Python installation: unable to open
/usr/lib/python2.4/config/Makefile (No such file or directory)
45 matches
Mail list logo