Re: ModuleNotFoundError: No module named :

2019-09-25 Thread Rahul Roshan
You have created a model named as "user" in models.py while you are importing model "User" in views.py. Importing model "user" will fix the issue. Thanks, Rahul On Thu, Sep 26, 2019 at 9:09 AM MEGA NATHAN wrote: > > hi. > > populate script error in line 12 > > > > > *Regards* > Meganathan G >

Re: ModuleNotFoundError: No module named :

2019-09-25 Thread MEGA NATHAN
hi. populate script error in line 12 *Regards* Meganathan G On Wed, Sep 25, 2019 at 9:57 AM Abu Yusuf wrote: > share your full project here. > > On Tue, Sep 24, 2019 at 10:43 PM MEGA NATHAN > wrote: > >> >> >> Hi. >> again i change and run but same problem coming >> >> >> >> *Regar

Re: Multiple user roles with permissions

2019-09-25 Thread Shazia Nusrat
I just needed a working example of added permissions system in a project I can run. Django-rules is good and I've tried it in my test-project. I was hoping a project with bunch of user types and assigned permissions hardcoded. I know I can do things from default admin dashboard. Regards, Shazia

Re: redirect authenticated user in CreateView

2019-09-25 Thread Randy Hughes
from django.shortcuts import HttpResponseRedirect class ExampleView(TemplateView): template_name = 'pages/example.html' def get(self, request): if not request.user.is_authenticated: return HttpResponseRedirect('login') On Wed, Sep 25, 2019 at 1:09 PM saeed albooyeh wrote: > hi > i used Create

Re: Django - How to add a link to a table that will open another page(django app) from an html template and pass a variable with it.

