Re: 'Sandboxed' Template engine/context

2020-07-10 Thread Michael Thomas
Hi,

I'm aware that other template engines could be used, but it would be much 
more preferable to stick with Django's template engine for a variety of 
reasons (eg. using the same tags in the 'sandboxed' environment vs. 
regular).

On Friday, 10 July 2020 14:41:30 UTC+4, Integr@te System wrote:
>
> Hi Michael, 
>
> Some templates as mako, jinja, genshi...
>
>
>
>
> On Fri, Jul 10, 2020, 4:23 PM Michael Thomas  > wrote:
>
>> Hi all,
>>
>> Does anyone know of a straightforward way to create an independent 
>> template engine instance with a subset of the tags/filters/etc. defined?
>>
>> The use-case is for allowing user-supplied template content, while 
>> preventing said users from being able to use features that could be 
>> dangerous, leak information, etc.. (Eg. {% extends %}, {% load %}, 
>> {{my-secret-variable-that-is-loaded-into-global-context}})
>>
>> Kind Regards,
>> Michael
>>
>> -- 
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/e8456f7f-e52f-4bf4-95c6-419d84600687o%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/e50f24b3-1e6e-4260-b720-5af5912ae511o%40googlegroups.com.


Performance queries helps

2020-07-10 Thread carlos
Hi, i need any advice for performance queries
i have a model name Post
post have m2m categories and fk author

the index page show 7 categories in separated row
i try performance
this example
queryset_global =
Post.objects.filter(status__contains='publish').prefetch_related('category').select_related('author')
then i make 7 queries for 7 categories show in index page.

newscat1
= 
queryset_global.filter(category__slug__contains="cat1_name").order_by('-date')[:5]
newscat2
= 
queryset_global.filter(category__slug__contains="cat2_name").order_by('-date')[:5]
newscat3
= 
queryset_global.filter(category__slug__contains="cat3_name").order_by('-date')[:5]
newscat4
= 
queryset_global.filter(category__slug__contains="cat4_name").order_by('-date')[:5]
newscat5
= 
queryset_global.filter(category__slug__contains="cat5_name").order_by('-date')[:5]
newscat6
= 
queryset_global.filter(category__slug__contains="cat6_name").order_by('-date')[:5]
newscat7
= 
queryset_global.filter(category__slug__contains="cat7_name").order_by('-date')[:5]

i retrieve 35 post for show in index page

*according debug toolbar this produce SQL*
*2599.59 ms (44 queries including 34 duplicates )*

Why?

but when i loop in template index.html
{% for news1 in newscat1 %}
{{news.name}}
{{newa.date|date:'Y-m-d'}}
{{news.body|safe|truncatewords:20}}
{{news.category.all.0}}
   Read More
{% endfor %}
 ...
this repeat in the template 7 time
...
{% for news7 in newscat7 %}
{{news.name}}
{{newa.date|date:'Y-m-d'}}
{{news.body|safe|truncatewords:20}}
{{news.category.all.0}}
   Read More
{% endfor %}


*according debug toolbar this produce SQL*
*3463.65 ms (86 queries including 77 duplicates )*

this is incredible it doubles the amount of queries to the db that may be
happening?

i need some ideas or tips

Cheers

-- 
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/CAM-7rO1nzzqWf_cpQOrjYwQmxkd77H0AJ8W03FS%3D%2BoA3gEE4zg%40mail.gmail.com.


Re: How to get data from django model to excel sheet using openpyxl including images.

2020-07-10 Thread VenkataSivaRamiReddy
Hi man,

Have you tried *xlsxwditer* package.

If not please check

On Fri, Jul 10, 2020, 19:23 Ashutosh Mishra 
wrote:

> I am doing that using openpyxl
> But not getting the image in excel sheet
>
>
> https://stackoverflow.com/questions/62695531/cannot-convert-fieldfile-jpg-to-excel-django
>
> See this
>
> On Fri, Jul 10, 2020, 7:15 PM Vishesh Mangla 
> wrote:
>
>> Api’s are better suited for Django rest framework.
>>
>>
>>
>> Sent from Mail  for
>> Windows 10
>>
>>
>>
>> *From: *Ashutosh Mishra 
>> *Sent: *10 July 2020 18:30
>> *To: *Django users 
>> *Subject: *Re: How to get data from django model to excel sheet using
>> openpyxl including images.
>>
>>
>>
>> i have created an api through which i can download the excel file with
>> all fields except images.I am posting my models and views
>>
>>
>>
>> models.py
>>
>>
>>
>> class Task(models.Model):
>>
>>
>>
>> Id=models.IntegerField()
>>
>> Name=models.CharField(max_length=50,null=False,blank=True)
>>
>> Image1=models.FileField(blank=True, default="",
>>
>> upload_to="media/images",null=True)
>>
>> Image2=models.FileField(blank=True, default="",
>>
>> upload_to="media/images",null=True)
>>
>> Date=models.DateField(null=True,blank=True)
>>
>> def __str__(self):
>>
>> return str(self.Name)
>>
>>
>>
>> views.py
>>
>> class TaskViewSet(viewsets.ViewSet):
>>
>>
>>
>> def list(self,request):
>>
>> try:
>>
>> queryset=Task.objects.all()
>>
>> response = HttpResponse(content_type='application/ms-excel')
>>
>> #response=HttpResponse(content_type='application/ms-excel')
>>
>>
>>
>> #response['Content-Disposition'] = 'attachment; filename="users.xls'
>>
>> response['Content-Disposition']='attachment; filename="users.xls"'
>>
>>
>>
>> wb=openpyxl.Workbook()
>>
>> ws=wb.active
>>
>>
>>
>> row_num=0
>>
>> columns=['Id','Name','Image1','Image2','Date']
>>
>>
>>
>> for col_num in range(len(columns)):
>>
>> c = ws.cell(row=row_num + 1, column=col_num + 1)
>>
>> c.value = columns[col_num]
>>
>> for obj in queryset:
>>
>> row_num+=1
>>
>> row = [
>>
>> obj.Id,
>>
>> obj.Name,
>>
>> obj.Image1.url,
>>
>> obj.Image2.url,
>>
>> str(obj.Date),
>>
>> ]
>>
>> print(type(row))
>>
>>
>>
>> for col_num in range(len(row)):
>>
>> c = ws.cell(row=row_num + 1, column=col_num + 1)
>>
>> c.value = row[col_num]
>>
>>
>>
>> wb.save(response)
>>
>> return response
>>
>> except Exception as error:
>>
>> traceback.print_exc()
>>
>> return Response({"message": str(error), "success": False},
>> status=status.HTTP_200_OK)
>>
>>
>>
>>
>>
>> On Friday, July 10, 2020 at 5:48:36 PM UTC+5:30 ajoeiam wrote:
>>
>> On Thu, Jul 9, 2020 at 10:02 PM Ashutosh Mishra 
>> wrote:
>>
>> I am creating an api to get data and images from django model to excel
>> sheet ,how can i do that,someone please help me.
>>
>>
>>
>> What have you tried so far?
>>
>>
>>
>> Regards
>>
>> --
>> 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/c1092b58-9d91-4d9c-8654-54df883c5172n%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/80F9CD37-925E-4CB1-A03D-743C8F10EDB4%40hxcore.ol
>> 
>> .
>>
> --
> 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/CAGDmY67kWhDN1bn%2BWtTcLxCj-QfmzG2F77b-2Hpbo9ouths1Gg%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/CAGiJVX0HsA0tKenVKbAaTDwb5TxR0umHPogUUnAH%3DU94GUumjA%40mail.gmail.com.


