Re: Pip installation

2019-01-13 Thread 'Amitesh Sahay' via Django users
Hello Kidwell,
Did you receive any message by chance that says " "You are using pip version 
x.x.x, however version x.x.x is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' 
command""?where x = version of the existing pip version on your machine and the 
version on which the error is asking you to update to.


Regards,
Amitesh Sahay91-750 797 8619 

On Saturday, 12 January, 2019, 6:14:55 PM IST, Kidwell Nyatsambo 
 wrote:  
 
 Pip installation refusing to install on Windows 10. 
Coming with this message;

Please help. 
Thank you in advance 
Kidwell 



-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKdOBrj0YPCKaW7O26fBPTJwhBow5c0cF6M%2BeHwOzMHE-7bX%2BA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
  

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/750765714.16495465.1547371117623%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.


Using Django

2019-01-13 Thread George Githaiga
I have Django-apps on my root directory.I need to proceed to the 
environment.Kindly guide.

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d3bb2a61-125e-4db4-9721-564e482c9497%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using Django

2019-01-13 Thread Kasper Laudrup

On 13/01/2019 05.36, George Githaiga wrote:
I have Django-apps on my root directory.I need to proceed to the 
environment.Kindly guide.




https://stackoverflow.com/help/how-to-ask

Kind regards,

Kasper Laudrup

--
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a30982e9-0cb4-da78-6cd6-4fc0b540e0ca%40stacktrace.dk.
For more options, visit https://groups.google.com/d/optout.


keep getting an error on there is no module

2019-01-13 Thread Saeed Pooladzadeh


:In my Django project while I have made an app named employee. And have 
registered it in my apps but I keep getting this error:

No module named 'employee'

Leading to the app not being able to run properly.


please inform.

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7273ab19-1c0f-4e7e-9cb7-177a48da3a69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django-error about files

2019-01-13 Thread tarikkantar25
Hello, Could you please help me why I cant open manage.py file? You can 
find the problem easily through this screen shot below.

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/490bf702-ea77-47c4-987a-a741f39ea5e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django-error about files

2019-01-13 Thread Nebojsa Hajdukovic
you need to be inside of your project's folder, not users\asus

нед, 13. јан 2019. у 20:59  је написао/ла:

> Hello, Could you please help me why I cant open manage.py file? You can
> find the problem easily through this screen shot below.
>
> --
> 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 email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/490bf702-ea77-47c4-987a-a741f39ea5e7%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJ60hW2HHqWYETW8LspRV1ujS-FLDYNbyK6GTSQX1dUeq6WjPw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django-error about files

2019-01-13 Thread kennedy kay
This is most probably because you are not in the directory containing 
manage.py

Ensure you are in the directory containing 'manage.py'
To do enter the command >dir
see if the list of files in that directory contains manage.py
If not, then >cd nam-of-folder-containing-manage.py

Voila.

On Sunday, January 13, 2019 at 9:00:17 PM UTC+1, tarikk...@gmail.com wrote:
>
> Hello, Could you please help me why I cant open manage.py file? You can 
> find the problem easily through this screen shot below.
>

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3ef8aecf-1b0a-44f8-bf14-15aad0a73048%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: keep getting an error on there is no module

2019-01-13 Thread Nebojsa Hajdukovic
when you get this error, when want to run the server?
do you have any models inside of that app?


нед, 13. јан 2019. у 16:28 Saeed Pooladzadeh  је
написао/ла:

> :In my Django project while I have made an app named employee. And have
> registered it in my apps but I keep getting this error:
>
> No module named 'employee'
>
> Leading to the app not being able to run properly.
>
>
> please inform.
>
> --
> 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 email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/7273ab19-1c0f-4e7e-9cb7-177a48da3a69%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJ60hW1uqvUKcy3UR0ppEgkCC968Q74zttpfmkcMxrPmW_pYQg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django-error about files

2019-01-13 Thread Tarık Kantar
All right! Could you please say how can I am inside of my project’s folder?
I actually new for using these processes. Thank you so much.

On 13 Jan 2019 Sun at 21:01 Nebojsa Hajdukovic 
wrote:

> you need to be inside of your project's folder, not users\asus
>
> нед, 13. јан 2019. у 20:59  је написао/ла:
>
>> Hello, Could you please help me why I cant open manage.py file? You can
>> find the problem easily through this screen shot below.
>>
>> --
>> 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 email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/490bf702-ea77-47c4-987a-a741f39ea5e7%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJ60hW2HHqWYETW8LspRV1ujS-FLDYNbyK6GTSQX1dUeq6WjPw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Tarık Kantar

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGgwCPFC23%2BxGkOoMjw6pRs8DRquepwTa46NaS%2BJ7uk-DAarxQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


order_by function gets error if the field name or json key, has a dash.

2019-01-13 Thread Jonathan Espinal
order_by function gets error if the field name or json key, has a dash.


I know Django use a dash for asc or desc methods. but in this case the dash 
is in the middle.


EXAMPLE:

MyTable.objects.all().order_by('myfield__en-us')

I have a jsonb field like:

{
"es": "Casa",
"en-us": "House"
}



Does anybody know how to fix it?
I can't change de json structure :(


Thanks.

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9cd9ae56-5529-4915-b91a-5703926e58de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: order_by function gets error if the field name or json key, has a dash.

2019-01-13 Thread Jason
I think the easiest way would be to convert the dash to an underscore to 
follow python standards when it comes to naming.  reason being, a dash is 
analogous to the subtraction mathematical operation so you're requiring 
python to know the difference in the usage of this character in names and 
operations.

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/607c1021-bde0-4dbd-ac16-415eca8606c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Set default value in field dependant on another model?

2019-01-13 Thread Lachlan Musicman
We have two models: Resources and Quota

Resources model instances include:
- red things
- yellow things
- blue things

Quota have two fields, one is a FK to a Resource, the other is "desired
quota".
When instantiating the Quota request form, we create a form for each
Resource.

I'd like to autofill the "desired quota" field on each form, but make it
dependent on which Resource it is representing.

IE, when someone makes a resource request, we expect them to want

1 red thing
5 yellow things
10 blue things

Do some searching, there's a lot pointing to Signals, but I remember
someone once saying "if you are using signals, you should re-write you
logic" or somesuch, so I thought I'd ask here.

FWIW - and this is well beyond my control - we are on Django 1.8

Cheers
L.

-- 
--
"The fact that you're still saying something like 'feminism gone mad'
suggests that feminism hasn't gone mad ENOUGH yet."

Helen Zaltzman / @HelenZaltzman
https://twitter.com/HelenZaltzman/status/1065384934846545920

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGBeqiNqNz244qXHzvXPpqZQ8iS6iE82X5CO87kfZ4o7KGpPDQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


migrate failed due to Permission

2019-01-13 Thread ANi
Hello.

I want to migrate all tables into new database but bumped into an error 
that it said "auth_permission" is not found.
Then I searched for the possible causes, it turned out that it is because I 
accessed the auth model "Permission" in my code before the migrate creating 
table in database.
I tried to run *python manage.py migrate auth, *but nothing changed.

So maybe I have to change my code ... I have to filter out managers by its 
permission.

manager_permission = Permission.objects.get(codename='manager')
managers = User.objects.filter(project=project).filter(user_permissions=
manager_permission)

User.user_permissions is only allowed to use the permission code which 
could be different every time I re-migrate the whole database.

So I am asking if there is a better way to filter out managers by its perm 
or other solutions ? :)

Thank you in advance.





-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1fa0e7fb-30fc-487f-8fae-1e23183476a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.