Re: Recognize Tags in templates

2021-10-28 Thread N'BE SORO
Hello
Django tag is: {%  %}

Le jeu. 28 oct. 2021 à 14:48, Keila Z. Carpio T.  a
écrit :

> Good morning,
>
> Hello Everybody,
>
> I use the tags to templates but it is being recognized for Server to show
> content
>
>
>
> Please Help me.
>
> Greetings,
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/427f3c64-923a-4d31-89ed-17a5d9536eb8n%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOtSHp_Y-vYDJuNp9WqzuX6RBHKg%2Bp0QsLsqEEMOV7V%2BFQs-SQ%40mail.gmail.com.


Re: Django jinja queryset filter lenth

2020-08-12 Thread N'BE SORO
thank you

Le dim. 9 août 2020 à 09:12, Liu Zheng  a écrit :

> Hi,
>
> Not sure it's a good idea to do database query inside the template.
> Templates are capable of running some logics but for a heavy-lifting job
> like database query, it should be a good practice to do it in the view, and
> only pass the results to the template.
>
> On Sun, Aug 9, 2020 at 4:30 AM Agoua David  wrote:
>
>> As Django template engine do not support the parenthèses you Can try to
>> make a custom filter
>>
>> Le sam. 8 août 2020 à 20:27, Agoua David  a
>> écrit :
>>
>>> You Can try to use .count instead
>>>
>>> Le sam. 8 août 2020 à 17:56, N'BE SORO  a écrit :
>>>
>>>> Good evening please
>>>>
>>>> Can you help me?
>>>>
>>>> I want to display the number of items with a filter.
>>>> Example:
>>>> this call returns 4 elements
>>>> {{ item.class.classecours.all|length}}
>>>>
>>>> at the .all level
>>>> make an item.class.classecours.filter(status==True)|length
>>>>
>>>> --
>>>> 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 view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-users/CAOtSHp_wH9Xy-sf9t%2BMdtWB-bnRX680R9iJwZAnyZXh%3DxV%3De%3Dg%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAOtSHp_wH9Xy-sf9t%2BMdtWB-bnRX680R9iJwZAnyZXh%3DxV%3De%3Dg%40mail.gmail.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAByCr6iR%2BKojR-csC3Rv5zqYd7mUG4%2B%2BnvEcM_ebZmM%2BceRmsw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAByCr6iR%2BKojR-csC3Rv5zqYd7mUG4%2B%2BnvEcM_ebZmM%2BceRmsw%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAGQ3pf-MmY%2BnNLEZHEyyPGE46%2Bv9s52Vvic2AfhdDGJ36Jwr4g%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAGQ3pf-MmY%2BnNLEZHEyyPGE46%2Bv9s52Vvic2AfhdDGJ36Jwr4g%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOtSHp9zgGBR85erJTAdbCv6aGJtkiK_du%2BEOnvgweZuengjgQ%40mail.gmail.com.


Django jinja queryset filter lenth

2020-08-08 Thread N'BE SORO
Good evening please

Can you help me?

I want to display the number of items with a filter.
Example:
this call returns 4 elements
{{ item.class.classecours.all|length}}

at the .all level
make an item.class.classecours.filter(status==True)|length

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOtSHp_wH9Xy-sf9t%2BMdtWB-bnRX680R9iJwZAnyZXh%3DxV%3De%3Dg%40mail.gmail.com.


Apprendre Django en ligne avec un professionnel

2020-05-31 Thread N'BE SORO
Bonjour chers tous, 
Ce message s'adresse au débutant en Django qui veulent se former avec 
l'assistance en ligne d'un professionnel. 
Vous voulez apprendre à développer en Django et mettre en production votre 
site ? 
Alors prenez connaissance avec notre programme de formation: 
https://lnkd.in/dcmFzfy 

 Inscrivez vous pour participer à notre séance d'échange : 
https://lnkd.in/dH-QCkJ 


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4e4efd87-e9f1-4196-945a-9d0200f07836%40googlegroups.com.


Django channel and gunicorn

2020-03-18 Thread N'BE SORO
hi i have a problem with django channel and gunicorn.

I don't know how to configure my project so that the websocket can pass.


thank you.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOtSHp9N%3DoDWVLuj-wK4Aqi6b5AqmLfB_wB14OjoGeza3Y5cdw%40mail.gmail.com.


Re: French Open Source ?

2020-03-16 Thread N'BE SORO
Ok

Le lun. 16 mars 2020 à 21:49, Florent Vandroy  a
écrit :

> Je préférerais un projet en petit comité, ambiance start-up
>
> Le lun. 16 mars 2020 à 22:38, Ysahiro Yasuo  a
> écrit :
>
>> Cherche *Zulip master* sur Github. C'est un projet Django open-source tu
>> peux cloner le depot en local.
>>
>> On Mon, Mar 16, 2020, 21:12 Florent Vandroy 
>> wrote:
>>
>>> Sorry but this message is for the french member, so i will write in
>>> French.
>>>
>>> Bonjour à tous,
>>> Je recherche un projet open source afin de continuer à développer mes
>>> compétences sous Django, je peux rejoindre discord, slack ainsi que tout
>>> autre moyen de communication si nécessaire.
>>> J'attends et espère être recontacté sous peu.
>>>
>>> Merci
>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/a341c72a-0d55-46f4-ad29-b0459a7986e2%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAACLQtK1VODQTeMzqkzYBSTmEw71iyPTamjd-t9Z1rdGb7%3Dbog%40mail.gmail.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAE8WgOMPHQn371i%2BAcDUwo4DkrdUCwZhHx0TvHbh585LxV2bYw%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOtSHp9C2Gm4vCzLOHZJ0umLV48fMb5UpFv2_GLJ6Nw0%3Dc2RCQ%40mail.gmail.com.


Re: Working with static files

2019-10-17 Thread N'BE SORO
Hello use this tutorial
https://docs.djangoproject.com/fr/2.2/howto/static-files/

Le jeu. 17 oct. 2019 à 09:25, ISAAC NELSON S.B. KARGBO <
insbkar...@njala.edu.sl> a écrit :

> Hello everyone, i am new to Django and i am learning to develop a
> "todo_list app", but i have a problem with my css static files.
> Please help me on how to do about it.
>
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d85a4531-bca7-4912-8cba-e01620c8769a%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOtSHp-25NcEq%2BJ5-WuUPzqE74PEunEG2O_qRj%3DMd0CG0qDRjg%40mail.gmail.com.