Re: Bug tracking system

2020-07-10 Thread VenkataSivaRamiReddy
You want to perform support ticket system ..

On Fri, Jul 10, 2020, 20:21 John McClain  wrote:

> Hello,
>
> You could use this for a skeleton I created. Not perfect but a head start
>
> https://decoder-cookbook.herokuapp.com/
>
> https://github.com/Jmcclain0129/decoder_cookbook
>
> cheers
>
> On Fri, 10 Jul 2020 at 14:37, Anupriya Nishad 
> wrote:
>
>> Can anyone guide me on how to create a bug tracking system?
>> 1. Allows create account login logout
>> 2. Allows u to create tickets, edit and delete them
>>
>> --
>> 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/CAGcPrqSyyXVfccVeBO_HJ42uy-wQJoCg0sjNSZON0XtbNQi2pg%40mail.gmail.com
>> 
>> .
>>
>
>
> --
> John McClain
>
> Cell: 085-1977-823
> Skype: jmcclain0129
> Email: jmcclain0...@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/CAN-hv_qwoAxBCRT_nYCoKCt%2B3oZRYQVrk_xkt6U%3D96YQioNYEw%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/CAGiJVX2uxXvdmF9u_7ioZorb8%3DLefz6K6kzVdLHhWyY3Eayk%3DA%40mail.gmail.com.


Limiting access to data through user permissions?

2020-07-10 Thread Will Meyers


Just need some help getting over a wall I've hit.

I have a web application that whenever a user signs up, is assigned a 
License. This License has CustomPermissions attached to it telling what 
values of a field within a materialized view they have access to. I have an 
API that needs to filter data requested against the User who requested it 
based on the User's license. I drafted some example models below that 
outlines my problem.

class CustomPermission(models.Model):
name = models.CharField(max_length=255)
field = models.CharField(max_length=255)
value = models.CharField(max_length=255)

class License(models.Model):
name = models.CharField(max_length=255)
permissions = models.ManyToManyField(CustomPermissions)
...

class User(AbstractBaseUser):
license = models.ForeignKey(License, on_delete=models.CASCADE)
...

This works fine if I'm only filtering columns with text values. I can just 
do

...
user = request.user
permissions = user.license.permissions.values_list('field', 'value')
return queryset.objects.filter(**{field: value for field, value in permissions})

This issue is that I cannot filter against other datatypes (datetimes for 
example). If I wanted to limit access to data published in the last 90 days 
for example, there's no way to represent that in this model.

To solve this I was thinking of using a sparse table for the 
CustomPermission model. Something like

class CustomPermission(models.Model):
name = models.CharField(max_length=255)
field = models.CharField(max_length=255)
operation = models.CharField(max_length='32')
text_value = models.CharField(max_length=255, null=True, blank=True)
date_value = models.DateField(null=True, blank=True)

Where operation would be equal to '__gt', '__lt', ... things like that. I 
can then just do something similar as before

...
user = request.user
permissions = user.license.permissions.values_list('field', 'operation', 
'text_value', 'date_value')return queryset.objects.filter(**{fld + op: txt_val 
or dat_val for fld, op, txt_val, dat_val in permissions})

But this does not feel right, and can get messy quickly. Any suggestions?

-- 
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/1f8f1c2a-4c21-48a0-ae4d-a128f79a3d0co%40googlegroups.com.


DB Router default issue

2020-07-10 Thread JJ Zolper


Hello, I am trying to prevent models in my api app from migrating into the 
default database but I'm confused about the router. It seems every time I run 
migrate even with the router it continues to migrate.



#apps.py

from django.apps import AppConfig

class ApiConfig(AppConfig):
name = 'api'
label = 'api'



#settings.py

DATABASE_ROUTERS = ['myproject.dev_db_router.APIRouter',]


DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'default.sqlite3'),
},
'mydb': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'mydb.sqlite3'),
},
}



#dev_db_router.py

class APIRouter:
"""
A router to control all database operations on models in the
api application.
"""
route_app_labels = {'api',}

def db_for_read(self, model, **hints):
"""
Attempts to read api models go to mydb.
"""
if model._meta.app_label in self.route_app_labels:
return 'mydb'
return False

def db_for_write(self, model, **hints):
"""
Attempts to write api models goes to mydb.
"""
if model._meta.app_label in self.route_app_labels:
return 'mydb'
return False

def allow_migrate(self, db, app_label, model_name=None, **hints):
"""
Make sure the api app only appears in the
'mydb' database.
"""
if app_label in self.route_app_labels:
return db == 'mydb'
return False


I've tried:

python manage.py migrate --database=default

python manage.py migrate


etc and every time it says:

  Applying api.0001_initial...* OK*


Even though I told it False if it does not meet the case of db == 'mydb'. I can 
specify 'mydb' and it says it works:

python manage.py migrate --database=mydb

