As far as I know you also need to declare the app_label for each model
class Meta:
app_label = 'your_app_name_here'
On Mon, Aug 7, 2017 at 4:15 PM, Andréas Kühne
wrote:
> Ok,
>
> Regarding point 2 there - have you added the models to the __init__.py
> file?
See:
https://stackoverflow.com/questions/8953119/python-waiting-for-external-launched-process-finish
François
> On Aug 7, 2017, at 2:35 PM, Ronaldo Bahia wrote:
>
> How can I do that?
>
> Ronaldo Bahia
> +55 11 3280 6971
> +55 11 963 622 581
>
> Materiais
Hey,
I am building an app where a user needs to create Bundle models. I am
providing a Bundle detail view with options for the user to add components
or edit the components in their Bundle model. I currently have it where
any signed in user can access these bundles. I would like to restrict
I have been working on a django application for several months, learning as
I go. I have run into a problem now and I'm not sure what I should be doing
next.
Up until now my admin has worked, but I had a problem and a colleague told
me he was pretty sure it was a pycharm bug. He suggested
According to Django documentation it's possible. filter_horizontal is
supposed to extend to InlineModelAdmin. But I've been at a pretty bad
stopping point of not knowing the syntax for how to get this to work, and
not being able to even find an example of someone doing this.
I have a model
I'm working on a project that was built using an earlier version of django.
My environment has the latest Django version (1.11.4).
When I try to "python manage.py runserver" I get this:
Unhandled exception in thread started by > 0x7fb1dab36cf8>
>
> Traceback (most recent call last):
>
> File
I have a generic detail view serving content for 'project' to an HTML
template with the following code:
{% for detail in project.projectdetail_set.all %}
{% for image in detail.projectdetailimage_set.all %}
do something with image
{% endfor %}
{% endfor %}
and my models look
Have you added the application your models belong to to the INSTALLED_APPS
part of settings.py? And have you added the models file in that application?
Regards,
Andréas
2017-08-07 21:33 GMT+02:00 :
>
> I have been working on a django application for several months,
I don't know why but if I set the string ("cv.pdf"), it process just fine.
If I use a variable instead, it doesn't.
Here is the working code:
# convert to PDF
env = os.environ.copy()
env['HOME'] = '/tmp'
subprocess.Popen(["unoconv","-f", "pdf", "-o", "cv.pdf","%s"
>From https://bitbucket.org/schinckel/django-timedelta-field: "If you are
using Django 1.8 or greater (and you really _should_ be), then you should
use the included DurationField() instead of this. This field does not work
with Django 1.10, and will probably not be updated to fix the issue(s).
Turns out unoconv takes 2 seconds to perform the file conversion.
So after the file conversion, I had to set time.sleep(3) before upload a
file to S3.
And after 1 week I got this working using variables.
Thanks
*Ronaldo Bahia*
+55 11 3280 6971
+55 11 963 622 581
*Materiais gratuitos para o
Ok,
Regarding point 2 there - have you added the models to the __init__.py
file? Imported them as in:
from .model1 import Model1
As far as I have seen, this is needed to make sure the migrations can
detect the models.
Regards,
Andréas
2017-08-07 22:09 GMT+02:00 :
You'll have to profile and see what's slow.
On Mon, Aug 7, 2017 at 4:55 PM, Matthew Pava wrote:
> I suppose that helps a little bit. I added the loaders option with
> Debug=True. I assume that enables the cache loader.
>
> Any other ideas? The speed different is really
Andreas,
The apps are included in the INSTALL_APPS in settings.py
With regard to the models file, I'm not sure what you are referring to. In
my application there is a driectory 'models' and in that directory, there
is a separate file for each model and inside each of those files there is a
That’s a great idea. How do you do that programmatically?
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of "? ? (roboslone)"
Sent: Monday, August 7, 2017 4:32 PM
To: django-users@googlegroups.com
Subject: Re: Django Python OSError No such
thanks a lot:
p = subprocess.Popen(('someprog.exe', str(i))
p.wait()
*Ronaldo Bahia*
+55 11 3280 6971
+55 11 963 622 581
*Materiais gratuitos para o RH:*
- ROI - Melhorando Indicadores no RH
Well, yeah, you're using local path basically. And you should NEVER use
.split('/')[-1] to determine file basename, take a look at os.path module
instead.
But that's not the point. You should try to use absolute path, I believe it
would do the trick.
> On 4 Aug 2017, at 17:49, Ronaldo Bahia
I use django-guardian for object level permissions and it works
surprisingly well
On Mon, Aug 7, 2017 at 4:59 AM, Antonis Christofides <
anto...@djangodeployment.com> wrote:
> Hello,
>
> This is a tricky issue and we need to start from the basics. You already
> know the basics, but they bear
class EvalState(models.Model,AtlasBaseHelper):
"""
Represents Eval State:
ACTIVE
INACTIVE
DELETE
NA
"""
name = models.CharField(max_length=32, unique=True)
friendly_name = models.CharField(max_length=32, unique=True)
description =
Hello,
This is a tricky issue and we need to start from the basics. You already know
the basics, but they bear repeating. (Related questions are relatively common,
which is why this is something like the third time I'm pasting this information
here).
> As you know, RDBMS's keep their own
Can you just give an Example for this taking a Query.
On Monday, August 7, 2017 at 3:37:04 PM UTC+5:30, lemme smash wrote:
>
> i meant EvalState model
> if name attribute on it is a ForeignKey you should get corresponding
> queryset of model it links to
> if it's charfield, you should use text
Some steps are outlined in https://code.djangoproject.com/ticket/25313.
On Friday, August 4, 2017 at 3:37:08 AM UTC-4, Mike Dewhirst wrote:
>
> I have read widely (including the docs) and been daunted by the notion
> of coverting auth.user into a custom user. I have data and wonder if
> there
On 7/08/2017 4:43 PM, guettli wrote:
Hello this post is now four days old. I would like to hear from other
people.
Something like:
"I have no clue what you are talking about" or
"I understand your concerns, but I have no clue, too" or
"Thank you about talking about this, this raised my
Hi,
I understand your concern, however I would like to learn more about how you
intend to solve the problem. The only way I could see a solution would be
to change the database user depending on which application user is logged
in. That would mean updating users and permissions in the database
Hi
That sounds like a good idea. I will check.
Thank you!
On Monday, August 7, 2017 at 9:53:10 AM UTC+2, Andréas Kühne wrote:
>
> Hi,
>
> This sounds a bit like the problem we had with sessions when we tried
> using dynamodb for a session store. We reverted to using redis instead, so
> I
Hi,
This sounds a bit like the problem we had with sessions when we tried using
dynamodb for a session store. We reverted to using redis instead, so I
don't really know how to solve your problem, but I would take a look at the
session store. It could be as easy as some of the sessions were
Hello this post is now four days old. I would like to hear from other
people.
Something like:
"I have no clue what you are talking about" or
"I understand your concerns, but I have no clue, too" or
"Thank you about talking about this, this raised my awareness"
would make me happy.
Thank
I have no expertise in the field, but I've chosen not to let that stop
me from making a suggestion :-)
How about splitting the difference:
1. Assign & track permissions on the application side, then
2. Pass the permission level/parameters into a Stored Procedure in the
database
If the
i meant EvalState model
if name attribute on it is a ForeignKey you should get corresponding
queryset of model it links to
if it's charfield, you should use text choices
On Monday, August 7, 2017 at 6:22:50 AM UTC+3, Arun S wrote:
>
> The Models Look like this :
>
> stage_state =
you didn't show me a model structure, you just showed another model, so I
can't give you example without picture of what's going on there
On Monday, August 7, 2017 at 1:39:49 PM UTC+3, Arun S wrote:
>
> Can you just give an Example for this taking a Query.
>
>
>
> On Monday, August 7, 2017 at
Hi guys, I create an app for register User named "account" this app works
perfectly, register user (create a user and create a profile for this
user), login user, log out user, modified password.. etc. This app has its
own template to show the form and works fine.
In my next step, I want to
31 matches
Mail list logo