Re: Relation between different database?

2019-09-10 Thread N'BE SORO
Ok you can add an additional column my_id and you give him the unique
property = True

Le mar. 10 sept. 2019 à 06:00, ANi  a écrit :

> my real situation as an example.
>
> *local database*
> AssetModel(id, employee, name, barcode, location, value)
>
> *remote database*
> EmployeeView(id, name, department)
>
> I am thinking to set employee in AssetModel as an ForeignKey which
> references to EmployeeView.
> but it seems to be not allowed
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4617ae94-1cf1-42be-8441-2ba84e9d04ef%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOtSHp9trTFp8ksbv2Y_TYeTHZp0gvi%3DaakN5GhgpEhBEXJPxA%40mail.gmail.com.


Re: Query into Django ORM

2019-09-10 Thread N'BE SORO
Hello please send your models example and.

Le jeu. 5 sept. 2019 à 14:56, Amit Samanta  a
écrit :

> Hi,
>
> I am facing a challenge please help me.
>
> [image: Query.PNG]
>
>
> output:
>
> [image: output.PNG]
>
> Here one env_name can have many comp name and one env with one comp_name
> there will be many deploy_details which is in green colour (latest).
>
> in deploy_detail if there is two deploy in one component we will take the
> latest deploy_date.
>
>
> Now please can anyone help me in converting this query into Django ORM and
> the models
>
> Thanks 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/db10af4c-ef4c-47cb-82fd-a442d3b381ab%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOtSHp_5uVs1zmqDz%3DXNb%3DZJmB_yvL%3DNqBt0WPtDL0nbsez0yw%40mail.gmail.com.


Re: Postgre sql problem

2019-09-10 Thread N'BE SORO
Hello.
Install *psycopg2 binary version*

Le ven. 6 sept. 2019 à 22:06, Thomas Lockhart  a
écrit :