but my concern is it always migrates into default even when I'm trying to tell 
it not to. In the future there will be models I do want to migrate into 
default, but not these in the api app. Based on the documentation I'm doing 
everything correctly.

What am I not understanding?

Thank you.

Best,

JJ

-- 
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/f1303148-a53b-46ef-a907-6771d493ab7ao%40googlegroups.com.


Re: Django ContentTypes required?

2020-07-10 Thread JJ Zolper
Dan,

Thank you so much. I was able to get it figured out after I smoothed out an 
issue with the database. My assumption is something with the database was 
causing it to throw this confusing and unrelated error. I changed the 
settings files around too but really did not change or remove anything that 
would have made a difference. Or should have. The app was not included, etc.

Best,

JJ

On Monday, July 6, 2020 at 8:26:26 PM UTC-4, Dan Madere wrote:
>
> I agree that it should work. Django uses ContentType in the admin and user 
> authentication, but you mention that you have removed these from 
> INSTALLED_APPS, so I don't get it. I'd try clearing .PYC files first. Then 
> maybe a sanity check.. double check what settings file you're actually 
> using, and if INSTALLED_APPS contains what you expect.
>
> Dan
>
> On Monday, July 6, 2020 at 2:33:19 PM UTC-4 jzt...@gmail.com wrote:
>
>> Hello,
>>
>> I am not using any of the ContentType relations, etc right now in my 
>> Django 2.12 Python 3.6 application, am I able to run the application 
>> without having django.contrib.contenttypes in the INSTALLED_APPS? Is there 
>> a piece I am not understanding that Django uses it for in the background?
>>
>> I thought I had it working with it removed but I am getting:
>>
>> Model class django.contrib.contenttypes.models.ContentType doesn't 
>> declare an explicit app_label and isn't in an application in INSTALLED_APPS.
>>
>> I have nothing in the INSTALLED_APPS except my apps and:
>>
>> 'django.contrib.staticfiles',
>> 'rest_framework',
>>
>> Was trying an attempt where I avoided migrating contenttypes into a 
>> legacy database.
>>
>> Best,
>>
>> JJ
>>
>

-- 
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/8ecd8179-ce83-4af7-82b2-dd97eda70a07o%40googlegroups.com.


DB Router default issue

2020-07-10 Thread JJ Zolper


Hello, I am trying to prevent models in my api app from migrating into the 
default database but I'm confused about the router. It seems every time I run 
migrate even with the router it continues to migrate.



#apps.py

from django.apps import AppConfig

class ApiConfig(AppConfig):
name = 'api'
label = 'api'



#settings.py

DATABASE_ROUTERS = ['myproject.dev_db_router.APIRouter',]


DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'default.sqlite3'),
},
'mydb': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'mydb.sqlite3'),
},
}



#dev_db_router.py

class APIRouter:
"""
A router to control all database operations on models in the
api application.
"""
route_app_labels = {'api',}

def db_for_read(self, model, **hints):
"""
Attempts to read api models go to mydb.
"""
if model._meta.app_label in self.route_app_labels:
return 'mydb'
return False

def db_for_write(self, model, **hints):
"""
Attempts to write api models goes to mydb.
"""
if model._meta.app_label in self.route_app_labels:
return 'mydb'
return False

def allow_migrate(self, db, app_label, model_name=None, **hints):
"""
Make sure the api app only appears in the
'mydb' database.
"""
if app_label in self.route_app_labels:
return db == 'mydb'
return False





I've tried:


python manage.py migrate --database=default


python manage.py migrate


etc and every time it says:


  Applying api.0001_initial...* OK*




Even though I told it False if it does not meet the case of db == 'mydb'. I can 
specify 'mydb' and it says it works:


python manage.py migrate --database=mosaic


but my concern is it always migrates into default even when I'm trying to tell 
it not to. In the future there will be models I do want to migrate into 
default, but not these in the api app. Based on the documentation I'm doing 
everything correctly.


What am I not understanding?


Thank you.


Best,


JJ



-- 
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/76d56bf9-a870-4a18-8689-6ec93bc50319o%40googlegroups.com.


Re: note sharing

2020-07-10 Thread Kunal Solanke
If you don't want to do complicated things just add manytomany field for
sharewith in note model
And while user requests the notes page just make a query to database

Notes.objects.filter(Q(sharedwith=current_user ) l Q(author=currentuser))

And send this back to user



Imp-while creating a note user should specify whom to share with
You can use multiple input for that

On Fri, Jul 10, 2020, 21:04 mick  wrote:

> Hello guys
> Please anyone help me out I am not able to figure out the internal sharing
> with selected?
>
>  Django website where users can privately create and share notes. All
> users will have an account and they will be able to signup then login to
> their account. Once logged in they will be able to write notes in the web
> app. While creating the note they will have the option to share the note
> with another user of the web app. The app will contain a page where the
> user can see the notes that they have created and the notes that have been
> shared with them.
>
> 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/ab4a9079-ccd1-4ed7-8061-fb539b740367o%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/CAOecAnxCquqWb%3D9r7Xbay4t3ABDiNaLT0D9qm%2B9soTPAOiaijw%40mail.gmail.com.


note sharing

2020-07-10 Thread mick
Hello guys
Please anyone help me out I am not able to figure out the internal sharing 
with selected?

 Django website where users can privately create and share notes. All users 
will have an account and they will be able to signup then login to their 
account. Once logged in they will be able to write notes in the web app. 
While creating the note they will have the option to share the note with 
another user of the web app. The app will contain a page where the user can 
see the notes that they have created and the notes that have been shared 
with them. 

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/ab4a9079-ccd1-4ed7-8061-fb539b740367o%40googlegroups.com.


Wrong use of the word "module" in the Documentation

2020-07-10 Thread Ivo Shipkaliev
Hi there.
I was reading Django Documentation, specifically Models page:
https://docs.djangoproject.com/en/3.0/topics/db/models/

Under "Using models" section, the second sentence reads:
"Do this by editing your settings file and changing the INSTALLED_APPS 
setting
to add the name of the module that contains your models.py."

Now, as "models.py" is a Python module, this statement is saying that you
should add the name of the module that contains the other module.
A Python module cannot contain a module. The word "module" here should be
replaced by "directory" or "package".

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/f3b18c4e-6f82-483b-9736-4255872b6756o%40googlegroups.com.


