Re: Exported filtered by date data in django

2021-11-19 Thread ramadhan ngallen
Depends on your query filter_val2 should lower than filter_val1 as the range 
start from val2 to val1.
Otherwise change your parameter from val1 to val2
EXPENSES.objects.filter(Q(created_at__range=[filter_val2,filter_val1]))

On 20 Nov 2021, 10:04 +0300, Eugene TUYIZERE , wrote:
> Dear Team,
>
> I am trying to export filtered data from a django model, but I get an empty 
> file. But when I remove the filter and add all, it works.
>
> Kindly assist to know how to export filtered data. Below is my code
>
> def 
> exportexpenes(request):filter_val1=request.POST.get("filter1")filter_val2=request.POST.get("filter2")response=HttpResponse(content_type='text/csv')response['Content-Disposition']
>  = 'attachment; filename=expenses' + 
> str(datetime.datetime.now())+'.csv'writer = 
> csv.writer(response)writer.writerow(['Category','Beneficiary','Description','Operation
>  Date','Amount','Account Number','Paymrnt Date','Status'])expes = 
> EXPENSES.objects.filter(Q(created_at__range=[filter_val2,filter_val1]))# 
> expes = EXPENSES.objects.all()for exp in 
> expes:writer.writerow([exp.category,exp.beneficiary,exp.description,exp.date_of_operation,exp.amount,exp.account_number,exp.payment_date,exp.status])return
>  response
> regards,
> --
> Eugene
>
>  --
> 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/CABxpZHuqV0Py%3D05eyu%3Dv%3DDFBm%2B1y9v-e2AbmVn2Bvj66jG8MZA%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/93a559c8-bc77-44b7-8499-469db0f224e5%40Spark.


Re: Exported filtered by date data in django

2021-11-19 Thread ramadhan ngallen
Debug by printing val1 and val2 before filtering if those vslues are 
dates(class) if true print expenses after filtering. Otherwise your date ranges 
does not contain s data as required
On 20 Nov 2021, 10:49 +0300, Eugene TUYIZERE , wrote:
> Dear Ramadhan,
> Still it does not work
> On Sat, 20 Nov 2021 at 09:18, ramadhan ngallen  wrote:
> > Depends on your query filter_val2 should lower than filter_val1 as the 
> > range start from val2 to val1.
> > Otherwise change your parameter from val1 to val2
> > EXPENSES.objects.filter(Q(created_at__range=[filter_val2,filter_val1]))
> > On 20 Nov 2021, 10:04 +0300, Eugene TUYIZERE , 
> > wrote:
> > > Dear Team,
> > >
> > > I am trying to export filtered data from a django model, but I get an 
> > > empty file. But when I remove the filter and add all, it works.
> > >
> > > Kindly assist to know how to export filtered data. Below is my code
> > >
> > > def 
> > > exportexpenes(request):filter_val1=request.POST.get("filter1")filter_val2=request.POST.get("filter2")response=HttpResponse(content_type='text/csv')response['Content-Disposition']
> > >  = 'attachment; filename=expenses' + 
> > > str(datetime.datetime.now())+'.csv'writer = 
> > > csv.writer(response)writer.writerow(['Category','Beneficiary','Description','Operation
> > >  Date','Amount','Account Number','Paymrnt Date','Status'])expes = 
> > > EXPENSES.objects.filter(Q(created_at__range=[filter_val2,filter_val1]))# 
> > > expes = EXPENSES.objects.all()for exp in 
> > > expes:writer.writerow([exp.category,exp.beneficiary,exp.description,exp.date_of_operation,exp.amount,exp.account_number,exp.payment_date,exp.status])return
> > >  responseregards,
> > > --
> > > Eugene
> > >  --
> > > 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/CABxpZHuqV0Py%3D05eyu%3Dv%3DDFBm%2B1y9v-e2AbmVn2Bvj66jG8MZA%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/93a559c8-bc77-44b7-8499-469db0f224e5%40Spark.
>
>
> --
> TUYIZERE Eugene
> Msc Degree in Mathematical Science
> African Institute for Mathematical Sciences (AIMS Cameroon)Crystal 
> Garden-Lime, Cameroon
> Bsc in Computer Science
> UR-Nyagatare Campus
> Email: eugene.tuyiz...@aims-cameroon.org           eugenetuyiz...@gmail.com
> Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38
>  --
> 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/CABxpZHvFzd3N1ur5%3DbzmDtJUUAF3BfjamMg7pra-RCL5ffjZCw%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/114c19ce-a410-47d2-bd68-1c52d4f799c5%40Spark.


Re: 'WSGIRequest' object has no attribute 'get'

2021-11-23 Thread ramadhan ngallen
Surely it has self.request.GET and not self.request.get
On 23 Nov 2021, 09:11 +0300, Trippy Samurai , 
wrote:
> Getting error while working with template view
>
> views.py
>
>
> class DeveloperTicketView(TemplateView):
>
> def get_template_names(self):
> if self.request.get('status') == 'Opened':
> template_name = 'app/open_tickets.html'
> elif self.request.get('status') == 'Accepted':
> template_name = 'app/dev_accepted_tickets'
> elif self.request.get('status') == "Completed":
> template_name = 'app/dev_completed_tickets.html'
> else:
> template_name = 'app/dev_closed_tickets.html'
>
> return template_name
>
>
> def get_context_data(self, **kwargs):
> context = super(DeveloperTicketView,self).get_context_data(**kwargs)
> context['open_tickets'] = Ticket.objects.filter(status = 'Opened')
> context['accepted_tickets'] = Ticket.objects.filter(status = 
> 'Accepted',accepted_by = self.request.user)
> context['completed_tickets'] = Ticket.objects.filter(status = 
> 'Completed',accepted_by = self.request.user)
> context['closed_tickets'] = Ticket.objects.filter(status = 
> 'Closed',accepted_by = self.request.user)
> return context
>  --
> 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/65cd3d84-5946-43d6-8abc-c78e4246fb07n%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/4e8ffafc-5b78-42fb-9458-3ee0b0c97c3c%40Spark.


Re: migrations: "no changes detected"

2022-02-08 Thread ramadhan ngallen
On your app(blog) on the module(folder) migrations,   make sure there is a file 
named   __init__.py


You can share app structure too
On 9 Feb 2022, 06:26 +0300, 'Delvin Alexander' via Django users 
, wrote:
> here is a list of my installed apps:
>
> i added the blog.apps but still nothing.
>
>
> INSTALLED_APPS = [    'blog.apps.BlogConfig',    'django.contrib.admin',    
> 'django.contrib.auth',    'django.contrib.contenttypes',    
> 'django.contrib.sessions',    'django.contrib.messages',    
> 'django.contrib.staticfiles',
>
>
> On Mon, Feb 7, 2022 at 9:37 PM RANGA BHARATH JINKA  
> wrote:
> > Hi,
> >
> > I think you forgot to add the app name in settings file. Please add the app 
> > names in installed apps. Then it will find out the models.
> >
> > All the best
> >
> >
> > On Tue, 8 Feb 2022, 10:14 am 'Delvin Alexander' via Django users, 
> >  wrote:
> > > I am trying to run migrations so that i can create a table, but when I 
> > > type out, "python manage.py makemigrations"
> > > it returns this: "no changes detected"
> > >
> > > would anyone know the reason for this?
> > >  --
> > > 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/639770ea-db24-469a-a123-6f4cb2af3036n%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/CAK5m314skg-HBhQx25mxzg4rHEp8-5jZEX8%2BT9Kr8uDHv-bR5A%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/CADq-sifxMbkc%3DyZdXOw_RUwBq8QiKLUU_TY9RaC9ZfSytSq1%2BA%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/d8834a19-4ff1-48e2-b101-046f9b9f0814%40Spark.


Re: migrations: "no changes detected"

2022-02-08 Thread ramadhan ngallen
Your apps should be below django default apps
I.e below static files


On users you can

from django.contrib.auth import get_user_model

Then initiate it as

User = get_user_model()

To use it
E.g

my_users = User.objects.all()
On 9 Feb 2022, 07:05 +0300, 'Delvin Alexander' via Django users 
, wrote:
> there is! but will this have something to do with it?
> - "from django.contrib.auth.models import User"
> Rite now the error is displaying this:
> - Requested setting INSTALLED_APPS, but settings are not configured. You must 
> either define the environment variable DJANGO_SETTINGS_MODULE or call 
> settings.configure() before accessing settings.
> On Tue, Feb 8, 2022 at 7:32 PM ramadhan ngallen  wrote:
> > On your app(blog) on the module(folder) migrations,   make sure there is a 
> > file named   __init__.py
> >
> >
> > You can share app structure too
> > On 9 Feb 2022, 06:26 +0300, 'Delvin Alexander' via Django users 
> > , wrote:
> > > here is a list of my installed apps:
> > >
> > > i added the blog.apps but still nothing.
> > >
> > >
> > > INSTALLED_APPS = [    'blog.apps.BlogConfig',    'django.contrib.admin',  
> > >   'django.contrib.auth',    'django.contrib.contenttypes',    
> > > 'django.contrib.sessions',    'django.contrib.messages',    
> > > 'django.contrib.staticfiles',
> > >
> > > On Mon, Feb 7, 2022 at 9:37 PM RANGA BHARATH JINKA 
> > >  wrote:
> > > > Hi,
> > > >
> > > > I think you forgot to add the app name in settings file. Please add the 
> > > > app names in installed apps. Then it will find out the models.
> > > >
> > > > All the best
> > > >
> > > >
> > > > On Tue, 8 Feb 2022, 10:14 am 'Delvin Alexander' via Django users, 
> > > >  wrote:
> > > > > I am trying to run migrations so that i can create a table, but when 
> > > > > I type out, "python manage.py makemigrations"
> > > > > it returns this: "no changes detected"
> > > > >
> > > > > would anyone know the reason for this?
> > > > >  --
> > > > > 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/639770ea-db24-469a-a123-6f4cb2af3036n%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/CAK5m314skg-HBhQx25mxzg4rHEp8-5jZEX8%2BT9Kr8uDHv-bR5A%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/CADq-sifxMbkc%3DyZdXOw_RUwBq8QiKLUU_TY9RaC9ZfSytSq1%2BA%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/d8834a19-4ff1-48e2-b101-046f9b9f0814%40Spark.
>  --
> 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/CADq-sicjbjRUs%3DrCpnf7xX79NZ55mEdEWTd8ixv%3D4%2BURoSuh%2Bg%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/dffe972f-9ab3-451e-99c4-90b3c5b1f406%40Spark.


Re: migrations: "no changes detected"

2022-02-08 Thread ramadhan ngallen
Share project structure as an image and details project settings(settings.py)
On 9 Feb 2022, 07:05 +0300, 'Delvin Alexander' via Django users 
, wrote:
> there is! but will this have something to do with it?
> - "from django.contrib.auth.models import User"
> Rite now the error is displaying this:
> - Requested setting INSTALLED_APPS, but settings are not configured. You must 
> either define the environment variable DJANGO_SETTINGS_MODULE or call 
> settings.configure() before accessing settings.
> On Tue, Feb 8, 2022 at 7:32 PM ramadhan ngallen  wrote:
> > On your app(blog) on the module(folder) migrations,   make sure there is a 
> > file named   __init__.py
> >
> >
> > You can share app structure too
> > On 9 Feb 2022, 06:26 +0300, 'Delvin Alexander' via Django users 
> > , wrote:
> > > here is a list of my installed apps:
> > >
> > > i added the blog.apps but still nothing.
> > >
> > >
> > > INSTALLED_APPS = [    'blog.apps.BlogConfig',    'django.contrib.admin',  
> > >   'django.contrib.auth',    'django.contrib.contenttypes',    
> > > 'django.contrib.sessions',    'django.contrib.messages',    
> > > 'django.contrib.staticfiles',
> > >
> > > On Mon, Feb 7, 2022 at 9:37 PM RANGA BHARATH JINKA 
> > >  wrote:
> > > > Hi,
> > > >
> > > > I think you forgot to add the app name in settings file. Please add the 
> > > > app names in installed apps. Then it will find out the models.
> > > >
> > > > All the best
> > > >
> > > >
> > > > On Tue, 8 Feb 2022, 10:14 am 'Delvin Alexander' via Django users, 
> > > >  wrote:
> > > > > I am trying to run migrations so that i can create a table, but when 
> > > > > I type out, "python manage.py makemigrations"
> > > > > it returns this: "no changes detected"
> > > > >
> > > > > would anyone know the reason for this?
> > > > >  --
> > > > > 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/639770ea-db24-469a-a123-6f4cb2af3036n%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/CAK5m314skg-HBhQx25mxzg4rHEp8-5jZEX8%2BT9Kr8uDHv-bR5A%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/CADq-sifxMbkc%3DyZdXOw_RUwBq8QiKLUU_TY9RaC9ZfSytSq1%2BA%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/d8834a19-4ff1-48e2-b101-046f9b9f0814%40Spark.
>  --
> 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/CADq-sicjbjRUs%3DrCpnf7xX79NZ55mEdEWTd8ixv%3D4%2BURoSuh%2Bg%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/01b0e25c-4b3c-470d-a594-b2ad2b26ee25%40Spark.


Re: Need best tutorial

2022-06-12 Thread ramadhan ngallen
Use this from Telusko



https://youtube.com/playlist?list=PLsyeobzWxl7poL9JTVyndKe62ieoN-MZ3
On 13 Jun 2022, 01:36 +0300, 'Kasper Laudrup' via Django users 
, wrote:
> On 12/06/2022 07.54, Ghalib Raja wrote:
> > hi there, i am beginner in python. can anyone share python best tutorial
> > for web development please
> >
>
> Learn the basics of Python first then focus on web development later.
>
> If you already have some experience with other languages I found this
> freely licensed book quite useful:
>
> https://diveintopython3.net/
>
> If you are a beginner in programming in general, Python is definitely a
> good starting language IMO but there might be better resources for
> absolute beginners that someone else can share.
>
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/f8ec44cb-d1c5-99fb-ce5e-3cefcda67fa2%40stacktrace.dk.

-- 
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/70596932-7b69-40a7-b5b7-f1829e3af851%40Spark.


Re: What is this error mean and what can I do

2019-05-26 Thread ramadhan ngallen
You got this error because you didn't perform migrations to create the table in 
your database

Run>> python manage.py makemigrations

It will create migration number under migrations. Then make sqlmigrations

>> python manage.py sqlmigration   
It will create sql scripts to create a table on your database, then make 
migrations

>>python manage.py migrate


You may skip sqlmigration and still table will be created but is the best 
practice to run it so that you can preview how table will look like.
Remeer to perform migrations each time you create or modify your models

Best Regards

Ramadhan Ngallen
On 27 May 2019, 01:15 +0300, Saeed Pooladzadeh , wrote:
>
> Hi
>
> This is my model:
> from django.db import models
> from django.conf import settings
>
>
> # Create your models here.
> class Smodel(models.Model):
>     eid=models.IntegerField()
>     elogin = models.CharField(max_length=8)
>     epassword= models.CharField(max_length=8)
>
>     elikeDay=models.IntegerField()
>     efollowPerDay=models.IntegerField()
>
>
>
>     #esession = models.TextField()
>     class Meta:
>         db_table = "saeed"
>
> And I get this error:
> OperationalError at /emp
> no such table: saeed
> Request Method:
> POST
> Request URL:
> http://localhost:50021/emp
> Django Version:
> 2.2
> Exception Type:
> OperationalError
> Exception Value:
> no such table: saeed
> Exception Location:
> E:\Django_Try\bot4\bot3\env\lib\site-packages\django\db\backends\sqlite3\base.py
>  in execute, line 383
> Python Executable:
> E:\Django_Try\bot4\bot3\env\Scripts\python.exe
> Python Version:
> 3.6.6
> Python Path:
> ['E:\\Django_Try\\bot4\\bot3',
> '',
> 'E:\\Django_Try\\bot4\\bot3',
> 'E:\\Django_Try\\bot4\\bot3\\env\\Scripts\\python36.zip',
> 'C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Python36_64\\DLLs',
> 'C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Python36_64\\lib',
> 'C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Python36_64',
> 'E:\\Django_Try\\bot4\\bot3\\env',
> 'E:\\Django_Try\\bot4\\bot3\\env\\lib\\site-packages']
> Server time:
> Sun, 26 May 2019 22:05:31 +
>
> What is mean and what can I do?
>
> tnanks
> Saeed
>
> --
> 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/cf149a11-d875-4d5f-b5be-85dead85fdb1%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/5c9a2ab5-1642-4a13-8b5a-14d2b1a3b8fd%40Spark.
For more options, visit https://groups.google.com/d/optout.


Re: AutoField

2019-05-27 Thread ramadhan ngallen
By Default each model in django has one primary key (id) which is also auto 
filled. If you don't want to use django's autofilled primary key, you suppose 
to make custom primary key
 You may use the link below
https://docs.djangoproject.com/en/2.2/topics/db/models/

Best Regards

Ramadhan Ngallen
On 27 May 2019, 07:30 +0300, Saeed Pooladzadeh , wrote:
>
> But I have just one AutoField()!!!
> در دوشنبه 27 مهٔ 2019، ساعت 5:40:19 (UTC+4:30)، Yoo نوشته:
> > Probably because you have two AutoFields. You can’t have two in the same 
> > model. Set this to eid=models.AutoField(primary_key=True)
> >
> > This is because Django models automatically makes an id autofield primary 
> > key if nothing else is set as pk.
> >
> > > On Sun, May 26, 2019 at 9:05 PM Bob Gailer  wrote:
> > > > On May 26, 2019 8:16 PM, "Saeed Pooladzadeh"  wrote:
> > > > >
> > > > >
> > > > > Hi
> > > > >
> > > > > When I add this line in my model:
> > > > >
> > > > > eid=models.AutoField()
> > > > >
> > > > > I see error in my migration!!
> > > > >
> > > > > What is the problem?
> > > > >
> > > > > I don't know what your problem is but our problem is that we have no 
> > > > > idea what error you got. Please copy and paste the entire error 
> > > > > message into your reply and also reply all so that everyone gets to 
> > > > > read your response stop
> > > > --
> > > > 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...@googlegroups.com.
> > > > To post to this group, send email to django...@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/CAP1rxO7ROcWYL9LYO4XMt8_gHmgd74gMJ%3D0yo2pjdegkNekZfQ%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/f4ee9408-064c-4720-9b66-19f00651836b%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/43189e74-13b7-417c-8a07-17f6f7adb237%40Spark.
For more options, visit https://groups.google.com/d/optout.


Wrong Redirect

2019-06-20 Thread ramadhan ngallen
Hello Team
I created an app(called users) for user registration
If user enter two mismatched password an app should redirect to the same
page. otherwise it should redirect to the homepage
Unfortunately when user enter two mismatched password it redirect to the
wrong url http://127.0.0.1:8000/users/register/register
and also if user enter matched password it also redirect to the wrong url
http://127.0.0.1:8000/users/register/register

 its view.py
from django.shortcuts import render, redirect
from django.contrib.auth.models import User, auth


# Create your views here.


def register(request):

if request.method == 'POST':
first_name = request.POST['first_name']
first_name = first_name.title
last_name = request.POST['last_name']
last_name = last_name.title
username = request.POST['username']
password1 = request.POST['password1']
password2 = request.POST['password2']
email = request.POST['email']
if password1 == password2:
user = User.objects.create_user(
username=username, first_name=first_name, last_name=last_name, email=email,
password=password1)

user.save()
print('user created')
return redirect('/travello/')

else:
return render(request, 'users/register.html')

else:
return render(request, 'users/register.html')
I have also created its urls.py as follows
from . import views
from django.urls import path


app_name = 'users'

*urlpatterns = [*
* path('register/', views.register, name='register'),*
]

Settings.py
INSTALLED_APPS = [
* 'users.apps.UsersConfig',*
'travello.apps.TravelloConfig',
'calc.apps.CalcConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
user app directory

[image: image.png]

-- 
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/CAAhXuBF07Q72_mi1AfPJ5LHHmaEdd5PhvQ79ToqSvpEt0gCivg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Wrong Redirect

2019-06-21 Thread ramadhan ngallen
hello still it redirect to the wrong path
http://127.0.0.1:8000/users/register/register

On Thu, Jun 20, 2019 at 12:24 PM Sipum Mishra  wrote:

> Hi Ramadhan,
>
> Instead of rendering to any page please use HttpResponseRedirect('put home
> page url where u want to redirect' ).
>
> And also import django.http import HttpResponseRedirect
>
> Do the above & let me know. I hope it will work.
>
> On Thu, 20 Jun, 2019, 2:41 PM ramadhan ngallen, 
> wrote:
>
>> Hello Team
>> I created an app(called users) for user registration
>> If user enter two mismatched password an app should redirect to the same
>> page. otherwise it should redirect to the homepage
>> Unfortunately when user enter two mismatched password it redirect to the
>> wrong url http://127.0.0.1:8000/users/register/register
>> and also if user enter matched password it also redirect to the wrong url
>> http://127.0.0.1:8000/users/register/register
>>
>>  its view.py
>> from django.shortcuts import render, redirect
>> from django.contrib.auth.models import User, auth
>>
>>
>> # Create your views here.
>>
>>
>> def register(request):
>>
>> if request.method == 'POST':
>> first_name = request.POST['first_name']
>> first_name = first_name.title
>> last_name = request.POST['last_name']
>> last_name = last_name.title
>> username = request.POST['username']
>> password1 = request.POST['password1']
>> password2 = request.POST['password2']
>> email = request.POST['email']
>> if password1 == password2:
>> user = User.objects.create_user(
>> username=username, first_name=first_name, last_name=last_name, email=email,
>> password=password1)
>>
>> user.save()
>> print('user created')
>> return redirect('/travello/')
>>
>> else:
>> return render(request, 'users/register.html')
>>
>> else:
>> return render(request, 'users/register.html')
>> I have also created its urls.py as follows
>> from . import views
>> from django.urls import path
>>
>>
>> app_name = 'users'
>>
>> *urlpatterns = [*
>> * path('register/', views.register, name='register'),*
>> ]
>>
>> Settings.py
>> INSTALLED_APPS = [
>> * 'users.apps.UsersConfig',*
>> 'travello.apps.TravelloConfig',
>> 'calc.apps.CalcConfig',
>> 'django.contrib.admin',
>> 'django.contrib.auth',
>> 'django.contrib.contenttypes',
>> 'django.contrib.sessions',
>> 'django.contrib.messages',
>> 'django.contrib.staticfiles',
>> user app directory
>>
>> [image: image.png]
>>
>>
>>
>>
>>
>>
>> --
>> 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/CAAhXuBF07Q72_mi1AfPJ5LHHmaEdd5PhvQ79ToqSvpEt0gCivg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAAhXuBF07Q72_mi1AfPJ5LHHmaEdd5PhvQ79ToqSvpEt0gCivg%40mail.gmail.com?utm_medium=email&utm_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/CAGHZBzx-XO4S58msQB%3DJmV9UAgDJmfk7dDOco2JZr4uXQer%3DYQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAGHZBzx-XO4S58msQB%3DJmV9UAgDJmfk7dDOco2JZr4uXQer%3DYQ%40mail.gmail.com?utm_medium=email&utm_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/CAAhXuBGWZWtvpvXPg8U_Zj6VKFa2sqSJXNKUcx9N9K%3DoM-wbLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


WORKFLOWS

2019-06-23 Thread ramadhan ngallen
Hello django users
I want to ask if it's possible to develop web application with approval 
workflows in django.  Where  will be approval groups and user can be linked and 
unlinked to those approval groups. Approval policy can be either half of the 
members of the group to approval or anyone among the member can approval or all 
of them needed to approval before transaction can go to the next step. The one 
who initiated the transaction will bet notification through email upon approval 
or rejection. On top of that the one initiated can see the approval progress.

Is there any recommendations you can provide for this scenario?

-- 
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/50e12728-242b-48f2-aa90-f6e95ffb845a%40Spark.
For more options, visit https://groups.google.com/d/optout.


Re: WORKFLOWS

2019-06-24 Thread ramadhan ngallen
Thanks a lot
On 24 Jun 2019, 17:37 +0300, Brandon Rosenbloom , 
wrote:
> I know of developers which have used viewflow to accomplish this. Here’s a 
> link:
> https://github.com/viewflow/viewflow
>
> --
> 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/0ddcd4dc-63e5-4045-824a-cf45712290fb%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/4bc5ed41-205a-4bb0-a4e2-fad564c2972f%40Spark.
For more options, visit https://groups.google.com/d/optout.


Re: Django Login Problem

2020-03-29 Thread ramadhan ngallen
Why your templates shows some of the codes like {% csrf_token %}, for loops  
and so on? Check your templates first are not okay.
After signup log in to the admin panel as an admin and check if the user has 
been created on the database. You can also log in to your database to inspect 
this.

Does your app name called "app"? If so kindly on project ulrs change to
url(r'^',include(app.urls)), instead of
url(r'^',include(appurls))

And on app.urls add this
app_name ="app"
This is how name spacing on django work
On 29 Mar 2020, 16:55 +0300, Antje Kazimiers , wrote:
> Hi,
>
> It sounds like you don't get an error message, so maybe your authenticate 
> method in
>
> def sign_in(request)
>
> just returns a None user and you get redirected. I would find this method in 
> your django installation, for me it's in the env folder but that depends on 
> your setup:
>
> ./env/lib/python3.7/site-packages/django/contrib/auth/__init__.py
>
> and debug into it or add some print statements to see why this is failing.
>
> Antje
>
> > On 29. Mar 2020, at 10:33, pratiksha jain  
> > wrote:
> >
> > I have problem in loging in after signing up. I have tried all the methods 
> > that I can try, I want to know my errors.
> > 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/f542af27-682f-4528-b1e8-70acfc6c8e1e%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/820B2E17-AB07-4F17-9117-88D1AD3B7ED4%40gmail.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/77ead107-a8dd-4462-b043-a52db4b4912c%40Spark.


Re: OperationalError at /admin/login/attempt to write a readonly database

2020-05-03 Thread ramadhan ngallen
In short, it happens when the application which writes to the sqlite database 
does not have write permission.

You have to add writing rights to the directory in which your sqlite database 
is stored. So running chmod 664 /srv/mysite should help.
This is a security risk, so better solution is to change the owner of your 
database to www-data:
chown www-data:www-data /srv/mysite
chown www-data:www-data /srv/mysite/DATABASE.sqlite
On 3 May 2020, 22:31 +0300, Amina Anna Mahamane.O , wrote:
>
> 
> Envoyé de mon iPhone
>
> > Le 3 mai 2020 à 15:25, Jorge Gimeno  a écrit :
> >
> >
> >
> > > On Sun, May 3, 2020 at 3:46 AM Amina Anna Mahamane.O 
> > >  wrote:
> > > > I read , but I didn’t help me , I don’t really know hiw to process . 
> > > > Can you explain me ?
> > >
> > > I'm not a linux expert, so other folks can feel free to correct me.
> > >
> > > In linux, the user that creates the file in a directory they have access 
> > > to has "ownership" of the file.  With that, the user can both read and 
> > > write to the file.  All other users (except for sudo users, I believe) 
> > > have read-only access by default.
> > >
> > > That's what's happening here.  When you ran migrations as the currently 
> > > logged in user, your user has read and write permissions.  Apache, 
> > > however, runs as a different user, so it cannot write to the database.
> > >
> > > That answer I linked did have some things to try, in addition to a link 
> > > to more general question about permissions.  The file you would need to 
> > > change permissioins on (since you're using sqlite3, which is file based) 
> > > is named (without quotes) "db.sqlite3'.
> > >
> > > Hope this helps!
> > >
> > > -Jorge
> > > >
> > > > Envoyé de mon iPhone
> > > >
> > > > > Le 3 mai 2020 à 05:21, Jorge Gimeno  a écrit :
> > > > >
> > > > >
> > > > >
> > > > > > On Sat, May 2, 2020 at 8:09 PM Amina Anna Mahamane.O 
> > > > > >  wrote:
> > > > > > > Hello , I started learning how to use django . I made a project 
> > > > > > > without a virtual environnement and without apach2 andn mod wsgi .
> > > > > > > Now am I trying to do a project with those ones . I am a beginner 
> > > > > > > .When I try to log in to the administration interface, the error 
> > > > > > > below appears.I've been looking for solutions on the internet for 
> > > > > > > hours and hours but I didn't find anything which can help me to 
> > > > > > > solve my problem. I have no idea what could have caused this 
> > > > > > > error.I really need help, it's urgent. I wish someone can answer 
> > > > > > > to me in french but if it is not possible, help me anyway, I will 
> > > > > > > manage.
> > > > > > >
> > > > > > > OperationalError at /admin/login/
> > > > > > > attempt to write a readonly database
> > > > > > > Request Method:
> > > > > > > POST
> > > > > > > Request URL:
> > > > > > > http://www.djangoproject.localhost/admin/login/?next=/admin/
> > > > > > > Django Version:
> > > > > > > 3.0.5
> > > > > > > Exception Type:
> > > > > > > OperationalError
> > > > > > > Exception Value:
> > > > > > > attempt to write a readonly database
> > > > > > > Exception Location:
> > > > > > > /home/kirikou/mysite/env/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py
> > > > > > >  in execute, line 396
> > > > > > > Python Executable:
> > > > > > > /home/kirikou/mysite/env/bin/python
> > > > > > > Python Version:
> > > > > > > 3.7.5
> > > > > > > Python Path:
> > > > > > > ['/home/kirikou/mysite',
> > > > > > > '/usr/lib/python37.zip',
> > > > > > > '/usr/lib/python3.7',
> > > > > > > '/usr/lib/python3.7/lib-dynload',
> > > > > > > '/home/kirikou/mysite/env/lib/python3.7/site-packages']
> > > > > > > Server time:
> > > > > > > Sat, 2 May 2020 21:39:20 +
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Environment:
> > > > > > >
> > > > > > >
> > > > > > > Request Method: POST
> > > > > > > Request URL: 
> > > > > > > http://www.djangoproject.localhost/admin/login/?next=/admin/
> > > > > > >
> > > > > > > Django Version: 3.0.5
> > > > > > > Python Version: 3.7.5
> > > > > > > Installed Applications:
> > > > > > > ['applis.apps.ApplisConfig',
> > > > > > >  'django.contrib.admin',
> > > > > > >  'django.contrib.auth',
> > > > > > >  'django.contrib.contenttypes',
> > > > > > >  'django.contrib.sessions',
> > > > > > >  'django.contrib.messages',
> > > > > > >  'django.contrib.staticfiles',
> > > > > > >  'django.contrib.admindocs']
> > > > > > > Installed Middleware:
> > > > > > > ['django.middleware.security.SecurityMiddleware',
> > > > > > >  'django.contrib.sessions.middleware.SessionMiddleware',
> > > > > > >  'django.middleware.common.CommonMiddleware',
> > > > > > >  'django.middleware.csrf.CsrfViewMiddleware',
> > > > > > >  'django.contrib.auth.middleware.AuthenticationMiddleware',
> > > > > > >  'django.contrib.messages.middleware.MessageMiddleware',
> > > > > > >  'django.middleware.clickjacking.XFrameOptionsMiddleware']
> > > > > > >
> > > > > > >
> > > > > >

Re: how to install pyenv-virtualenv on windows

2021-01-10 Thread ramadhan ngallen
Alternatively, You can use virtualenvwrapper-win
On 10 Jan 2021, 18:00 +0300, Kunal Solanke , wrote:
> I recently started using pipenv, but still I can say its best thing so far I 
> have used for storing env variables,creating venv and etc,with one simple 
> command your virtualenv will be activated,without having to worry about where 
> your venv files are ,path and etc .
> Have a look at it. What do you think about pipenv Kasper?
>
> On Sun, Jan 10, 2021, 20:19 Kasper Laudrup  wrote:
> > On 09/01/2021 19.27, Sohail Tanveer wrote:
> > > im facing difficulty to install pyenv-virtual env on my windows 10
> > > i googled it several times but it directs me to a git repo where there
> > > is an installation process but is of no use because, the command that is
> > > displayed is not working in my cmd
> >
> > It would greatly improve your chances of getting some useful help if you
> > clarify which git repo you are talking about, which command you are
> > trying to using and what exactly you mean by "not working".
> >
> > Unless you want to leave that as an exercise for the reader.
> >
> > 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 view this discussion on the web visit 
> > https://groups.google.com/d/msgid/django-users/a9d0924c-2906-c97a-3a76-12f06190a188%40stacktrace.dk.
>  --
> 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/CAOecAnwtx4up_mOAJMJH%2BD6o0LZQ3tsUZ5EMxu5YCDuXoHOuHw%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/9859ed28-fdb3-487b-b531-6114149a9a2f%40Spark.


Re: Reports in Django

2021-01-17 Thread ramadhan ngallen
Use reportlab or weasyprint as alternative to crystal reports they both depends 
on css
On 17 Jan 2021, 16:29 +0300, Ali Sufyan , wrote:
> Hi All:
>
> Do we have report making library like crystal reports
>  --
> 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/1b11bbd4-4928-42f9-b905-014100b0128an%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/ce00bea9-6610-4f52-aed2-69cbc565fd1f%40Spark.


How to Handle Media on Production

2021-02-21 Thread ramadhan ngallen
Hello Team. I have created an app that integrated with an Accounting system 
(sage evolution). Everything works fine on debug mode. But I face a challenge 
on media files on production. Django app deployed on appache with windows 
server. How can I handle media files on production. Currently when user attach 
media files, it doesn't save media on media directory.


What is the best way to use nginx to handle static files, If I wil get tutorial 
for this please

-- 
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/d5dc926d-ffaf-47d1-8dee-6be66cfb523e%40Spark.


How to Handle Media on Production

2021-02-21 Thread ramadhan ngallen
Hello Team. I have created an app that integrated with an Accounting system 
(sage evolution). Everything works fine on debug mode. But I face a challenge 
on media files on production. Django app deployed on appache with windows 
server. How can I handle media files on production. Currently when user attach 
media files, it doesn't save media on media directory.


What is the best way to use nginx to handle static files, If I wil get tutorial 
for this please

-- 
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/765f595d-dcdf-4990-aeed-7847e2147d04%40Spark.


Re: How to Handle Media on Production

2021-02-21 Thread ramadhan ngallen
I have managed to fix it by overding virtualhost file.
On 21 Feb 2021, 21:58 +0300, Ryan Nowakowski , wrote:
>
>
> On February 21, 2021 4:42:21 AM CST, ramadhan ngallen  
> wrote:
> > Hello Team. I have created an app that integrated with an Accounting
> > system (sage evolution). Everything works fine on debug mode. But I
> > face a challenge on media files on production. Django app deployed on
> > appache with windows server. How can I handle media files on
> > production. Currently when user attach media files, it doesn't save
> > media on media directory.
> >
>
> What error are you getting? Traceback?
>
> --
> 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/16749078-0385-4872-8CF7-D48420579E9D%40fattuba.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/2f4d54da-7bac-4676-9e0d-ac6cd2caeb87%40Spark.


Re: Django does't send email on the remote server

2021-02-23 Thread ramadhan ngallen
Change
EMAIL_PORT = 465
EMAIL_USE_TLS=False
EMAIL_USE_SSL=True

On your sendmail function set sail_silently=False so that we can  see an error 
on terminal
On 23 Feb 2021, 14:15 +0300, Sergei Sokov , wrote:
> 'setting.py'
> EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
> EMAIL_HOST_USER = "em...@gmail.com"
> EMAIL_HOST = "smtp.gmail.com" EMAIL_PORT = 587
> EMAIL_USE_TLS = True
> EMAIL_HOST_PASSWORD = "Your_Password"
>
>  • I have chtcked spam, I have tried different email services
>  • I switched the security allow less secure app on
> вторник, 23 февраля 2021 г. в 12:05:27 UTC+1, anubhavg...@gmail.com:
> > you should be using app password instead of less secure option
> >
> > On Tue, Feb 23, 2021 at 3:36 PM Sergei Sokov  wrote:
> > > I am trying to send an email when a user fills out a form on my site.
> > > Everything works on my local server, letters are sent and I am got them.
> > > On a remote timeweb.com server with the same settings, letters are not 
> > > sent.
> > > Tried DEBUG = False and True
> > > I tried different mail services: gmail, mail, yandex, timeweb mail.
> > > In gmail included "Unreliable applications that have access to the 
> > > account".
> > > And here I included https://accounts.google.com/DisplayUnlockCaptcha
> > > Nothing helps.
> > >
> > > Who knows, please tell me where to dig.
> > > --
> > > 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...@googlegroups.com.
> > > To view this discussion on the web visit 
> > > https://groups.google.com/d/msgid/django-users/9c081e17-30ad-4bf9-9728-6b3010b3736an%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/5a345341-e0b6-4d81-87d4-b2cbdcbbd1c0n%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/450d8109-6251-4975-9fbc-73bf8286dd5a%40Spark.


Re: please help me to solve this error

2021-05-02 Thread ramadhan ngallen
Show settings.py INSTALLED_APPS list. It seems you added an app named 
"documentation" .
On 2 May 2021, 12:25 +0300, Bheemanagowda S Gowdra , 
wrote:
> sorry i am new to django and learning from youtube,
>
> i don't know what is happening while running "python manage.py runserver"
>
> On Sun, May 2, 2021 at 2:49 PM Kasper Laudrup  wrote:
> > Have a look here:
> >
> > https://betterprogramming.pub/how-to-ask-questions-about-programming-dcd948fcd2bd
> > 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 view this discussion on the web visit 
> > https://groups.google.com/d/msgid/django-users/933a0ad2-e5db-7f02-91db-e4ad36b1791b%40stacktrace.dk.
>  --
> 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/CAC7OE0sZFVsOyc9CSQ-B996HV23yu9nUhcZMJtiFj3OPPR-KnQ%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/a18e320a-c3cb-4c77-b26e-727c2396acf5%40Spark.


Re: please help me to solve this error

2021-05-02 Thread ramadhan ngallen
Remove the app called documentation and replace it with foodcode. From 
directory you don't have an app called documentation
On 2 May 2021, 12:41 +0300, Bheemanagowda S Gowdra , 
wrote:
> this screenshot of settings.py INSTALLED_APPS list
> 
>
> On Sun, May 2, 2021 at 3:00 PM ramadhan ngallen  wrote:
> > Show settings.py INSTALLED_APPS list. It seems you added an app named 
> > "documentation" .
> > On 2 May 2021, 12:25 +0300, Bheemanagowda S Gowdra , 
> > wrote:
> > > sorry i am new to django and learning from youtube,
> > >
> > > i don't know what is happening while running "python manage.py runserver"
> > >
> > > On Sun, May 2, 2021 at 2:49 PM Kasper Laudrup  
> > > wrote:
> > > > Have a look here:
> > > >
> > > > https://betterprogramming.pub/how-to-ask-questions-about-programming-dcd948fcd2bdKind
> > > >  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 view this discussion on the web visit 
> > > > https://groups.google.com/d/msgid/django-users/933a0ad2-e5db-7f02-91db-e4ad36b1791b%40stacktrace.dk.
> > >  --
> > > 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/CAC7OE0sZFVsOyc9CSQ-B996HV23yu9nUhcZMJtiFj3OPPR-KnQ%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/a18e320a-c3cb-4c77-b26e-727c2396acf5%40Spark.
>  --
> 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/CAC7OE0v1ugGHXKU7moBYJvf5czFx2D%3D5u8iWdY7Q18c2g0w0xw%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/42a7e168-bbb0-40c3-9765-cc54cf2136ee%40Spark.


Re: please help me to solve this error

2021-05-02 Thread ramadhan ngallen
Don't forget to add comma , at the end of each installed apps list.
On 2 May 2021, 12:41 +0300, Bheemanagowda S Gowdra , 
wrote:
> this screenshot of settings.py INSTALLED_APPS list
> 
>
> On Sun, May 2, 2021 at 3:00 PM ramadhan ngallen  wrote:
> > Show settings.py INSTALLED_APPS list. It seems you added an app named 
> > "documentation" .
> > On 2 May 2021, 12:25 +0300, Bheemanagowda S Gowdra , 
> > wrote:
> > > sorry i am new to django and learning from youtube,
> > >
> > > i don't know what is happening while running "python manage.py runserver"
> > >
> > > On Sun, May 2, 2021 at 2:49 PM Kasper Laudrup  
> > > wrote:
> > > > Have a look here:
> > > >
> > > > https://betterprogramming.pub/how-to-ask-questions-about-programming-dcd948fcd2bdKind
> > > >  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 view this discussion on the web visit 
> > > > https://groups.google.com/d/msgid/django-users/933a0ad2-e5db-7f02-91db-e4ad36b1791b%40stacktrace.dk.
> > >  --
> > > 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/CAC7OE0sZFVsOyc9CSQ-B996HV23yu9nUhcZMJtiFj3OPPR-KnQ%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/a18e320a-c3cb-4c77-b26e-727c2396acf5%40Spark.
>  --
> 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/CAC7OE0v1ugGHXKU7moBYJvf5czFx2D%3D5u8iWdY7Q18c2g0w0xw%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/4e0e207d-ac68-4c22-9c71-9baa0a1ec9ee%40Spark.


Re: please help me to solve this error

2021-05-02 Thread ramadhan ngallen
Expand your template directory so that we can see if documentation.html is 
existing
On 2 May 2021, 12:47 +0300, Bheemanagowda S Gowdra , 
wrote:
> yes i got my mistake(instead of writing app name wrote html file name)
>
> but after this also getting same error
>
> On Sun, May 2, 2021 at 3:10 PM Bheemanagowda S Gowdra  
> wrote:
> > this screenshot of settings.py INSTALLED_APPS list
> > 
> >
> > On Sun, May 2, 2021 at 3:00 PM ramadhan ngallen  wrote:
> > > Show settings.py INSTALLED_APPS list. It seems you added an app named 
> > > "documentation" .
> > > On 2 May 2021, 12:25 +0300, Bheemanagowda S Gowdra 
> > > , wrote:
> > > > sorry i am new to django and learning from youtube,
> > > >
> > > > i don't know what is happening while running "python manage.py 
> > > > runserver"
> > > >
> > > > On Sun, May 2, 2021 at 2:49 PM Kasper Laudrup  
> > > > wrote:
> > > > > Have a look here:
> > > > >
> > > > > https://betterprogramming.pub/how-to-ask-questions-about-programming-dcd948fcd2bdKind
> > > > >  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 view this discussion on the web visit 
> > > > > https://groups.google.com/d/msgid/django-users/933a0ad2-e5db-7f02-91db-e4ad36b1791b%40stacktrace.dk.
> > > >  --
> > > > 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/CAC7OE0sZFVsOyc9CSQ-B996HV23yu9nUhcZMJtiFj3OPPR-KnQ%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/a18e320a-c3cb-4c77-b26e-727c2396acf5%40Spark.
>  --
> 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/CAC7OE0sSHyuZwKuB24sv4iXUnQZZPfrSBZbvbnihscRtA_gAiQ%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/ea45bb55-4e3d-417e-9791-1b470a889348%40Spark.


Re: please help me to solve this error

2021-05-02 Thread ramadhan ngallen
Save your project it's not using autosave. Add trailing comma at the end DIR 
list of template directories then run migrations and observe the error on 
Terminal
On 2 May 2021, 12:52 +0300, Bheemanagowda S Gowdra , 
wrote:
> 
>
> On Sun, May 2, 2021 at 3:19 PM ramadhan ngallen  wrote:
> > Expand your template directory so that we can see if documentation.html is 
> > existing
> > On 2 May 2021, 12:47 +0300, Bheemanagowda S Gowdra , 
> > wrote:
> > > yes i got my mistake(instead of writing app name wrote html file name)
> > >
> > > but after this also getting same error
> > >
> > > On Sun, May 2, 2021 at 3:10 PM Bheemanagowda S Gowdra 
> > >  wrote:
> > > > this screenshot of settings.py INSTALLED_APPS list
> > > > 
> > > >
> > > > On Sun, May 2, 2021 at 3:00 PM ramadhan ngallen  
> > > > wrote:
> > > > > Show settings.py INSTALLED_APPS list. It seems you added an app named 
> > > > > "documentation" .
> > > > > On 2 May 2021, 12:25 +0300, Bheemanagowda S Gowdra 
> > > > > , wrote:
> > > > > > sorry i am new to django and learning from youtube,
> > > > > >
> > > > > > i don't know what is happening while running "python manage.py 
> > > > > > runserver"
> > > > > >
> > > > > > On Sun, May 2, 2021 at 2:49 PM Kasper Laudrup 
> > > > > >  wrote:
> > > > > > > Have a look here:
> > > > > > >
> > > > > > > https://betterprogramming.pub/how-to-ask-questions-about-programming-dcd948fcd2bdKind
> > > > > > >  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 view this discussion on the web visit 
> > > > > > > https://groups.google.com/d/msgid/django-users/933a0ad2-e5db-7f02-91db-e4ad36b1791b%40stacktrace.dk.
> > > > > >  --
> > > > > > 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/CAC7OE0sZFVsOyc9CSQ-B996HV23yu9nUhcZMJtiFj3OPPR-KnQ%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/a18e320a-c3cb-4c77-b26e-727c2396acf5%40Spark.
> > >  --
> > > 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/CAC7OE0sSHyuZwKuB24sv4iXUnQZZPfrSBZbvbnihscRtA_gAiQ%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/ea45bb55-4e3d-417e-9791-1b470a889348%40Spark.
>  --
> 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/CAC7OE0tFCqxdcKYvVFnkDw8LPeZ17FsU6rUKZV2t_NK%2B%2BhRH8w%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/0f03a6e7-4f8f-48c8-b0cc-06dfb6120861%40Spark.


Re: please help me to solve this error

2021-05-02 Thread ramadhan ngallen
Did you include documentation.urls in your project urls instead of 
foodcode.urls?
On 2 May 2021, 13:40 +0300, FIRDOUS BHAT , wrote:
> replacing the documentation app with foodcode should resolve the issue
>
> On Sun, May 2, 2021 at 3:13 PM ramadhan ngallen  wrote:
> > Remove the app called documentation and replace it with foodcode. From 
> > directory you don't have an app called documentation
> > On 2 May 2021, 12:41 +0300, Bheemanagowda S Gowdra , 
> > wrote:
> > > this screenshot of settings.py INSTALLED_APPS list
> > > 
> > >
> > > On Sun, May 2, 2021 at 3:00 PM ramadhan ngallen  
> > > wrote:
> > > > Show settings.py INSTALLED_APPS list. It seems you added an app named 
> > > > "documentation" .
> > > > On 2 May 2021, 12:25 +0300, Bheemanagowda S Gowdra 
> > > > , wrote:
> > > > > sorry i am new to django and learning from youtube,
> > > > >
> > > > > i don't know what is happening while running "python manage.py 
> > > > > runserver"
> > > > >
> > > > > On Sun, May 2, 2021 at 2:49 PM Kasper Laudrup  
> > > > > wrote:
> > > > > > Have a look here:
> > > > > >
> > > > > > https://betterprogramming.pub/how-to-ask-questions-about-programming-dcd948fcd2bdKind
> > > > > >  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 view this discussion on the web visit 
> > > > > > https://groups.google.com/d/msgid/django-users/933a0ad2-e5db-7f02-91db-e4ad36b1791b%40stacktrace.dk.
> > > > >  --
> > > > > 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/CAC7OE0sZFVsOyc9CSQ-B996HV23yu9nUhcZMJtiFj3OPPR-KnQ%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/a18e320a-c3cb-4c77-b26e-727c2396acf5%40Spark.
> > >  --
> > > 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/CAC7OE0v1ugGHXKU7moBYJvf5czFx2D%3D5u8iWdY7Q18c2g0w0xw%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/42a7e168-bbb0-40c3-9765-cc54cf2136ee%40Spark.
>  --
> 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/CAFB6YJoboNGHMheaPLLJZ4vgR6RQj_WY1Qste6Rw0xFCWKqB8w%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/b76b8520-c463-46eb-8a05-5051786b1992%40Spark.


Re: How to use correctly a FormSet in django administration

2021-05-05 Thread ramadhan ngallen
Cc cc cc cc
On 5 May 2021, 17:36 +0300, Serge Alard , wrote:
> Hello
>
> I should like to do personalised validation in Django administration but I 
> have always the same error :
> type object 'MainForm' has no attribute '_meta'
>
> To do so, I use the following admin.py (attached file)
>
> Thanks in advance to anybody who could me unblocked.
>
> Serge Alard
>
> --
> 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/f66565b5-993e-4d89-b578-fcb1c605a416n%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/6e1154e8-aabe-4ca2-bca1-d260b742f649%40Spark.


Re: Send login email notification

2021-06-08 Thread ramadhan ngallen
Create a function to send email to user then on your login view you can use 
threading module to send email by calling your send email function. Share ur 
login view and send email function I can show you how.
On 8 Jun 2021, 21:41 +0300, Eugene TUYIZERE , wrote:
> Team, I need to include email notification every time user logs in in django 
> app! Help to achieve please.
>
> Regards,
>
> T.E
>
> --
> 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/6F1484C0-FEBB-48E4-9398-14F59C7E65FE%40gmail.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/6768edc4-2f3a-45f6-b3cc-be2c68484e7e%40Spark.


Re: when i am writing {%load static%} rather than getting exectuted it is getting displayed as simple text on htmloutput screen

2021-06-29 Thread ramadhan ngallen
For security purpose these settings should be on debug=True
On production you should change those urls to have dedicated server for static 
files like   Nginx
On 30 Jun 2021, 07:28 +0300, patel dhruvish , 
wrote:
> Do you add static code in setting.py and urls.py? Code is here
>
> Setting.py:-
> Project  urls.py:-
> Then load static file with format like:-
> STATICFILES_DIRS = [
>BASE_DIR / "static",
>'/var/www/static/',
> ]
>
> Project  urls.py:-
> from django.conf import settings
> from django.conf.urls.static import static
>
> urlpatterns = [
># ... the rest of your URLconf goes here ...
> ]
> + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
> Or
> + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
>
> Then load static file with format like:-
> {% load static %}
> 
>
>
> > On Wed, Jun 30, 2021, 09:47 UJJWAL AGRAWAL  wrote:
> > > Dear all I am facing one problem.
> > > When I am writing {%load static%} rather than getting executed it is 
> > > getting displayed as simple text on the HTML output screen
> > >
> > > Please provide me the solution.
> > > --
> > > 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/CALQ%3D5fyZPWiBGnY6VJB1_C6Rb1Ls4dfsGfTef%2BBSqi1BXKHtfw%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/CANMvxF0juEz51Pua5PRAR8uNjKPsSGVkZUnDYjTTtve7hfObag%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/8f76334b-44f4-43fd-935c-d9379126ca7e%40Spark.


Re: Reg:- django application optimization

2021-07-14 Thread ramadhan ngallen
On development django handle media/static files usong staticfiles app but on 
production (debug=False) you have to use server like apache/nginx to handle 
static files (security reason)

On logger file depends on the way you write you handle how to write log files

On 14 Jul 2021, 16:34 +0300, Senthil Kumar , wrote:
> Hi Team,
> We are new to Django & Python application. Recently we are migrate from PHP. 
> We are  developed the application in Django / MySQL / UWSGI.
>
> Please guide us for following items.
>
> 1. Enabling Error Page.
>  • We did debug = False. But we are not able to access any media items using 
> the URL. - Please give any suggestion to for both • We are running the uwsgi 
> application using this comment - uwsgi --http :8000 --module .wsgi 
> --logto /var/www/html/arbllog.log &
>  • But we are getting only access log in the corresponding log file. If we 
> enable  debug = True then we are getting both access & error log. But 
> customer will get the python error page. Please let us know how can we 
> achieve this?2. Performance Optimization
>  • What are the parameters we need to include it in uwsgi.ini file inside the 
> application folder. Please share the sample ini file & steps to optimize the 
> python application.
> 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/CAPPQ_igWmAAKv4pCw%3DXYqbfBevFssy-ZQERX7T%3Dpk%3DvzrmNM2w%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/9d5fbbe9-77ed-419d-883b-0feaaeb8624d%40Spark.


Re: building mobile app

2021-07-17 Thread ramadhan ngallen
The easiest way is to create api endpoints for your django app using DRF or 
Django Ninja. Then use those api on your mobile app
On 17 Jul 2021, 20:44 +0300, Peter Kirieny , wrote:
> hello guys
> i have a functioning django website
> anyone with any easiest and cheapest idea on how to turn it into a mobile app 
> please help
> you can contact me so that we work together
>
>  --
> 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/CAL8t8eoA8e3otzQQVujA7uKVtUaNj26FPi_rNPmk3KrvgF%2BSHw%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/2e2ac20c-00c6-48f1-83ad-ef41a7a072cf%40Spark.


Re: How do i add style to my django admin

2019-12-19 Thread ramadhan ngallen
Did you override settings.py Debug=False?


Best Regards

Ramadhan Ngallen
Software Consultant

Phone: +255 715 200 997 | ngall...@gmail.com
On 19 Dec 2019, 21:16 +0300, amin ghaemi , wrote:
> hi , first you need to reinstall django :
> type this command in cmd:
>
> pip uninstall django
> pip install django
>
> and for runserver type this command : python maange.py runserver
> if you have problem get screenshot and send to me
>
> > On Thu, Dec 19, 2019 at 6:02 PM Lasisi Habeeb  
> > wrote:
> > > when i ran my django server using django manage.py runserver and ran 
> > > 127.0.0.1:8000/admin on my web browser it prompt the django admin site 
> > > but without styles
> > > --
> > > 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/c2f069bd-d6b2-4bdc-94ec-404342474b83%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%2BJ-dZL%3DVQ9d8E6WrngewS6cOKK0eDGXTYMf7sNgoROdRx9X4A%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/757fe16c-c0a9-4592-bbd4-765f00c89859%40Spark.


Re: Django path, Learn Django, Django document

2019-12-21 Thread ramadhan ngallen
Hello
You can use this link

https://www.djangoproject.com
On 21 Dec 2019, 19:04 +0300, Root Video Dạo , wrote:
> Hello everyone!
> I make this thread to find some advice to learn the Django framework.
> I've learned about basic Python and want to learn about Web app using Python 
> but I couldn't find the path for this.
> Someone can show me the PATH, DOCUMENT to learn Django.
> Many thank!
> --
> 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/5705e890-582d-46e4-8b6e-69d5d69b5259%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/4b55d4fa-8e76-4e51-afa1-87a813f72f1e%40Spark.


Re: Django path, Learn Django, Django document

2019-12-21 Thread ramadhan ngallen
Okay you can visit JoinCfe via
https://www.codingforentrepreneurs.com

Or you can visit their youtube channel for videos too on 
https://m.youtube.com/codingentrepreneurs?sub_confirmation=1&uid=WEHue8kksIaktO8KTTN_zg
On 21 Dec 2019, 21:24 +0300, Integr@te System , wrote:
> Hi Friend,
>
> And as if you seeking for learning quickly search around for web basic html, 
> css, js each other, example w3school.com... bc of they r combined web app 
> together.
>
> When you held overview firmly with each part play its role, you can easily 
> understand how Django codes to be put in html(syntax), python control behide 
> (reference docs of expert propose previously), many great components 
> necessary as well.
>
> Happy code.
>
> > On Sat, Dec 21, 2019, 23:12 ramadhan ngallen  wrote:
> > > Hello
> > > You can use this link
> > >
> > > https://www.djangoproject.com
> > > On 21 Dec 2019, 19:04 +0300, Root Video Dạo , wrote:
> > > > Hello everyone!
> > > > I make this thread to find some advice to learn the Django framework.
> > > > I've learned about basic Python and want to learn about Web app using 
> > > > Python but I couldn't find the path for this.
> > > > Someone can show me the PATH, DOCUMENT to learn Django.
> > > > Many thank!
> > > > --
> > > > 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/5705e890-582d-46e4-8b6e-69d5d69b5259%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/4b55d4fa-8e76-4e51-afa1-87a813f72f1e%40Spark.
> --
> 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/CAP5HUWow1tcUSoKv7KnCsxi4e%3DXYOGvAdGd79MOJ8FX1czs-Kg%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/ca08d6fa-bf03-481d-8526-478873f0eb25%40Spark.


Re: Hi everyone I am new in django and postgresql. Actually I am getting following error when i run the project, Although I am putting right password and username. Please Help me....

2020-01-03 Thread ramadhan ngallen
Hello
The reason was due to wrong password for the postgre. Kindly test the password 
via Pgadmin.

Best Regards

Ramadhan Ngallen
Software Consultant

Phone: +255 715 200 997 | ngall...@gmail.com
On 3 Jan 2020, 12:27 +0300, shailendra singh , wrote:
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py",
>  line 932, in _bootstrap_inner
>     self.run()
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py",
>  line 870, in run
>     self._target(*self._args, **self._kwargs)
>   File 
> "/Applications/Projects/venv/lib/python3.8/site-packages/django/utils/autoreload.py",
>  line 53, in wrapper
>     fn(*args, **kwargs)
>   File 
> "/Applications/Projects/venv/lib/python3.8/site-packages/django/core/management/commands/runserver.py",
>  line 120, in inner_run
>     self.check_migrations()
>   File 
> "/Applications/Projects/venv/lib/python3.8/site-packages/django/core/management/base.py",
>  line 458, in check_migrations
>     executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
>   File 
> "/Applications/Projects/venv/lib/python3.8/site-packages/django/db/migrations/executor.py",
>  line 18, in __init__
>     self.loader = MigrationLoader(self.connection)
>   File 
> "/Applications/Projects/venv/lib/python3.8/site-packages/django/db/migrations/loader.py",
>  line 49, in __init__
>     self.build_graph()
>   File 
> "/Applications/Projects/venv/lib/python3.8/site-packages/django/db/migrations/loader.py",
>  line 212, in build_graph
>     self.applied_migrations = recorder.applied_migrations()
>   File 
> "/Applications/Projects/venv/lib/python3.8/site-packages/django/db/migrations/recorder.py",
>  line 76, in applied_migrations
>     if self.has_table():
>   File 
> "/Applications/Projects/venv/lib/python3.8/site-packages/django/db/migrations/recorder.py",
>  line 56, in has_table
>     return self.Migration._meta.db_table in 
> self.connection.introspection.table_names(self.connection.cursor())
>   File 
> "/Applications/Projects/venv/lib/python3.8/site-packages/django/utils/asyncio.py",
>  line 26, in inner
>     return func(*args, **kwargs)
>   File 
> "/Applications/Projects/venv/lib/python3.8/site-packages/django/db/backends/base/base.py",
>  line 260, in cursor
>     return self._cursor()
>   File 
> "/Applications/Projects/venv/lib/python3.8/site-packages/django/db/backends/base/base.py",
>  line 236, in _cursor
>     self.ensure_connection()
>   File 
> "/Applications/Projects/venv/lib/python3.8/site-packages/django/utils/asyncio.py",
>  line 26, in inner
>     return func(*args, **kwargs)
>   File 
> "/Applications/Projects/venv/lib/python3.8/site-packages/django/db/backends/base/base.py",
>  line 220, in ensure_connection
>     self.connect()
>   File 
> "/Applications/Projects/venv/lib/python3.8/site-packages/django/db/utils.py", 
> line 90, in __exit__
>     raise dj_exc_value.with_traceback(traceback) from exc_value
>   File 
> "/Applications/Projects/venv/lib/python3.8/site-packages/django/db/backends/base/base.py",
>  line 220, in ensure_connection
>     self.connect()
>   File 
> "/Applications/Projects/venv/lib/python3.8/site-packages/django/utils/asyncio.py",
>  line 26, in inner
>     return func(*args, **kwargs)
>   File 
> "/Applications/Projects/venv/lib/python3.8/site-packages/django/db/backends/base/base.py",
>  line 197, in connect
>     self.connection = self.get_new_connection(conn_params)
>   File 
> "/Applications/Projects/venv/lib/python3.8/site-packages/django/utils/asyncio.py",
>  line 26, in inner
>     return func(*args, **kwargs)
>   File 
> "/Applications/Projects/venv/lib/python3.8/site-packages/django/db/backends/postgresql/base.py",
>  line 185, in get_new_connection
>     connection = Database.connect(**conn_params)
>   File 
> "/Applications/Projects/venv/lib/python3.8/site-packages/psycopg2/__init__.py",
>  line 126, in connect
>     conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
> django.db.utils.OperationalError: FATAL:  password authentication failed for 
> user "postgres"
>
> --
> 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/fdcdb68e-ce8d-4326-a519-7ae07a51ee2f%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/f5a6ffb7-548a-4da1-96d3-adfe13f9c42b%40Spark.


Re: TemplateDoesNotExist at /accounts/logout/ logout.html

2020-01-07 Thread ramadhan ngallen
Hello
The template directory(name) is not correct. Kindly change template directory 
to "registration/logout.html" instead of "logout.html"

Best Regards

Ramadhan Ngallen
Software Consultant

Phone: +255 715 200 997 | ngall...@gmail.com
On 7 Jan 2020, 12:24 +0300, Bruckner de Villiers 
, wrote:
> Parvez,
> Please paste the code, not a pic of the code – it’s too small to read.
>
> Bruckner de Villiers
> 083 625 1086
>
> From:  on behalf of Parvez Khan Pathan 
> 
> Reply to: 
> Date: Tuesday, 07 January 2020 at 11:15
> To: Django users 
> Subject: TemplateDoesNotExist at /accounts/logout/ logout.html
>
> Hello & afternoon
>
> i'm new to django and learning from Udemy Bootcamp course but i make Blog 
> Post WEb using django Everything is work good Except Logout
> can you please help out where made i mistake... even i check many 
> Stackoverflow solution but not work for me even Django Documentation is 
> complex too!
>
> This is URL Code:
>
> 
>
>
> This is Template error:
>
> 
>
>
>
> Regard;
> Parvez Khan Pathan
>
> --
> 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/7a56322b-aa52-47e8-8398-e4daec2795ca%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/A438740E-9A01-48D1-A5D4-97E48F0685D8%40gmail.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/0a7e4e89-7686-4ef8-9724-e5f88519a190%40Spark.