2019-09-25 Thread Randy Hughes
views.py class *viewLit*(TemplateView): def get(self, request, strategy=None): circuit_id = self.request.query_params.get('circuitid', None) urls.py path('viewlit/', viewlit.as_view(), name='viewlit') search_custom.html {{ circuit.circuitid }} ''' this is an example using a query paramet

Django - How to add a link to a table that will open another page(django app) from an html template and pass a variable with it.

2019-09-25 Thread Patrick Carra
Hello I have an app that displays some database information in a table. Inside of the html template I am making an edit link that I want to open another app(page viewLit) while passing a value to it's view. I have added my code below. My question is I am unsure of how to make this links url

redirect authenticated user in create view in django

2019-09-25 Thread saeed albooyeh
hi i used CreateView for registration in my project and i wanna prevent authenticated user from accessing to the register url and redirect it to another page can anyone tell me how can i do it? -- You received this message because you are subscribed to the Google Groups "Django users" group.

ListView and DetailView

2019-09-25 Thread Simona Meli
Hi, I have 2 question: 1. every single django app (of a project) has its tables or can they be used for all? I have a user app with its tables: user, company, tipout, from which to extract data with ListView and Detailview. Now I would like to create another app in which to manage company data

redirect authenticated user in CreateView

2019-09-25 Thread saeed albooyeh
hi i used CreateView for registration in my project and i wanna prevent authenticated user from accessing to the register url and redirect it to another page can anyone tell me how can i do it? -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Multiple user roles with permissions

2019-09-25 Thread George Tantiras
I would recommend django-rules: https://github.com/dfunckt/django-rules -- 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.

Django Pytest with multiple db including legacy one

2019-09-25 Thread Matthieu Texier
Hi Guys, Not sure this question is on purpose as not purely Django related … I am building a frontend using two databases : one for Django and a legacy database my frontend needs to access to (read-only). As such, I do have managed models with a Django managed db and unmanaged models in an unm

Re: Regarding to file stronge.

2019-09-25 Thread Deep Sukhwani
Hey Anil, Django PostgresQL and Django-MySQL have JSONField which allow you to store JSON formatted data (I am assuming you meant storing JSON data when you asked *multiple files in Json format to store the database *) *PostgresQL*: https://docs.djangoproject.com/en/2.2/ref/contrib/postgres/fi

Re: Multiple user roles with permissions

2019-09-25 Thread Aldian Fazrihady
What do you need to clarify regarding this document https://docs.djangoproject.com/en/2.2/topics/auth/default/#the-permission-required-decorator ? On Wed, Sep 25, 2019 at 9:03 PM Shazia Nusrat wrote: > Hi, > > I need help to understand implementation of multiple user roles and > permissions on

Re: Multiple user roles with permissions

2019-09-25 Thread Shakil Ahmmed
On Wed, Sep 25, 2019 at 8:03 PM Shazia Nusrat wrote: > Hi, > > I need help to understand implementation of multiple user roles and > permissions on views/templates/objects. If someone can point me to really > nice project at GitHub I will be really thankful. I couldn't find one so > far. > > Rega

Multiple user roles with permissions

2019-09-25 Thread Shazia Nusrat
Hi, I need help to understand implementation of multiple user roles and permissions on views/templates/objects. If someone can point me to really nice project at GitHub I will be really thankful. I couldn't find one so far. Regards, Shazia -- You received this message because you are subscribed

Re: Digest for django-users@googlegroups.com - 25 updates in 10 topics

2019-09-25 Thread Fahad Ahmed
Is there a way to create a thumbnail of video file? On Wed, 25 Sep 2019, 08:38 , wrote: > django-users@googlegroups.com > > Google > Groups >

Re: Looking for online shop project

2019-09-25 Thread Andréas Kühne
Hi, Try this: http://oscarcommerce.com/ Regards, Andréas Den ons 25 sep. 2019 kl 12:52 skrev Ram mohan : > Hi everyone, > > > I am looking for online shop shop app if anyone has please share the code. > > > Thanks in advance > RamamohanReddy > > -- > You received this message because you are

Re: Looking for online shop project

2019-09-25 Thread Ram mohan
Can you do it for in sublime text editor Thanks & regards, RamamohanReddy. 8524053939 On Wed, 25 Sep, 2019, 6:46 PM Tosin Ayoola, wrote: > Halo I do > > On Sep 25, 2019 11:52, "Ram mohan" wrote: > >> Hi everyone, >> >> >> I am looking for online shop shop app if anyone has please share the co

Re: Looking for online shop project

2019-09-25 Thread Tosin Ayoola
Halo I do On Sep 25, 2019 11:52, "Ram mohan" wrote: > Hi everyone, > > > I am looking for online shop shop app if anyone has please share the code. > > > Thanks in advance > RamamohanReddy > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group.

Re: regarding adding data into database using faker library

2019-09-25 Thread Cornelis Poppema
You almost had it! You're already setting DJANGO_SETTINGS_MODULE before you call django.setup() inside your main function. However, you also call django.setup() on line 4. You need to set DJANGO_SETTINGS_MODULE before the first django.setup(). On Wednesday, 25 September 2019 13:04:10 UTC+2, Sah

Re: where is the error in pagination?

2019-09-25 Thread leb dev
> > >> >> >> >> {% if object_list.has_previous %} >> >> « first >> >> previous >> >> {% endif %} >> >> >>> >> >> Page {{ object_list.number }} of {{ >>> object_list.paginator.num_pages }}. >> >> >> >> >>> {% if ob

Re: where is the error in pagination?

2019-09-25 Thread laya Mahmoudi
Would you send your html codes relating to pagination در تاریخ چهارشنبه ۲۵ سپتامبر ۲۰۱۹،‏ ۱۵:۰۳ leb dev نوشت: > i tried your answer and display an error : > > That page number is not an integer > > -- > You received this message because you are subscribed to the Google Groups > "Django users" gr

Re: where is the error in pagination?

2019-09-25 Thread leb dev
i tried your answer and display an error : That page number is not an integer -- 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...@googlegro

Re: Virtual Environment error

2019-09-25 Thread laya Mahmoudi
You os is linux pr windows? در تاریخ چهارشنبه ۲۵ سپتامبر ۲۰۱۹،‏ ۶:۴۴ yasar arafath Kajamydeen < yasar...@gmail.com> نوشت: > Dear All, > > Actually i forget my virtual environment name. So when i run -- python > manage.py runserver command its showing error like this . > > > ImportErro

Re: Virtual Environment error

2019-09-25 Thread Tosin Ayoola
CD into the directory in which u created ur virtualenv the type source ➕ tab key twice it should give you the list of all the virtual environment u have created in that directory On Sep 25, 2019 04:13, "yasar arafath Kajamydeen" wrote: Dear All, Actually i forget my virtual environment name.

RE: where is the error in pagination?

2019-09-25 Thread laya
Try this one : paginator = Paginator(queryset_list,8) # Show 25 contacts per page page_request_var = "page" page = request.GET.get(page_request_var) try: queryset = paginator.page(page) except PageNotAnInteger: # If page is not an integer, deliver first page. queryset = paginator.page(

Re: where is the error in pagination?

2019-09-25 Thread leb dev
no i am using function based views -- 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

RE: where is the error in pagination?

2019-09-25 Thread laya
Hi, Do you use Class Based View ? Sent from Mail for Windows 10 From: leb dev Sent: Wednesday, September 25, 2019 2:32 PM To: Django users Subject: where is the error in pagination? i have a django project  and it includes pagination i do not know where is the error in my code but once i tired

where is the error in pagination?

2019-09-25 Thread leb dev
i have a django project and it includes pagination i do not know where is the error in my code but once i tired to go to the next or previous page it crash and display the below error : > can only concatenate str(not ""NoneType) to str query=request.GET.get("search") pa

Regarding to file stronge.

2019-09-25 Thread ANIL UMARANE
Hi guys, How to store the multiple files in Json format to store the database . Easily retrieve and delete. And how set the path Regards.. Anil.K Mob:9019094199 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Looking for online shop project

2019-09-25 Thread Ram mohan
Hi everyone, I am looking for online shop shop app if anyone has please share the code. Thanks in advance RamamohanReddy -- 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 a

Re: Virtual Environment error

2019-09-25 Thread fclinux nova
The simple way is creating new virtualenv and reinstall the package and recorgine them in requirements.txt for next installation. This is very basic and checking google is better than mail in this group. Thanks On Wed, Sep 25, 2019, 13:30 Deep Sukhwani wrote: > Depending on how you installed *vi

Re: convert python 3 to python2

2019-09-25 Thread Aldian Fazrihady
Ankita, why would a new project be forced to use Python 2 by a (probably old) package? A well-maintained package must already have its Python 3 version. Why can't we find an alternative package that uses Python 3? I am curious about what package that is. On Sun, Sep 22, 2019 at 12:32 AM Ankita Gu

Re: convert python 3 to python2

2019-09-25 Thread Derek
Agreed - Mike's suggestion is a very sensible one. In the short term, supporting 2 and 3 could be very useful, until you have the option to drop support for 2. https://six.readthedocs.io/ On Wednesday, 25 September 2019 01:00:44 UTC+2, Mike Dewhirst wrote: > > I think the original question wa