Re: Bug tracking system

2020-07-10 Thread John McClain
Hello,

You could use this for a skeleton I created. Not perfect but a head start

https://decoder-cookbook.herokuapp.com/

https://github.com/Jmcclain0129/decoder_cookbook

cheers

On Fri, 10 Jul 2020 at 14:37, Anupriya Nishad 
wrote:

> Can anyone guide me on how to create a bug tracking system?
> 1. Allows create account login logout
> 2. Allows u to create tickets, edit and delete them
>
> --
> 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/CAGcPrqSyyXVfccVeBO_HJ42uy-wQJoCg0sjNSZON0XtbNQi2pg%40mail.gmail.com
> 
> .
>


-- 
John McClain

Cell: 085-1977-823
Skype: jmcclain0129
Email: jmcclain0...@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/CAN-hv_qwoAxBCRT_nYCoKCt%2B3oZRYQVrk_xkt6U%3D96YQioNYEw%40mail.gmail.com.


Re: How to get data from django model to excel sheet using openpyxl including images.

2020-07-10 Thread Ashutosh Mishra
I am doing that using openpyxl
But not getting the image in excel sheet

https://stackoverflow.com/questions/62695531/cannot-convert-fieldfile-jpg-to-excel-django

See this

On Fri, Jul 10, 2020, 7:15 PM Vishesh Mangla 
wrote:

> Api’s are better suited for Django rest framework.
>
>
>
> Sent from Mail  for
> Windows 10
>
>
>
> *From: *Ashutosh Mishra 
> *Sent: *10 July 2020 18:30
> *To: *Django users 
> *Subject: *Re: How to get data from django model to excel sheet using
> openpyxl including images.
>
>
>
> i have created an api through which i can download the excel file with all
> fields except images.I am posting my models and views
>
>
>
> models.py
>
>
>
> class Task(models.Model):
>
>
>
> Id=models.IntegerField()
>
> Name=models.CharField(max_length=50,null=False,blank=True)
>
> Image1=models.FileField(blank=True, default="",
>
> upload_to="media/images",null=True)
>
> Image2=models.FileField(blank=True, default="",
>
> upload_to="media/images",null=True)
>
> Date=models.DateField(null=True,blank=True)
>
> def __str__(self):
>
> return str(self.Name)
>
>
>
> views.py
>
> class TaskViewSet(viewsets.ViewSet):
>
>
>
> def list(self,request):
>
> try:
>
> queryset=Task.objects.all()
>
> response = HttpResponse(content_type='application/ms-excel')
>
> #response=HttpResponse(content_type='application/ms-excel')
>
>
>
> #response['Content-Disposition'] = 'attachment; filename="users.xls'
>
> response['Content-Disposition']='attachment; filename="users.xls"'
>
>
>
> wb=openpyxl.Workbook()
>
> ws=wb.active
>
>
>
> row_num=0
>
> columns=['Id','Name','Image1','Image2','Date']
>
>
>
> for col_num in range(len(columns)):
>
> c = ws.cell(row=row_num + 1, column=col_num + 1)
>
> c.value = columns[col_num]
>
> for obj in queryset:
>
> row_num+=1
>
> row = [
>
> obj.Id,
>
> obj.Name,
>
> obj.Image1.url,
>
> obj.Image2.url,
>
> str(obj.Date),
>
> ]
>
> print(type(row))
>
>
>
> for col_num in range(len(row)):
>
> c = ws.cell(row=row_num + 1, column=col_num + 1)
>
> c.value = row[col_num]
>
>
>
> wb.save(response)
>
> return response
>
> except Exception as error:
>
> traceback.print_exc()
>
> return Response({"message": str(error), "success": False},
> status=status.HTTP_200_OK)
>
>
>
>
>
> On Friday, July 10, 2020 at 5:48:36 PM UTC+5:30 ajoeiam wrote:
>
> On Thu, Jul 9, 2020 at 10:02 PM Ashutosh Mishra 
> wrote:
>
> I am creating an api to get data and images from django model to excel
> sheet ,how can i do that,someone please help me.
>
>
>
> What have you tried so far?
>
>
>
> Regards
>
> --
> 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/c1092b58-9d91-4d9c-8654-54df883c5172n%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/80F9CD37-925E-4CB1-A03D-743C8F10EDB4%40hxcore.ol
> 
> .
>

-- 
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/CAGDmY67kWhDN1bn%2BWtTcLxCj-QfmzG2F77b-2Hpbo9ouths1Gg%40mail.gmail.com.


RE: How to get data from django model to excel sheet using openpyxl including images.

2020-07-10 Thread Vishesh Mangla
Api’s are better suited for Django rest framework. Sent from Mail for Windows 10 From: Ashutosh MishraSent: 10 July 2020 18:30To: Django usersSubject: Re: How to get data from django model to excel sheet using openpyxl including images. i have created an api through which i can download the excel file with all fields except images.I am posting my models and views models.py class Task(models.Model): Id=models.IntegerField()Name=models.CharField(max_length=50,null=False,blank=True)Image1=models.FileField(blank=True, default="",upload_to="media/images",null=True)Image2=models.FileField(blank=True, default="",upload_to="media/images",null=True)Date=models.DateField(null=True,blank=True)def __str__(self):return str(self.Name) views.pyclass TaskViewSet(viewsets.ViewSet): def list(self,request):try:queryset=Task.objects.all()response = HttpResponse(content_type='application/ms-excel')#response=HttpResponse(content_type='application/ms-excel') #response['Content-Disposition'] = 'attachment; filename="users.xls'response['Content-Disposition']='attachment; filename="users.xls"' wb=openpyxl.Workbook()ws=wb.active row_num=0columns=['Id','Name','Image1','Image2','Date'] for col_num in range(len(columns)):c = ws.cell(row=row_num + 1, column=col_num + 1)c.value = columns[col_num]for obj in queryset:row_num+=1row = [obj.Id,obj.Name,obj.Image1.url,obj.Image2.url,str(obj.Date),]print(type(row)) for col_num in range(len(row)):c = ws.cell(row=row_num + 1, column=col_num + 1)c.value = row[col_num] wb.save(response)return responseexcept Exception as error:traceback.print_exc()return Response({"message": str(error), "success": False}, status=status.HTTP_200_OK)  On Friday, July 10, 2020 at 5:48:36 PM UTC+5:30 ajoeiam wrote:On Thu, Jul 9, 2020 at 10:02 PM Ashutosh Mishra  wrote:I am creating an api to get data and images from django model to excel sheet ,how can i do that,someone please help me.   What have you tried so far? Regards -- 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/c1092b58-9d91-4d9c-8654-54df883c5172n%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/80F9CD37-925E-4CB1-A03D-743C8F10EDB4%40hxcore.ol.


