Hello,
I don't know if this tutorial will help you. It helped me a lot.
https://simpleisbetterthancomplex.com/series/2017/09/25/a-complete-beginners-guide-to-django-part-4.html#sign-up
It is a very good serie teaching how to build a board.
Em quinta-feira, 30 de novembro de 2017 22:50:35 UTC-2,
;
> See
> http://musings.tinbrain.net/blog/2015/jun/10/updating-two-models-single-post/
> for proper solution.
>
> 5.11.2017 0.01 "Luiz Guilherme Schiefler de Arruda" > kirjoitti:
>
>> Hello folks,
>>
>> I'm studying Django and everything was ok until this mo
Hello folks,
I'm studying Django and everything was ok until this morning. After
creating a form using inlineformset_factory, I can't create an user. I got
this error when creating the user inside the form I've created:
Exception Value:
UNIQUE constraint failed: accounts_profile.user_id
Ana
#x27;)
>
> @property
> def foo1bar_list(self):
> qr = self.foobar_list.filter(foo__type=1)
> qr.model = Foo1Bar
> return qr
>
> def __unicode__(self):
> return "%s" %(self.pk)
And this is aparently working, but
Thanks, I saw that .model thing too, but was also unsure about it... I
might just test it.
Em sábado, 21 de abril de 2012 19h04min30s UTC-3, akaariai escreveu:
>
> On Apr 21, 8:35 pm, Arruda wrote:
> > Should I create this many-to-many table as a normal model(no proxy) and
> s
ad of Foo?
Or should I use only FooBar as many-to-many and create some specific
queries that would convert ALL the returned foo objects as Foo1 instance?
And if I'm going to have not only Foo1 proxy model, but Foo2, Foo3, and
Foo4 and maybe Foo5... which approach is the best?
And of co
s they are called etc...
>
> http://docs.python.org/library/profile.html#module-profile
>
> Regards
> Phil
>
> On 17/04/2012 13:48, Arruda wrote:
>
> yes, I see, but how can I measure this? Do you know the function that is
> used?
> Thanks for the help.
>
&g
In terms of performance, I suggest trying out both approaches and
> measuring the time taken to do it a few hundred or thousand times and
> compare.
>
> Regards
> Phil
>
>
> On 16/04/2012 17:55, Arruda wrote:
>
> Hummm, I see, thanks for that, I didn't know about t
example:
>>
>> >>> class X(object):... a = 1
>> Is exactly the same as doing...>>> X = type('X', (object,), dict(a=1))
>>
>> No exec required...
>>
>> Regards
>> Phil
>>
>>
>>
>> On 16/04/2012
I'm doing something like this to generate some models dynamically:
SIMILAR_MODELS_TEMPLATE=
> """
> @some_decorator
> class %(PREFIX)sModel (Some_Abs_model):
> \"""%(DESCRIPTION)s
> \"""
> pass
> """
then I have a factory:
> def similar_models_factory(prefix,description):
> for
Have you ever tried model-mommy?
It's has some nice features, don't know if you find what you want there but
it's a good shot.
Em sábado, 14 de abril de 2012 08h49min06s UTC-3, jonas escreveu:
>
> Hello,
>
> I'm trying to test a function that imports and acts upon a django model,
> named House.
Sorry everyone, I just found out this was a fixed issue in the
PassThroughManager of django-model-utils, in 1.1.0 it adds also the
queryset to the related.
=)
Em segunda-feira, 16 de abril de 2012 00h08min03s UTC-3, Arruda escreveu:
>
> Hi there, I don't know if I put the right tit
Hi there, I don't know if I put the right title, so here is what I'm stuck
with:
I have this model:
> class Foo(models.Model):
> name = models.CharField(...)
this one:
> class Bar(models.Model):
> name = models.CharField()
And their connection:
> class FooBar(models.Model):
>
Nice one this PyPy, I'll test this soon =) thanks!
Em domingo, 15 de abril de 2012 07h58min41s UTC-3, Kevin escreveu:
>
> Check out PyPy Sandboxing, it may be your best bet:
>
> http://pypy.org/features.html#sandboxing
>
>
> On Saturday, 14 April 2012 11:45:41 UTC-5, Ar
oh, I see, but the problem is that I need this scripts to be ran often and
if I make a request to a sandbox, and then this sandbox send other requests
to my server getting and changing data(since some scripts change the data
of my server) this would take too long, and make the server unable to r
Is this what you're talking about?
https://developers.google.com/appengine/docs/python/overview
Still don't understand how this would be used.
Em sábado, 14 de abril de 2012 14h19min01s UTC-3, Andy McKay escreveu:
>
> That's not something I'd ever recommend an untrusted user do. There
> are still
Hi there, I'm doing a system where I want the users to be able to
set/change some scripts that are dynamically run(RPG like scripts).
So a user can change the way the Kill_a_player script is run.
I thought of doing this by using exec, like this:
class Script(models.Model):
> script_py = mod
ame server and same process?
>
> That is why there exists things like django-celery and rabbitmq (message
> broker). How they work is already explained to you.
>
> 20.3.2012 16:52, Arruda kirjoitti:
> > Thanks every one, I've manage to work this around.
> > The soluti
s UTC-3, Ejah escreveu:
>
> You can set your logging params at the bottom of your settings.py
> file. Here you can determine when, how and where django will log.
> Hth
>
> On 7 apr, 00:04, Arruda wrote:
> > Hi there, I'm using nginx and fastcgi(using threaded me
Hi there, I'm using nginx and fastcgi(using threaded method) to run a
django project, but when another thread start I get some erros.
But I don't know if this is a thread problem or a db problem or what...
But wanted to know if there is someway to get log from the production
server.
When I use r
use it xD).
Thanks!
Em terça-feira, 20 de março de 2012 12h01min47s UTC-3, Javier Guerra
escreveu:
>
> On Tue, Mar 20, 2012 at 9:52 AM, Arruda
> >
> wrote:
> > But I still wanted to know how to use the celery in this case =/
>
> the idea is to use a Queue:
>
>
nda-feira, 19 de março de 2012 15h18min09s UTC-3, Arruda escreveu:
>
> *(I've created a topic like this a few minutes ago, but was using the old
> google groups, and now it's broken. So I created a new one using the new
> google groups).*
> Hi, I'll try to explain th
min03s UTC-3, Kurtis escreveu:
>
> Did you check out django-celery yet?
>
> On Mon, Mar 19, 2012 at 2:18 PM, Arruda wrote:
>
>> *(I've created a topic like this a few minutes ago, but was using the
>> old google groups, and now it's broken. So I created a new one usin
*(I've created a topic like this a few minutes ago, but was using the old
google groups, and now it's broken. So I created a new one using the new
google groups).*
Hi, I'll try to explain the best I can my problem, and I don't know if
what I'm trying to archive is the best way to get where I want
Hi, I'll try to explain the best I can my problem, and I don't know if
what I'm trying to archive is the best way to get where I want, but
here is it:
I want that a specific view to run in a new thread, ex:
def foo(request):
do_something_slow()
return httpResponse
But I DON'T want that a
Hi there everyone, I'm trying to make my first deploy of a project,
and encountered some problems.
Here is the scenario:
I read that to make uploaded files only accessible for the
uploader(the user) was a better choice to use nginx(apparently more
easy to configure).
But after following a couple of
ust do pip:
pip install django-structurer
Here is the repository: https://github.com/arruda/django-structurer
for the ones that are willing to help.
And the docs: https://github.com/arruda/django-structurer/wiki/Docs
Hope it helps you all, and if you want you can create your own project
structur
Humm, I see, the second case I could make out of it somehow(just have
some doubts in 2.5: How am I supposed to do this?)
The first one I could't see how I'm not going to lose the changes,
done in cache.
My biggest problem is in altering some value in some models, since
this operation will be done m
y app which spares you from
> reinventing the wheel:http://bitbucket.org/kmike/django-cache-utils/
>
> Cheers,
> AT
>
> On Thu, Aug 18, 2011 at 10:22 AM, Felipe Arruda <
>
>
>
>
>
>
>
> felipe.arruda.pon...@gmail.com> wrote:
> > Hi there, I was
Hi there, I was doing some project recently and faced a problem of
performance.
I need to be able to do a lot of access to some information on the DB,
almost all the time, and doing so seams to be taking too long.
Is it possible do do something like this:
Get the infos from the BD and put them in
Hi there, I'm new here and kind of new to Django too, but after
messing with other things like Java, I was impressed in the agility
and facility that Django does things.
So here is the deal, I'm trying to create a site that allow the users
to have something like a small personal system.
And each s
Hi,
I'm coming to django from grails, in which which I used an in-memory
hsql database for development and in my startup script I initialized
the in-memory database with some stub values/users that were inserted
everytime I started the server. This setup was really helpful in early
stage devel
32 matches
Mail list logo