> You need the python-devel package installed for the version of python you
> are running.
>
> - Tom
>
> On Sep 6, 2019, at 12:49 PM, Elmaco7  wrote:
>
> *Hello, I'm trying to use Postresql with my django project, but when i try
> to install psycopg2(with this command 'pip3 install psycopg2')  this
> problem appears:*
>
> Collecting psycopg2
>   Using cached
> https://files.pythonhosted.org/packages/5c/1c/6997288da181277a0c29bc39a5f9143ff20b8c99f2a7d059cfb55163e165/psycopg2-2.8.3.tar.gz
> Building wheels for collected packages: psycopg2
>   Building wheel for psycopg2 (setup.py) ... error
>   ERROR: Command errored out with exit status 1:
>command: /home/user/myproject/myprojectenv/bin/python3 -u -c 'import
> sys, setuptools, tokenize; sys.argv[0] =
> '"'"'/tmp/pip-install-t391_oat/psycopg2/setup.py'"'"';
> __file__='"'"'/tmp/pip-install-t391_oat/psycopg2/setup.py'"'"';f=getattr(tokenize,
> '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"',
> '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'
> bdist_wheel -d /tmp/pip-wheel-mkc6kj2i --python-tag cp36
>cwd: /tmp/pip-install-t391_oat/psycopg2/
>   Complete output (40 lines):
>   running bdist_wheel
>   running build
>   running build_py
>   creating build
>   creating build/lib.linux-x86_64-3.6
>   creating build/lib.linux-x86_64-3.6/psycopg2
>   copying lib/pool.py -> build/lib.linux-x86_64-3.6/psycopg2
>   copying lib/_range.py -> build/lib.linux-x86_64-3.6/psycopg2
>   copying lib/_lru_cache.py -> build/lib.linux-x86_64-3.6/psycopg2
>   copying lib/sql.py -> build/lib.linux-x86_64-3.6/psycopg2
>   copying lib/extensions.py -> build/lib.linux-x86_64-3.6/psycopg2
>   copying lib/_ipaddress.py -> build/lib.linux-x86_64-3.6/psycopg2
>   copying lib/errorcodes.py -> build/lib.linux-x86_64-3.6/psycopg2
>   copying lib/tz.py -> build/lib.linux-x86_64-3.6/psycopg2
>   copying lib/extras.py -> build/lib.linux-x86_64-3.6/psycopg2
>   copying lib/_json.py -> build/lib.linux-x86_64-3.6/psycopg2
>   copying lib/errors.py -> build/lib.linux-x86_64-3.6/psycopg2
>   copying lib/compat.py -> build/lib.linux-x86_64-3.6/psycopg2
>   copying lib/__init__.py -> build/lib.linux-x86_64-3.6/psycopg2
>   running build_ext
>   building 'psycopg2._psycopg' extension
>   creating build/temp.linux-x86_64-3.6
>   creating build/temp.linux-x86_64-3.6/psycopg
>   x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g
> -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
> -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_VERSION=2.8.3 (dt dec pq3 ext lo64)
> -DPG_VERSION_NUM=100010 -DHAVE_LO64=1 -I/usr/include/python3.6m
> -I/home/user/myproject/myprojectenv/include/python3.6m -I.
> -I/usr/include/postgresql -I/usr/include/postgresql/10/server -c
> psycopg/psycopgmodule.c -o
> build/temp.linux-x86_64-3.6/psycopg/psycopgmodule.o
> -Wdeclaration-after-statement
>   In file included from psycopg/psycopgmodule.c:27:0:
>   ./psycopg/psycopg.h:34:10: fatal error: Python.h: No such file or
> directory
>#include 
> ^~
>   compilation terminated.
>
>   It appears you are missing some prerequisite to build the package from
> source.
>
>   You may install a binary package by installing 'psycopg2-binary' from
> PyPI.
>   If you want to install psycopg2 from source, please install the packages
>   required for the build and try again.
>
>   For further information please check the 'doc/src/install.rst' file
> (also at
>   ).
>
>   error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
>   
>   ERROR: Failed building wheel for psycopg2
>   Running setup.py clean for psycopg2
> Failed to build psycopg2
> Installing collected packages: psycopg2
>   Running setup.py install for psycopg2 ... error
> ERROR: Command errored out with exit status 1:
>  command: /home/user/myproject/myprojectenv/bin/python3 -u -c 'import
> sys, setuptools, tokenize; sys.argv[0] =
> '"'"'/tmp/pip-install-t391_oat/psycopg2/setup.py'"'"';
> __file__='"'"'/tmp/pip-install-t391_oat/psycopg2/setup.py'"'"';f=getattr(tokenize,
> '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"',
> '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'
> install --record /tmp/pip-record-bl1kkv0m/install-record.txt
> --single-version-externally-managed --compile --install-headers
> /home/user/myproject/myprojectenv/include/site/python3.6/psycopg2
>  cwd: /tmp/pip-install-t391_oat/psycopg2/
> Complete output (40 lines):
> running install
> running build
> running build_py
> creating build
> creating build/lib.linux-x86_64-3.6
> creating build/lib.linux-x86_64-3.6/psycopg2
> copying lib/pool.py -> build/lib.linux-x86_64-3.6/psycopg2
> copying lib/_range.py -> 

Re: Relation between different database?

2019-09-09 Thread N'BE SORO
Hello.

Give me one example

Le mar. 10 sept. 2019 à 03:54, ANi  a écrit :

> Hi,
>
> I have my asset table in local db which need to reference to the employee
> view from another database.
> But I realized that Django might not allow relations across databases,
> right?
>
> so does it means that I can only store the employee key as string in the
> asset table?
> or other way to achieve?
>
> many thanks,
> ANi
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4cd4ea88-d6c1-42c5-92d2-f9a5b7f818d8%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOtSHp9p2jLEq-T2VmbY8mBq_H8-jjX7a2cG%2Bb5HPk-_AH5dKg%40mail.gmail.com.


Re: Django chat

2019-09-03 Thread N'BE SORO
use this tutorial, it is good

https://youtu.be/RVH05S1qab8

I followed it to realize my chat application


Le mar. 3 sept. 2019 à 15:57, parmeshwar deharkar <
parmeshwardehar...@gmail.com> a écrit :

> use the Django-channel library to making chatbot application
>
> On Tue, Sep 3, 2019 at 1:40 AM niranjan shukla 
> wrote:
>
>> Please help !!
>>
>>  As I am building a social site and I want to add a chat app so that the
>> user can chat with his friend which he follows.
>>
>> So anyone knows chat app tutorial then tell me.
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/d1e29ee4-7253-4807-b4cd-ba9cd702e8a1%40googlegroups.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAFyF%2BQhCmyit%2BBMKCQiaPM75ULBTSPV4wfwuf1a_tGL7vPoWzg%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOtSHp8cz5LwW3D8V3nuD_KFjjysKO97RbF6QuXb7c-FWbGBXw%40mail.gmail.com.


Re: reload the page and the logged in user converted to the admin

2019-08-24 Thread N'BE SORO
Hello,
Use Django login function



Le sam. 24 août 2019 à 19:12, ayoub ELMAJJODI  a
écrit :

> The problem that I have, when I logged with normal user in the
> request.user there is a current user, but if I reload the page, the
> currennt user converted to the admin ?
> Enter code here...
> def countries_rate(request):
> auth_user = request.user
> if request.user.is_authenticated:
> auth_user = request.user
> if (user_rate.objects.filter(user_id=auth_user).delete()):
> print(auth_user,' OK deleted .')
> formset = countriesFormset(request.POST or None)
> if request.method == 'POST':
> if 'Add_More' in request.POST:
> #print('--- add more in post -')
> cp = request.POST.copy()
> cp['form-TOTAL_FORMS'] = int(cp['form-TOTAL_FORMS'])+ 1
> formset = countriesFormset(cp,prefix='form')
> total = cp['form-TOTAL_FORMS']
> #print('total forms {}-',format(total))
> return render(request,'thesis_app/countries_rate.html', context={
> 'formset':formset,
> 'total':total
> })
> elif 'submit' in request.POST:
> if formset.is_valid():
> for inst in formset:
> rate = user_rate()
> if inst.is_valid():
> #answer2 =inst.save(commit = False)
> #answer2.user_id = auth_user
> countries_name_id = inst.cleaned_data.get('countries_name_id')
> country_rating = inst.cleaned_data.get('country_rating')
> rate.user_id = auth_user
> rate.countries_name_id = countries_name_id
> rate.country_rating = country_rating
> #print(auth_user,"")
> rate.save()
> return redirect('thesis_app:result')
> else:
> return redirect('thesis_app:login')
> user = request.user
> formset = countriesFormset(request.POST or None)
> return render(request,'thesis_app/countries_rate.html', context={
> 'user':user,
> 'formset':formset
> }
> )
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/62ccddff-7c4d-4fb1-96d2-431c60f6b760%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOtSHp9Jb%3DuBEdMtR1z8y-kaop8BcPb8FGHn_VTqAcxXh%3DKNfg%40mail.gmail.com.


Re: Regarding to suggestion for registration page

2019-08-19 Thread N'BE SORO
Ok, I will check.

Le lun. 19 août 2019 à 10:21, RONAK JAIN  a écrit :

> Hello Django developers,
>
> I am trying to redirect my registration page on the home page but, I am
> not getting when I am trying with a registration page it will work for
> registration but when I am doing with the home page so I am not getting.
>
> *Home Page : localhost:8000*
>
> *Could you help me out with this problem?*
>
> *Attached screenshots for Better Understanding please check it out.*
>
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOtSHp9%3DPUc-8oXAV7NtCoDu%3DgMPA7pWG%2BRzf7vyfU9U32CP0g%40mail.gmail.com.


Re: Exception value name is not defined

2019-08-16 Thread N'BE SORO
Ok.  Thank you

Le ven. 16 août 2019 à 11:31, Kean Dumba  a écrit :

> Hi N’BE,
>
> The github code you provided worked.
> I now see all the records.
>
> Thank you for the help.
>
> Best,
>
> K
>
> On Thu, 15 Aug 2019 at 22:14, N'BE SORO  wrote:
>
>> https://github.com/Soro08/django_help/blob/master/README.md
>>
>> Le jeu. 15 août 2019 à 22:54, N'BE SORO  a écrit :
>>
>>> This is normal in the view.py file is what appears. Now if you want to
>>> use the data in the template You must use a loop to browse the items. I
>>> will send you a Github link or I will better explain.
>>>
>>> Le jeu. 15 août 2019 à 20:49, Kean  a écrit :
>>>
>>>>
>>>> Hi, pls see the result of the code, no objects, just the ID number, and
>>>> the model name, plus query set,
>>>> not sure what issue is here.
>>>>
>>>>
>>>> On 15 Aug 2019, at 21:29, N'BE SORO  wrote:
>>>>
>>>> Ok.
>>>>
>>>> Use this code:
>>>>
>>>> data = Test.objects.all()
>>>>
>>>> context = {
>>>> 'data': data,
>>>> }
>>>>
>>>>
>>>> in Your template use:
>>>>
>>>>
>>>> data.name,
>>>> data.broname
>>>> ...
>>>>
>>>>
>>>>
>>>> Le jeu. 15 août 2019 à 19:56, Kean  a écrit :
>>>>
>>>>> Hi, N’BE,
>>>>>
>>>>> The code you sent, when i apply using my model and substitute the
>>>>> objects for those defined in my model, in the context, the browser,  
>>>>> throws
>>>>> up unidentified error for the object defined in the context, i.e. my 
>>>>> object
>>>>> name.
>>>>>
>>>>> Please see example below which better explains what I am trying to
>>>>> achieve:
>>>>>
>>>>> Example,
>>>>>
>>>>> I have one table in models,
>>>>>
>>>>> Models.py
>>>>>
>>>>> class Test(request):
>>>>> Name = models.CharField(max_length=10)
>>>>> Surname = models.CharField(max_length=10)
>>>>> Father_name = models.CharField(max_length=10)
>>>>> Mother_name = models.CharField(max_length=10)
>>>>> Brother_name = models.CharField(max_length=10)
>>>>> Sister_name = models.CharField(max_length=10)
>>>>>
>>>>>  def__self__(self):
>>>>> return self. name
>>>>>
>>>>> --
>>>>> When I use your “working' code in views
>>>>>
>>>>> I only see the result of one object: Name: John Smith
>>>>>
>>>>> I would like to see the results of all the objects stored in the
>>>>> database: Name: John Smith, Father name: Sam Smith,
>>>>> Mother name: Angela Smith, Brother name: James Smith and Sister name:
>>>>> Sarah Smith.
>>>>>
>>>>> All 6 objects, would need to appear in the view,
>>>>>
>>>>> Is there a way to code this?
>>>>>
>>>>> Best,
>>>>>
>>>>> K
>>>>>
>>>>>
>>>>> On 15 Aug 2019, at 20:36, N'BE SORO  wrote:
>>>>>
>>>>> Ok.
>>>>>
>>>>> Simple exemple.
>>>>>
>>>>> data_1 = Model_1.objects.all()
>>>>> data_2 = Model_2.objects.all()
>>>>> data_3 = Model_3.objects.all()
>>>>> data_4 = Model_4.objects.all()
>>>>> data_5 = Model_5.objects.all()
>>>>> data_6 = Model_6.objects.all()
>>>>>
>>>>> context = {
>>>>>
>>>>>'data_1':  data_1,
>>>>>'data_2':  data_2,
>>>>>'data_3':  data_3,
>>>>>'data_4':  data_4,
>>>>>'data_5':  data_5,
>>>>>'data_6':  data_6,
>>>>> }
>>>>>
>>>>> return render(request, 'yourpage.html, context)
>>>>>
>>>>>
>>>>> 
>>>>>
>>>>> Replaces Model_1 ... Model_6 by your models you want to send in your
>>>>> view.
>>>>>
>>>>>
>>>>> Invite your template use data_1,..., data_6
>>>>>
>>>>

Re: Exception value name is not defined

2019-08-15 Thread N'BE SORO
https://github.com/Soro08/django_help/blob/master/README.md

Le jeu. 15 août 2019 à 22:54, N'BE SORO  a écrit :

> This is normal in the view.py file is what appears. Now if you want to use
> the data in the template You must use a loop to browse the items. I will
> send you a Github link or I will better explain.
>
> Le jeu. 15 août 2019 à 20:49, Kean  a écrit :
>
>>
>> Hi, pls see the result of the code, no objects, just the ID number, and
>> the model name, plus query set,
>> not sure what issue is here.
>>
>>
>> On 15 Aug 2019, at 21:29, N'BE SORO  wrote:
>>
>> Ok.
>>
>> Use this code:
>>
>> data = Test.objects.all()
>>
>> context = {
>> 'data': data,
>> }
>>
>>
>> in Your template use:
>>
>>
>> data.name,
>> data.broname
>> ...
>>
>>
>>
>> Le jeu. 15 août 2019 à 19:56, Kean  a écrit :
>>
>>> Hi, N’BE,
>>>
>>> The code you sent, when i apply using my model and substitute the
>>> objects for those defined in my model, in the context, the browser,  throws
>>> up unidentified error for the object defined in the context, i.e. my object
>>> name.
>>>
>>> Please see example below which better explains what I am trying to
>>> achieve:
>>>
>>> Example,
>>>
>>> I have one table in models,
>>>
>>> Models.py
>>>
>>> class Test(request):
>>> Name = models.CharField(max_length=10)
>>> Surname = models.CharField(max_length=10)
>>> Father_name = models.CharField(max_length=10)
>>> Mother_name = models.CharField(max_length=10)
>>> Brother_name = models.CharField(max_length=10)
>>> Sister_name = models.CharField(max_length=10)
>>>
>>>  def__self__(self):
>>> return self. name
>>>
>>> --
>>> When I use your “working' code in views
>>>
>>> I only see the result of one object: Name: John Smith
>>>
>>> I would like to see the results of all the objects stored in the
>>> database: Name: John Smith, Father name: Sam Smith,
>>> Mother name: Angela Smith, Brother name: James Smith and Sister name:
>>> Sarah Smith.
>>>
>>> All 6 objects, would need to appear in the view,
>>>
>>> Is there a way to code this?
>>>
>>> Best,
>>>
>>> K
>>>
>>>
>>> On 15 Aug 2019, at 20:36, N'BE SORO  wrote:
>>>
>>> Ok.
>>>
>>> Simple exemple.
>>>
>>> data_1 = Model_1.objects.all()
>>> data_2 = Model_2.objects.all()
>>> data_3 = Model_3.objects.all()
>>> data_4 = Model_4.objects.all()
>>> data_5 = Model_5.objects.all()
>>> data_6 = Model_6.objects.all()
>>>
>>> context = {
>>>
>>>'data_1':  data_1,
>>>'data_2':  data_2,
>>>'data_3':  data_3,
>>>'data_4':  data_4,
>>>'data_5':  data_5,
>>>'data_6':  data_6,
>>> }
>>>
>>> return render(request, 'yourpage.html, context)
>>>
>>>
>>> 
>>>
>>> Replaces Model_1 ... Model_6 by your models you want to send in your
>>> view.
>>>
>>>
>>> Invite your template use data_1,..., data_6
>>>
>>>
>>>
>>> Le jeu. 15 août 2019 à 19:28, Kean  a écrit :
>>>
>>>> Hi N’BE,
>>>>
>>>> If I have 6 objects in my dbase model, I would want all six to be
>>>> returned to the view, via template.
>>>>
>>>> However, the code you sent is only returning 1 object, so i am missing 5
>>>>
>>>> how can I  use the view code, to ensure all 6 are returned o the
>>>> template?
>>>>
>>>> Best,
>>>>
>>>> K
>>>>
>>>>
>>>> On 15 Aug 2019, at 20:21, N'BE SORO  wrote:
>>>>
>>>> you want to send what model on your view?
>>>>
>>>> Le jeu. 15 août 2019 à 19:04, Kean  a écrit :
>>>>
>>>>> Hi N’BE,
>>>>>
>>>>> Thanks, the code worked, the problem is I wanted to use the context to
>>>>> return all objects in the database to
>>>>> the defined html view,
>>>>>
>>>>> However, I am still  only getting the self defined str and returning
>>>&g

Re: Exception value name is not defined

2019-08-15 Thread N'BE SORO
This is normal in the view.py file is what appears. Now if you want to use
the data in the template You must use a loop to browse the items. I will
send you a Github link or I will better explain.

Le jeu. 15 août 2019 à 20:49, Kean  a écrit :

>
> Hi, pls see the result of the code, no objects, just the ID number, and
> the model name, plus query set,
> not sure what issue is here.
>
>
> On 15 Aug 2019, at 21:29, N'BE SORO  wrote:
>
> Ok.
>
> Use this code:
>
> data = Test.objects.all()
>
> context = {
> 'data': data,
> }
>
>
> in Your template use:
>
>
> data.name,
> data.broname
> ...
>
>
>
> Le jeu. 15 août 2019 à 19:56, Kean  a écrit :
>
>> Hi, N’BE,
>>
>> The code you sent, when i apply using my model and substitute the objects
>> for those defined in my model, in the context, the browser,  throws up
>> unidentified error for the object defined in the context, i.e. my object
>> name.
>>
>> Please see example below which better explains what I am trying to
>> achieve:
>>
>> Example,
>>
>> I have one table in models,
>>
>> Models.py
>>
>> class Test(request):
>> Name = models.CharField(max_length=10)
>> Surname = models.CharField(max_length=10)
>> Father_name = models.CharField(max_length=10)
>> Mother_name = models.CharField(max_length=10)
>> Brother_name = models.CharField(max_length=10)
>> Sister_name = models.CharField(max_length=10)
>>
>>  def__self__(self):
>> return self. name
>>
>> --
>> When I use your “working' code in views
>>
>> I only see the result of one object: Name: John Smith
>>
>> I would like to see the results of all the objects stored in the
>> database: Name: John Smith, Father name: Sam Smith,
>> Mother name: Angela Smith, Brother name: James Smith and Sister name:
>> Sarah Smith.
>>
>> All 6 objects, would need to appear in the view,
>>
>> Is there a way to code this?
>>
>> Best,
>>
>> K
>>
>>
>> On 15 Aug 2019, at 20:36, N'BE SORO  wrote:
>>
>> Ok.
>>
>> Simple exemple.
>>
>> data_1 = Model_1.objects.all()
>> data_2 = Model_2.objects.all()
>> data_3 = Model_3.objects.all()
>> data_4 = Model_4.objects.all()
>> data_5 = Model_5.objects.all()
>> data_6 = Model_6.objects.all()
>>
>> context = {
>>
>>'data_1':  data_1,
>>'data_2':  data_2,
>>'data_3':  data_3,
>>'data_4':  data_4,
>>'data_5':  data_5,
>>'data_6':  data_6,
>> }
>>
>> return render(request, 'yourpage.html, context)
>>
>>
>> 
>>
>> Replaces Model_1 ... Model_6 by your models you want to send in your view.
>>
>>
>> Invite your template use data_1,..., data_6
>>
>>
>>
>> Le jeu. 15 août 2019 à 19:28, Kean  a écrit :
>>
>>> Hi N’BE,
>>>
>>> If I have 6 objects in my dbase model, I would want all six to be
>>> returned to the view, via template.
>>>
>>> However, the code you sent is only returning 1 object, so i am missing 5
>>>
>>> how can I  use the view code, to ensure all 6 are returned o the
>>> template?
>>>
>>> Best,
>>>
>>> K
>>>
>>>
>>> On 15 Aug 2019, at 20:21, N'BE SORO  wrote:
>>>
>>> you want to send what model on your view?
>>>
>>> Le jeu. 15 août 2019 à 19:04, Kean  a écrit :
>>>
>>>> Hi N’BE,
>>>>
>>>> Thanks, the code worked, the problem is I wanted to use the context to
>>>> return all objects in the database to
>>>> the defined html view,
>>>>
>>>> However, I am still  only getting the self defined str and returning to
>>>> view, is there any way to get all records in the table to display?
>>>>
>>>> Best,
>>>>
>>>> Kea
>>>>
>>>> On 15 Aug 2019, at 19:50, N'BE SORO  wrote:
>>>>
>>>> Hello Use this code
>>>>
>>>>
>>>> def editremovebusiness(request):
>>>> data = Businessownercreate.objects.all()
>>>> context = {
>>>> 'data': data,
>>>> }
>>>> return render(request, 'editremovebusiness.html', context)
>>>>
>>>> Le jeu. 15 août 2019 à 18:45, RONAK JAIN  a
>>>> écrit :
>>>>
>>>>> Hey Kean,
>>>>>
>>>>> What is the object here?
>&g

Re: Exception value name is not defined

2019-08-15 Thread N'BE SORO
I'll put an example on GitHub and send you the link

Le jeu. 15 août 2019 à 20:29, N'BE SORO  a écrit :

> Ok.
>
> Use this code:
>
> data = Test.objects.all()
>
> context = {
> 'data': data,
> }
>
>
> in Your template use:
>
>
> data.name,
> data.broname
> ...
>
>
>
> Le jeu. 15 août 2019 à 19:56, Kean  a écrit :
>
>> Hi, N’BE,
>>
>> The code you sent, when i apply using my model and substitute the objects
>> for those defined in my model, in the context, the browser,  throws up
>> unidentified error for the object defined in the context, i.e. my object
>> name.
>>
>> Please see example below which better explains what I am trying to
>> achieve:
>>
>> Example,
>>
>> I have one table in models,
>>
>> Models.py
>>
>> class Test(request):
>> Name = models.CharField(max_length=10)
>> Surname = models.CharField(max_length=10)
>> Father_name = models.CharField(max_length=10)
>> Mother_name = models.CharField(max_length=10)
>> Brother_name = models.CharField(max_length=10)
>> Sister_name = models.CharField(max_length=10)
>>
>>  def__self__(self):
>> return self. name
>>
>> --
>> When I use your “working' code in views
>>
>> I only see the result of one object: Name: John Smith
>>
>> I would like to see the results of all the objects stored in the
>> database: Name: John Smith, Father name: Sam Smith,
>> Mother name: Angela Smith, Brother name: James Smith and Sister name:
>> Sarah Smith.
>>
>> All 6 objects, would need to appear in the view,
>>
>> Is there a way to code this?
>>
>> Best,
>>
>> K
>>
>>
>> On 15 Aug 2019, at 20:36, N'BE SORO  wrote:
>>
>> Ok.
>>
>> Simple exemple.
>>
>> data_1 = Model_1.objects.all()
>> data_2 = Model_2.objects.all()
>> data_3 = Model_3.objects.all()
>> data_4 = Model_4.objects.all()
>> data_5 = Model_5.objects.all()
>> data_6 = Model_6.objects.all()
>>
>> context = {
>>
>>'data_1':  data_1,
>>'data_2':  data_2,
>>'data_3':  data_3,
>>'data_4':  data_4,
>>'data_5':  data_5,
>>'data_6':  data_6,
>> }
>>
>> return render(request, 'yourpage.html, context)
>>
>>
>> 
>>
>> Replaces Model_1 ... Model_6 by your models you want to send in your view.
>>
>>
>> Invite your template use data_1,..., data_6
>>
>>
>>
>> Le jeu. 15 août 2019 à 19:28, Kean  a écrit :
>>
>>> Hi N’BE,
>>>
>>> If I have 6 objects in my dbase model, I would want all six to be
>>> returned to the view, via template.
>>>
>>> However, the code you sent is only returning 1 object, so i am missing 5
>>>
>>> how can I  use the view code, to ensure all 6 are returned o the
>>> template?
>>>
>>> Best,
>>>
>>> K
>>>
>>>
>>> On 15 Aug 2019, at 20:21, N'BE SORO  wrote:
>>>
>>> you want to send what model on your view?
>>>
>>> Le jeu. 15 août 2019 à 19:04, Kean  a écrit :
>>>
>>>> Hi N’BE,
>>>>
>>>> Thanks, the code worked, the problem is I wanted to use the context to
>>>> return all objects in the database to
>>>> the defined html view,
>>>>
>>>> However, I am still  only getting the self defined str and returning to
>>>> view, is there any way to get all records in the table to display?
>>>>
>>>> Best,
>>>>
>>>> Kea
>>>>
>>>> On 15 Aug 2019, at 19:50, N'BE SORO  wrote:
>>>>
>>>> Hello Use this code
>>>>
>>>>
>>>> def editremovebusiness(request):
>>>> data = Businessownercreate.objects.all()
>>>> context = {
>>>> 'data': data,
>>>> }
>>>> return render(request, 'editremovebusiness.html', context)
>>>>
>>>> Le jeu. 15 août 2019 à 18:45, RONAK JAIN  a
>>>> écrit :
>>>>
>>>>> Hey Kean,
>>>>>
>>>>> What is the object here?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Aug 15, 2019 at 11:37 PM Kean  wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I have written the following code in views.py
>>>>>>
>>>>>> def editremovebusi

Re: Exception value name is not defined

2019-08-15 Thread N'BE SORO
Ok.

Use this code:

data = Test.objects.all()

context = {
'data': data,
}


in Your template use:


data.name,
data.broname
...



Le jeu. 15 août 2019 à 19:56, Kean  a écrit :

> Hi, N’BE,
>
> The code you sent, when i apply using my model and substitute the objects
> for those defined in my model, in the context, the browser,  throws up
> unidentified error for the object defined in the context, i.e. my object
> name.
>
> Please see example below which better explains what I am trying to achieve:
>
> Example,
>
> I have one table in models,
>
> Models.py
>
> class Test(request):
> Name = models.CharField(max_length=10)
> Surname = models.CharField(max_length=10)
> Father_name = models.CharField(max_length=10)
> Mother_name = models.CharField(max_length=10)
> Brother_name = models.CharField(max_length=10)
> Sister_name = models.CharField(max_length=10)
>
>  def__self__(self):
> return self. name
>
> --
> When I use your “working' code in views
>
> I only see the result of one object: Name: John Smith
>
> I would like to see the results of all the objects stored in the database:
> Name: John Smith, Father name: Sam Smith,
> Mother name: Angela Smith, Brother name: James Smith and Sister name:
> Sarah Smith.
>
> All 6 objects, would need to appear in the view,
>
> Is there a way to code this?
>
> Best,
>
> K
>
>
> On 15 Aug 2019, at 20:36, N'BE SORO  wrote:
>
> Ok.
>
> Simple exemple.
>
> data_1 = Model_1.objects.all()
> data_2 = Model_2.objects.all()
> data_3 = Model_3.objects.all()
> data_4 = Model_4.objects.all()
> data_5 = Model_5.objects.all()
> data_6 = Model_6.objects.all()
>
> context = {
>
>'data_1':  data_1,
>'data_2':  data_2,
>'data_3':  data_3,
>'data_4':  data_4,
>'data_5':  data_5,
>'data_6':  data_6,
> }
>
> return render(request, 'yourpage.html, context)
>
>
> 
>
> Replaces Model_1 ... Model_6 by your models you want to send in your view.
>
>
> Invite your template use data_1,..., data_6
>
>
>
> Le jeu. 15 août 2019 à 19:28, Kean  a écrit :
>
>> Hi N’BE,
>>
>> If I have 6 objects in my dbase model, I would want all six to be
>> returned to the view, via template.
>>
>> However, the code you sent is only returning 1 object, so i am missing 5
>>
>> how can I  use the view code, to ensure all 6 are returned o the template?
>>
>> Best,
>>
>> K
>>
>>
>> On 15 Aug 2019, at 20:21, N'BE SORO  wrote:
>>
>> you want to send what model on your view?
>>
>> Le jeu. 15 août 2019 à 19:04, Kean  a écrit :
>>
>>> Hi N’BE,
>>>
>>> Thanks, the code worked, the problem is I wanted to use the context to
>>> return all objects in the database to
>>> the defined html view,
>>>
>>> However, I am still  only getting the self defined str and returning to
>>> view, is there any way to get all records in the table to display?
>>>
>>> Best,
>>>
>>> Kea
>>>
>>> On 15 Aug 2019, at 19:50, N'BE SORO  wrote:
>>>
>>> Hello Use this code
>>>
>>>
>>> def editremovebusiness(request):
>>> data = Businessownercreate.objects.all()
>>> context = {
>>> 'data': data,
>>> }
>>> return render(request, 'editremovebusiness.html', context)
>>>
>>> Le jeu. 15 août 2019 à 18:45, RONAK JAIN  a
>>> écrit :
>>>
>>>> Hey Kean,
>>>>
>>>> What is the object here?
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, Aug 15, 2019 at 11:37 PM Kean  wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I have written the following code in views.py
>>>>>
>>>>> def editremovebusiness(request):
>>>>> data = Businessownercreate.objects.all()
>>>>> context = {
>>>>> 'Creator': obj.Creator,
>>>>> 'Micro_Small_Medium': obj.Micro_Small_Medium,
>>>>> }
>>>>> return render(request, 'editremovebusiness.html',
>>>>> context={"data":data})
>>>>>
>>>>> when I save it and check the url
>>>>>
>>>>> it returns
>>>>>
>>>>> Exception Type: NameError
>>>>> Exception Value:
>>>>>
>>>>> name 'obj' is not defined
>>>>>
>>>>>
>>>>>
>>>>> Is anyone familiar with this issue, please

Re: Exception value name is not defined

2019-08-15 Thread N'BE SORO
Ok.

Simple exemple.

data_1 = Model_1.objects.all()
data_2 = Model_2.objects.all()
data_3 = Model_3.objects.all()
data_4 = Model_4.objects.all()
data_5 = Model_5.objects.all()
data_6 = Model_6.objects.all()

context = {

   'data_1':  data_1,
   'data_2':  data_2,
   'data_3':  data_3,
   'data_4':  data_4,
   'data_5':  data_5,
   'data_6':  data_6,
}

return render(request, 'yourpage.html, context)




Replaces Model_1 ... Model_6 by your models you want to send in your view.


Invite your template use data_1,..., data_6



Le jeu. 15 août 2019 à 19:28, Kean  a écrit :

> Hi N’BE,
>
> If I have 6 objects in my dbase model, I would want all six to be returned
> to the view, via template.
>
> However, the code you sent is only returning 1 object, so i am missing 5
>
> how can I  use the view code, to ensure all 6 are returned o the template?
>
> Best,
>
> K
>
>
> On 15 Aug 2019, at 20:21, N'BE SORO  wrote:
>
> you want to send what model on your view?
>
> Le jeu. 15 août 2019 à 19:04, Kean  a écrit :
>
>> Hi N’BE,
>>
>> Thanks, the code worked, the problem is I wanted to use the context to
>> return all objects in the database to
>> the defined html view,
>>
>> However, I am still  only getting the self defined str and returning to
>> view, is there any way to get all records in the table to display?
>>
>> Best,
>>
>> Kea
>>
>> On 15 Aug 2019, at 19:50, N'BE SORO  wrote:
>>
>> Hello Use this code
>>
>>
>> def editremovebusiness(request):
>> data = Businessownercreate.objects.all()
>> context = {
>> 'data': data,
>> }
>> return render(request, 'editremovebusiness.html', context)
>>
>> Le jeu. 15 août 2019 à 18:45, RONAK JAIN  a
>> écrit :
>>
>>> Hey Kean,
>>>
>>> What is the object here?
>>>
>>>
>>>
>>>
>>> On Thu, Aug 15, 2019 at 11:37 PM Kean  wrote:
>>>
>>>> Hi,
>>>>
>>>> I have written the following code in views.py
>>>>
>>>> def editremovebusiness(request):
>>>> data = Businessownercreate.objects.all()
>>>> context = {
>>>> 'Creator': obj.Creator,
>>>> 'Micro_Small_Medium': obj.Micro_Small_Medium,
>>>> }
>>>> return render(request, 'editremovebusiness.html', context={"data":data})
>>>>
>>>> when I save it and check the url
>>>>
>>>> it returns
>>>>
>>>> Exception Type: NameError
>>>> Exception Value:
>>>>
>>>> name 'obj' is not defined
>>>>
>>>>
>>>>
>>>> Is anyone familiar with this issue, please advise cause and fix?
>>>>
>>>> Best,
>>>>
>>>> K
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> 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 view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-users/8b426d60-4a54-4ec4-b130-05c0ae69cdd3%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/8b426d60-4a54-4ec4-b130-05c0ae69cdd3%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CA%2BAqMUdv39HYFE95ts%3DRyuJdtekr%3D6hPF1KicaaHvmh1FMrq%2Bw%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CA%2BAqMUdv39HYFE95ts%3DRyuJdtekr%3D6hPF1KicaaHvmh1FMrq%2Bw%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>>
>> --
>> 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 view this discussion on the web visit
>> https://grou

Re: Exception value name is not defined

2019-08-15 Thread N'BE SORO
you want to send what model on your view?

Le jeu. 15 août 2019 à 19:04, Kean  a écrit :

> Hi N’BE,
>
> Thanks, the code worked, the problem is I wanted to use the context to
> return all objects in the database to
> the defined html view,
>
> However, I am still  only getting the self defined str and returning to
> view, is there any way to get all records in the table to display?
>
> Best,
>
> Kea
>
> On 15 Aug 2019, at 19:50, N'BE SORO  wrote:
>
> Hello Use this code
>
>
> def editremovebusiness(request):
> data = Businessownercreate.objects.all()
> context = {
> 'data': data,
> }
> return render(request, 'editremovebusiness.html', context)
>
> Le jeu. 15 août 2019 à 18:45, RONAK JAIN  a
> écrit :
>
>> Hey Kean,
>>
>> What is the object here?
>>
>>
>>
>>
>> On Thu, Aug 15, 2019 at 11:37 PM Kean  wrote:
>>
>>> Hi,
>>>
>>> I have written the following code in views.py
>>>
>>> def editremovebusiness(request):
>>> data = Businessownercreate.objects.all()
>>> context = {
>>> 'Creator': obj.Creator,
>>> 'Micro_Small_Medium': obj.Micro_Small_Medium,
>>> }
>>> return render(request, 'editremovebusiness.html', context={"data":data})
>>>
>>> when I save it and check the url
>>>
>>> it returns
>>>
>>> Exception Type: NameError
>>> Exception Value:
>>>
>>> name 'obj' is not defined
>>>
>>>
>>>
>>> Is anyone familiar with this issue, please advise cause and fix?
>>>
>>> Best,
>>>
>>> K
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/8b426d60-4a54-4ec4-b130-05c0ae69cdd3%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/8b426d60-4a54-4ec4-b130-05c0ae69cdd3%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CA%2BAqMUdv39HYFE95ts%3DRyuJdtekr%3D6hPF1KicaaHvmh1FMrq%2Bw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CA%2BAqMUdv39HYFE95ts%3DRyuJdtekr%3D6hPF1KicaaHvmh1FMrq%2Bw%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAOtSHp9ufRjCQfUg%2BTCH9ASPaRJtVVS8ik4wq4kJB2wohH1jig%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAOtSHp9ufRjCQfUg%2BTCH9ASPaRJtVVS8ik4wq4kJB2wohH1jig%40mail.gmail.com?utm_medium=email_source=footer>
> .
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/3359FAE6-61BE-4E9F-80D4-5BA191EFC382%40gmail.com
> <https://groups.google.com/d/msgid/django-users/3359FAE6-61BE-4E9F-80D4-5BA191EFC382%40gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOtSHp_UYM%2Bs_Rk4WEFHjUkEg_VP%2Bri7JczJo4hKRr-mT-14vQ%40mail.gmail.com.


Re: Exception value name is not defined

2019-08-15 Thread N'BE SORO
Hello Use this code


def editremovebusiness(request):
data = Businessownercreate.objects.all()
context = {
'data': data,
}
return render(request, 'editremovebusiness.html', context)

Le jeu. 15 août 2019 à 18:45, RONAK JAIN  a écrit :

> Hey Kean,
>
> What is the object here?
>
>
>
>
> On Thu, Aug 15, 2019 at 11:37 PM Kean  wrote:
>
>> Hi,
>>
>> I have written the following code in views.py
>>
>> def editremovebusiness(request):
>> data = Businessownercreate.objects.all()
>> context = {
>> 'Creator': obj.Creator,
>> 'Micro_Small_Medium': obj.Micro_Small_Medium,
>> }
>> return render(request, 'editremovebusiness.html', context={"data":data})
>>
>> when I save it and check the url
>>
>> it returns
>>
>> Exception Type: NameError
>> Exception Value:
>>
>> name 'obj' is not defined
>>
>>
>>
>> Is anyone familiar with this issue, please advise cause and fix?
>>
>> Best,
>>
>> K
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/8b426d60-4a54-4ec4-b130-05c0ae69cdd3%40googlegroups.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2BAqMUdv39HYFE95ts%3DRyuJdtekr%3D6hPF1KicaaHvmh1FMrq%2Bw%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOtSHp9ufRjCQfUg%2BTCH9ASPaRJtVVS8ik4wq4kJB2wohH1jig%40mail.gmail.com.


Re: Django wsgi apache Deploy project

2019-05-30 Thread N'BE SORO
 thank you everyone I managed the deployment

Le mar. 7 mai 2019 à 18:48, Subhodeep Das  a
écrit :

> Try:
>
> WSGIScriptAlias /test/tc-test /var/www/stage/hello/tc-test/django.wsgi
>
> You shouldn't have trailing slash on first argument.
>
> On Tue, May 7, 2019 at 7:27 PM N'BE SORO  wrote:
>
>>
>> Hi I'm a beginner in python and I realized a project in Django. I have
>> problems in hosting my project. here is my code in the 000-default.conf
>>  #ServerName #ServerAlias ServerAdmin webmaster @
>> localhost DocumentRoot / var / www / html / ecommerce WSGIScriptAlias ​​/
>> /var/www/html/ecommerce/ecommerce/wsgi.py WSGIPythonPath / var / www / html
>> / ecommerce / ErrorLog $ {APACHE_LOG_DIR} /error.log CustomLog $
>> {APACHE_LOG_DIR} /access.log combined  and I have this error
>> Invalid command 'WSGIScriptAlias / /var / www / html / ecommerce /
>> ecommerce / wsgi.py ', perhaps misspelled or d efined by a module not
>> included in the server configuration
>>
>> --
>> 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/1912bcdc-cb2f-45a2-932c-d579eb944c0a%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/1912bcdc-cb2f-45a2-932c-d579eb944c0a%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> 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/CAJEaip7ZtWWZW--O9Z2nqvVypwLe8CMRVSPboc28yoNkaLMV%3Dg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAJEaip7ZtWWZW--O9Z2nqvVypwLe8CMRVSPboc28yoNkaLMV%3Dg%40mail.gmail.com?utm_medium=email_source=footer>
> .
> 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/CAOtSHp--MqaZPhUZiPUgBdBEMp%2B2F0Mm_uQHJ%2But1_qHh75d4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django wsgi apache Deploy project

2019-05-07 Thread N'BE SORO

Hi I'm a beginner in python and I realized a project in Django. I have 
problems in hosting my project. here is my code in the 000-default.conf 
 #ServerName #ServerAlias ServerAdmin webmaster @ 
localhost DocumentRoot / var / www / html / ecommerce WSGIScriptAlias ​​/ 
/var/www/html/ecommerce/ecommerce/wsgi.py WSGIPythonPath / var / www / html 
/ ecommerce / ErrorLog $ {APACHE_LOG_DIR} /error.log CustomLog $ 
{APACHE_LOG_DIR} /access.log combined  and I have this error 
Invalid command 'WSGIScriptAlias / /var / www / html / ecommerce / 
ecommerce / wsgi.py ', perhaps misspelled or d efined by a module not 
included in the server configuration

-- 
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/1912bcdc-cb2f-45a2-932c-d579eb944c0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.