Bug tracking system

2020-07-10 Thread Anupriya Nishad
Can anyone guide me on how to create a bug tracking system?
1. Allows create account login logout
2. Allows u to create tickets, edit and delete them

-- 
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/CAGcPrqSyyXVfccVeBO_HJ42uy-wQJoCg0sjNSZON0XtbNQi2pg%40mail.gmail.com.


Re: How to get data from django model to excel sheet using openpyxl including images.

2020-07-10 Thread Ashutosh Mishra
i have created an api through which i can download the excel file with all 
fields except images.I am posting my models and views

models.py

class Task(models.Model):

Id=models.IntegerField()
Name=models.CharField(max_length=50,null=False,blank=True)
Image1=models.FileField(blank=True, default="",
upload_to="media/images",null=True)
Image2=models.FileField(blank=True, default="",
upload_to="media/images",null=True)
Date=models.DateField(null=True,blank=True)
def __str__(self):
return str(self.Name)

views.py
class TaskViewSet(viewsets.ViewSet):

def list(self,request):
try:
queryset=Task.objects.all()
response = HttpResponse(content_type='application/ms-excel')
#response=HttpResponse(content_type='application/ms-excel')

#response['Content-Disposition'] = 'attachment; filename="users.xls'
response['Content-Disposition']='attachment; filename="users.xls"'

wb=openpyxl.Workbook()
ws=wb.active

row_num=0
columns=['Id','Name','Image1','Image2','Date']

for col_num in range(len(columns)):
c = ws.cell(row=row_num + 1, column=col_num + 1)
c.value = columns[col_num]
for obj in queryset:
row_num+=1
row = [
obj.Id,
obj.Name,
obj.Image1.url,
obj.Image2.url,
str(obj.Date),
]
print(type(row))

for col_num in range(len(row)):
c = ws.cell(row=row_num + 1, column=col_num + 1)
c.value = row[col_num]

wb.save(response)
return response
except Exception as error:
traceback.print_exc()
return Response({"message": str(error), "success": False}, 
status=status.HTTP_200_OK)


On Friday, July 10, 2020 at 5:48:36 PM UTC+5:30 ajoeiam wrote:

> On Thu, Jul 9, 2020 at 10:02 PM Ashutosh Mishra  
> wrote:
>
>> I am creating an api to get data and images from django model to excel 
>> sheet ,how can i do that,someone please help me.  
>>
>>
>> What have you tried so far?
>
> Regards 
>

-- 
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/c1092b58-9d91-4d9c-8654-54df883c5172n%40googlegroups.com.


Re: Looking for angular-django developers

2020-07-10 Thread sourav chakraborty
Django developer post with 3 years experience without Salary , great show
..carry on.

On Fri, Jul 10, 2020 at 3:42 PM maninder singh Kumar <
maninder.s.ku...@gmail.com> wrote:

> You were told there was no salary.  Is that what’s annoying or the fact
> that I don’t think it’s prudent to reply to your aggressive comment.
> Whichever it is mr hadisur there is a project and it will go on without you
>
> Sent from my iPhone
>
> On Jul 10, 2020, at 11:23 AM, Hadisur Rahman  wrote:
>
> He should point the no salary till December 2020, just waste my some
> valuable time.
>
>
>
> [image: Mailtrack]
> 
>  Sender
> notified by
> Mailtrack
> 
>  07/10/20,
> 11:52:29 AM
>
> On Fri, Jul 10, 2020 at 11:51 AM Hadisur Rahman 
> wrote:
>
>> Dear Django-users group admins
>> a concern about this fake post, please take proper action as soon as
>> possible on it.
>>
>> see my attachment.
>>
>>
>>
>> [image: Mailtrack]
>> 
>>  Sender
>> notified by
>> Mailtrack
>> 
>>  07/10/20,
>> 11:48:42 AM
>>
>> On Thu, Jul 9, 2020 at 7:49 PM Divakar Upadhyay <
>> upadhyaydivakar1...@gmail.com> wrote:
>>
>>> Can you take fresher sir. As I have experience of. Net mvc development.
>>>
>>> On Thu, 9 Jul 2020, 10:10 am maninder singh Kumar, <
>>> maninder.s.ku...@gmail.com> wrote:
>>>
 Dear all,

 There is a requirement for angular-django developers.  Experience 1-3
 years.  Post your resumes if interested to maninder.s.ku...@gmail.com

 regards

 
 Maninder Kumar
 about.me/maninder.s.kumar
 

 --
 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/CABOHK3TLumkPwHrQWXxvs8cKcsYqzrbX5p_%3DkP6N%2BD2UZ4OAXw%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/CAG5yzPAm8D6vUL6_Ny-YO_-M%3DknDOQOYz9uPi52y_KavdK%2Brgg%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/CAOd0vtVfZGUU%2BCXFySSbaJ7FM%2BuPSVN8Rii2Yv25afdYFhn1dQ%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/F1AC632D-F3C4-4CDE-8678-2D6197D605BC%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/CA%2B5wCfYjafur9fa%2B1hM%2BO-cE4bAOY22Wa8cqmWcekJ45UcBYQA%40mail.gmail.com.


Do I need to change my normal Django code when introducing Django Channels?

2020-07-10 Thread Marlon Patrick
Hi guys, I'm new to the python world and consequently I'm new to Django, 
Channels, WSGI, ASGI, etc.

I asked this question on StackOverflow but I still haven't had any answers, 
so I decided to post here in order to try to receive some guidance.

https://stackoverflow.com/questions/62544489/do-i-need-to-change-my-normal-django-code-when-introducing-django-channels

I have a small backend application using Django + Django Rest Framework. My 
code is very trivial, composed of the most common concepts in the 
framework: views, serializers, models, urls, etc. In addition, I use a 
relational database.


My environment is this:

   - Python 3.8
   - Django 3
   - Django Rest Framework 3.11

Now, I need to add support for WebSockets and I did the basic configuration 
described in the Django Channels tutorial. At the moment, I have not 
configured any channel layers or created any WebSocket endpoint.


After these configurations the runserver is using an ASGI development 
server and apparently my REST endpoints are all working.


Some questions:

   - 
   
   Considering that all my code is synchronous, wouldn't it be necessary to 
   make any adjustments to it?
   - 
   
   This configuration above, already does all the magic necessary for my 
   synchronous code to be executed safely in daphene considering that it is an 
   ASGI server?
   
Where exactly should care be taken regarding synchronous code?

   - 
   
   Can I serve normal HTTP and WebSockets requests using only ASGI in a 
   reliable and stable manner? Or, is it recommended to serve HTTP traffic 
   using WSGI and leave only WebSockets traffic to daphene?
   

-- 
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/c70a754c-88ce-4fca-b56b-19efde8930c6o%40googlegroups.com.


Re: How to get data from django model to excel sheet using openpyxl including images.

2020-07-10 Thread o1bigtenor
On Thu, Jul 9, 2020 at 10:02 PM Ashutosh Mishra 
wrote:

> I am creating an api to get data and images from django model to excel
> sheet ,how can i do that,someone please help me.
>
>
> What have you tried so far?

Regards

-- 
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/CAPpdf58f0qp7xEEYCBu694TNyXFXpLiLU1tcDKNFYQgp7jOM1w%40mail.gmail.com.


Re: Looking for angular-django developers

2020-07-10 Thread Hadisur Rahman
why not u told that here when posting ur post, man.

On 7/10/20, maninder singh Kumar  wrote:
> You were told there was no salary.  I rest my case.
>
> Sent from my iPhone
>
>> On Jul 10, 2020, at 3:48 PM, Hadisur Rahman  wrote:
>>
>> Edited:
>>
>> Dear Kumar, U have to mention it with ur post but u do not did it.  If
>> u do it i don,t spend 2 hours to ready my CV and send it to u, thanks
>>
>>> On 7/10/20, Hadisur Rahman  wrote:
>>> Dear Kumar, U have to mention it with ur post but i do not did it.  If
>>> u do i don,t spend 2 hours to ready my CV and send it to u, thanks
>>>
 On 7/10/20, maninder singh Kumar  wrote:
 You were told there was no salary.  Is that what’s annoying or the fact
 that
 I don’t think it’s prudent to reply to your aggressive comment.
 Whichever
 it is mr hadisur there is a project and it will go on without you

 Sent from my iPhone

> On Jul 10, 2020, at 11:23 AM, Hadisur Rahman 
> wrote:
>
> He should point the no salary till December 2020, just waste my some
> valuable time.
>
>
>
>   Sender notified by
> Mailtrack 07/10/20, 11:52:29 AM
>
>> On Fri, Jul 10, 2020 at 11:51 AM Hadisur Rahman 
>> wrote:
>> Dear Django-users group admins
>> a concern about this fake post, please take proper action as soon as
>> possible on it.
>>
>> see my attachment.
>>
>>
>>
>>   Sender notified by
>> Mailtrack 07/10/20, 11:48:42 AM
>>
>>> On Thu, Jul 9, 2020 at 7:49 PM Divakar Upadhyay
>>>  wrote:
>>> Can you take fresher sir. As I have experience of. Net mvc
>>> development.
>>>
>>>
 On Thu, 9 Jul 2020, 10:10 am maninder singh Kumar,
  wrote:
 Dear all,

 There is a requirement for angular-django developers.  Experience
 1-3
 years.  Post your resumes if interested to
 maninder.s.ku...@gmail.com

 regards

 Maninder Kumar
 about.me/maninder.s.kumar
 --
 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/CABOHK3TLumkPwHrQWXxvs8cKcsYqzrbX5p_%3DkP6N%2BD2UZ4OAXw%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/CAG5yzPAm8D6vUL6_Ny-YO_-M%3DknDOQOYz9uPi52y_KavdK%2Brgg%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/CAOd0vtVfZGUU%2BCXFySSbaJ7FM%2BuPSVN8Rii2Yv25afdYFhn1dQ%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/F1AC632D-F3C4-4CDE-8678-2D6197D605BC%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/CAOd0vtU4-5xAwoPseRVc%2BgTXv9_6bqeLRMPJ5UgifxzpSTDiiA%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/7ADFC324-1E69-48E5-8B87-0FA5148E9F3F%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 

Re: Looking for angular-django developers

2020-07-10 Thread maninder singh Kumar
You were told there was no salary.  I rest my case.

Sent from my iPhone

> On Jul 10, 2020, at 3:48 PM, Hadisur Rahman  wrote:
> 
> Edited:
> 
> Dear Kumar, U have to mention it with ur post but u do not did it.  If
> u do it i don,t spend 2 hours to ready my CV and send it to u, thanks
> 
>> On 7/10/20, Hadisur Rahman  wrote:
>> Dear Kumar, U have to mention it with ur post but i do not did it.  If
>> u do i don,t spend 2 hours to ready my CV and send it to u, thanks
>> 
>>> On 7/10/20, maninder singh Kumar  wrote:
>>> You were told there was no salary.  Is that what’s annoying or the fact
>>> that
>>> I don’t think it’s prudent to reply to your aggressive comment.
>>> Whichever
>>> it is mr hadisur there is a project and it will go on without you
>>> 
>>> Sent from my iPhone
>>> 
 On Jul 10, 2020, at 11:23 AM, Hadisur Rahman  wrote:
 
 He should point the no salary till December 2020, just waste my some
 valuable time.
 
 
 
   Sender notified by
 Mailtrack 07/10/20, 11:52:29 AM
 
> On Fri, Jul 10, 2020 at 11:51 AM Hadisur Rahman 
> wrote:
> Dear Django-users group admins
> a concern about this fake post, please take proper action as soon as
> possible on it.
> 
> see my attachment.
> 
> 
> 
>   Sender notified by
> Mailtrack 07/10/20, 11:48:42 AM
> 
>> On Thu, Jul 9, 2020 at 7:49 PM Divakar Upadhyay
>>  wrote:
>> Can you take fresher sir. As I have experience of. Net mvc
>> development.
>> 
>> 
>>> On Thu, 9 Jul 2020, 10:10 am maninder singh Kumar,
>>>  wrote:
>>> Dear all,
>>> 
>>> There is a requirement for angular-django developers.  Experience 1-3
>>> years.  Post your resumes if interested to maninder.s.ku...@gmail.com
>>> 
>>> regards
>>>
>>> Maninder Kumar
>>> about.me/maninder.s.kumar
>>> --
>>> 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/CABOHK3TLumkPwHrQWXxvs8cKcsYqzrbX5p_%3DkP6N%2BD2UZ4OAXw%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/CAG5yzPAm8D6vUL6_Ny-YO_-M%3DknDOQOYz9uPi52y_KavdK%2Brgg%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/CAOd0vtVfZGUU%2BCXFySSbaJ7FM%2BuPSVN8Rii2Yv25afdYFhn1dQ%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/F1AC632D-F3C4-4CDE-8678-2D6197D605BC%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/CAOd0vtU4-5xAwoPseRVc%2BgTXv9_6bqeLRMPJ5UgifxzpSTDiiA%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/7ADFC324-1E69-48E5-8B87-0FA5148E9F3F%40gmail.com.


Re: 'Sandboxed' Template engine/context

2020-07-10 Thread Integr@te System
Hi Michael,

Some templates as mako, jinja, genshi...




On Fri, Jul 10, 2020, 4:23 PM Michael Thomas 
wrote:

> Hi all,
>
> Does anyone know of a straightforward way to create an independent
> template engine instance with a subset of the tags/filters/etc. defined?
>
> The use-case is for allowing user-supplied template content, while
> preventing said users from being able to use features that could be
> dangerous, leak information, etc.. (Eg. {% extends %}, {% load %},
> {{my-secret-variable-that-is-loaded-into-global-context}})
>
> Kind Regards,
> Michael
>
> --
> 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/e8456f7f-e52f-4bf4-95c6-419d84600687o%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/CAP5HUWopfguN5%3D4K9H6z4LKXL_GSS2iDna8LYc_rkLchQgCjDQ%40mail.gmail.com.


Re: Looking for angular-django developers

2020-07-10 Thread Hadisur Rahman
Edited:

Dear Kumar, U have to mention it with ur post but u do not did it.  If
u do it i don,t spend 2 hours to ready my CV and send it to u, thanks

On 7/10/20, Hadisur Rahman  wrote:
> Dear Kumar, U have to mention it with ur post but i do not did it.  If
> u do i don,t spend 2 hours to ready my CV and send it to u, thanks
>
> On 7/10/20, maninder singh Kumar  wrote:
>> You were told there was no salary.  Is that what’s annoying or the fact
>> that
>> I don’t think it’s prudent to reply to your aggressive comment.
>> Whichever
>> it is mr hadisur there is a project and it will go on without you
>>
>> Sent from my iPhone
>>
>>> On Jul 10, 2020, at 11:23 AM, Hadisur Rahman  wrote:
>>>
>>> He should point the no salary till December 2020, just waste my some
>>> valuable time.
>>>
>>>
>>>
>>> Sender notified by
>>> Mailtrack 07/10/20, 11:52:29 AM 
>>>
 On Fri, Jul 10, 2020 at 11:51 AM Hadisur Rahman 
 wrote:
 Dear Django-users group admins
 a concern about this fake post, please take proper action as soon as
 possible on it.

 see my attachment.



Sender notified by
 Mailtrack 07/10/20, 11:48:42 AM

> On Thu, Jul 9, 2020 at 7:49 PM Divakar Upadhyay
>  wrote:
> Can you take fresher sir. As I have experience of. Net mvc
> development.
>
>
>> On Thu, 9 Jul 2020, 10:10 am maninder singh Kumar,
>>  wrote:
>> Dear all,
>>
>> There is a requirement for angular-django developers.  Experience 1-3
>> years.  Post your resumes if interested to maninder.s.ku...@gmail.com
>>
>> regards
>>  
>> Maninder Kumar
>> about.me/maninder.s.kumar
>> --
>> 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/CABOHK3TLumkPwHrQWXxvs8cKcsYqzrbX5p_%3DkP6N%2BD2UZ4OAXw%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/CAG5yzPAm8D6vUL6_Ny-YO_-M%3DknDOQOYz9uPi52y_KavdK%2Brgg%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/CAOd0vtVfZGUU%2BCXFySSbaJ7FM%2BuPSVN8Rii2Yv25afdYFhn1dQ%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/F1AC632D-F3C4-4CDE-8678-2D6197D605BC%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/CAOd0vtU4-5xAwoPseRVc%2BgTXv9_6bqeLRMPJ5UgifxzpSTDiiA%40mail.gmail.com.


Re: Looking for angular-django developers

2020-07-10 Thread Hadisur Rahman
Dear Kumar, U have to mention it with ur post but i do not did it.  If
u do i don,t spend 2 hours to ready my CV and send it to u, thanks

On 7/10/20, maninder singh Kumar  wrote:
> You were told there was no salary.  Is that what’s annoying or the fact that
> I don’t think it’s prudent to reply to your aggressive comment.  Whichever
> it is mr hadisur there is a project and it will go on without you
>
> Sent from my iPhone
>
>> On Jul 10, 2020, at 11:23 AM, Hadisur Rahman  wrote:
>>
>> He should point the no salary till December 2020, just waste my some
>> valuable time.
>>
>>
>>
>>  Sender notified by
>> Mailtrack 07/10/20, 11:52:29 AM  
>>
>>> On Fri, Jul 10, 2020 at 11:51 AM Hadisur Rahman 
>>> wrote:
>>> Dear Django-users group admins
>>> a concern about this fake post, please take proper action as soon as
>>> possible on it.
>>>
>>> see my attachment.
>>>
>>>
>>>
>>> Sender notified by
>>> Mailtrack 07/10/20, 11:48:42 AM 
>>>
 On Thu, Jul 9, 2020 at 7:49 PM Divakar Upadhyay
  wrote:
 Can you take fresher sir. As I have experience of. Net mvc development.


> On Thu, 9 Jul 2020, 10:10 am maninder singh Kumar,
>  wrote:
> Dear all,
>
> There is a requirement for angular-django developers.  Experience 1-3
> years.  Post your resumes if interested to maninder.s.ku...@gmail.com
>
> regards
>   
> Maninder Kumar
> about.me/maninder.s.kumar
> --
> 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/CABOHK3TLumkPwHrQWXxvs8cKcsYqzrbX5p_%3DkP6N%2BD2UZ4OAXw%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/CAG5yzPAm8D6vUL6_Ny-YO_-M%3DknDOQOYz9uPi52y_KavdK%2Brgg%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/CAOd0vtVfZGUU%2BCXFySSbaJ7FM%2BuPSVN8Rii2Yv25afdYFhn1dQ%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/F1AC632D-F3C4-4CDE-8678-2D6197D605BC%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/CAOd0vtXkr81GnBFSVfKX_0XR_XxW5EeEg8q7-KThLdWy7RG4dA%40mail.gmail.com.


Re: Looking for angular-django developers

2020-07-10 Thread maninder singh Kumar
I frankly don’t care what the admin does !

Sent from my iPhone

> On Jul 10, 2020, at 3:41 PM, maninder singh Kumar 
>  wrote:
> 
> You were told there was no salary.  Is that what’s annoying or the fact that 
> I don’t think it’s prudent to reply to your aggressive comment.  Whichever it 
> is mr hadisur there is a project and it will go on without you
> 
> Sent from my iPhone
> 
>> On Jul 10, 2020, at 11:23 AM, Hadisur Rahman  wrote:
>> 
>> He should point the no salary till December 2020, just waste my some 
>> valuable time. 
>> 
>> 
>> 
>>  Sender notified by 
>> Mailtrack 07/10/20, 11:52:29 AM  
>> 
>>> On Fri, Jul 10, 2020 at 11:51 AM Hadisur Rahman  wrote:
>>> Dear Django-users group admins
>>> a concern about this fake post, please take proper action as soon as 
>>> possible on it. 
>>> 
>>> see my attachment. 
>>> 
>>> 
>>> 
>>> Sender notified by 
>>> Mailtrack 07/10/20, 11:48:42 AM 
>>> 
 On Thu, Jul 9, 2020 at 7:49 PM Divakar Upadhyay 
  wrote:
 Can you take fresher sir. As I have experience of. Net mvc development. 
 
> On Thu, 9 Jul 2020, 10:10 am maninder singh Kumar, 
>  wrote:
> Dear all,
> 
> There is a requirement for angular-django developers.  Experience 1-3 
> years.  Post your resumes if interested to maninder.s.ku...@gmail.com
> 
> regards
>   
> Maninder Kumar
> about.me/maninder.s.kumar
> -- 
> 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/CABOHK3TLumkPwHrQWXxvs8cKcsYqzrbX5p_%3DkP6N%2BD2UZ4OAXw%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/CAG5yzPAm8D6vUL6_Ny-YO_-M%3DknDOQOYz9uPi52y_KavdK%2Brgg%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/CAOd0vtVfZGUU%2BCXFySSbaJ7FM%2BuPSVN8Rii2Yv25afdYFhn1dQ%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/78F11D5C-9EB9-41EF-881E-16BD08161508%40gmail.com.


Re: Looking for angular-django developers

2020-07-10 Thread maninder singh Kumar
You were told there was no salary.  Is that what’s annoying or the fact that I 
don’t think it’s prudent to reply to your aggressive comment.  Whichever it is 
mr hadisur there is a project and it will go on without you

Sent from my iPhone

> On Jul 10, 2020, at 11:23 AM, Hadisur Rahman  wrote:
> 
> He should point the no salary till December 2020, just waste my some valuable 
> time. 
> 
> 
> 
>   Sender notified by 
> Mailtrack 07/10/20, 11:52:29 AM   
> 
>> On Fri, Jul 10, 2020 at 11:51 AM Hadisur Rahman  wrote:
>> Dear Django-users group admins
>> a concern about this fake post, please take proper action as soon as 
>> possible on it. 
>> 
>> see my attachment. 
>> 
>> 
>> 
>>  Sender notified by 
>> Mailtrack 07/10/20, 11:48:42 AM  
>> 
>>> On Thu, Jul 9, 2020 at 7:49 PM Divakar Upadhyay 
>>>  wrote:
>>> Can you take fresher sir. As I have experience of. Net mvc development. 
>>> 
 On Thu, 9 Jul 2020, 10:10 am maninder singh Kumar, 
  wrote:
 Dear all,
 
 There is a requirement for angular-django developers.  Experience 1-3 
 years.  Post your resumes if interested to maninder.s.ku...@gmail.com
 
 regards

 Maninder Kumar
 about.me/maninder.s.kumar
 -- 
 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/CABOHK3TLumkPwHrQWXxvs8cKcsYqzrbX5p_%3DkP6N%2BD2UZ4OAXw%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/CAG5yzPAm8D6vUL6_Ny-YO_-M%3DknDOQOYz9uPi52y_KavdK%2Brgg%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/CAOd0vtVfZGUU%2BCXFySSbaJ7FM%2BuPSVN8Rii2Yv25afdYFhn1dQ%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/F1AC632D-F3C4-4CDE-8678-2D6197D605BC%40gmail.com.


django.db.migrations.exceptions.InconsistentMigrationHistory: Migration chat.0001_initial is applied before its dependency account.0045_auto_20200618_1121 on database 'default'.

2020-07-10 Thread Minh Giang Hoàng


I'm encountering this problem for the first time. The order of the 
application for the files are correct (account before chat). Is there 
anyone willing to help? :)

-- 
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/381db252-01a7-4aee-af27-ef5085f0cc7co%40googlegroups.com.


'Sandboxed' Template engine/context

2020-07-10 Thread Michael Thomas
Hi all,

Does anyone know of a straightforward way to create an independent template 
engine instance with a subset of the tags/filters/etc. defined?

The use-case is for allowing user-supplied template content, while 
preventing said users from being able to use features that could be 
dangerous, leak information, etc.. (Eg. {% extends %}, {% load %}, 
{{my-secret-variable-that-is-loaded-into-global-context}})

Kind Regards,
Michael

-- 
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/e8456f7f-e52f-4bf4-95c6-419d84600687o%40googlegroups.com.