Re: Problem with debug = True/False

2018-05-10 Thread Andréas Kühne
Hi,

That is the way it should be if you look in the documentation:
https://docs.djangoproject.com/en/2.0/howto/static-files/

Serving the files

In addition to these configuration steps, you’ll also need to actually
serve the static files.

During development, if you use django.contrib.staticfiles
,
this will be done automatically by runserver

 when DEBUG
 is
set to True (see django.contrib.staticfiles.views.serve()

).

This method is *grossly inefficient* and probably *insecure*, so it is
*unsuitable
for production*.

See Deploying static files
 for
proper strategies to serve static files in production environments.

So it is exactly like gunicorn - because you need to serve your static
files from a webbserver instead of from django itself.

That's why it is failing.

What you could do (although I don't recommend it) - it to manually add the
static files serving to your urls.py file. See:
https://docs.djangoproject.com/en/2.0/howto/static-files/#serving-static-files-during-development

This should be fine for a developer environment - but nothing else.

Regards,

Andréas

2018-05-11 3:09 GMT+02:00 Gerald Brown :

> On my admin site if I have Debug set to true (I have read that for
> production this is a no-no) everything looks fine.  When I change it to
> FALSE all of the styling goes away as if it is being run using gunicorn.
>
> Has anyone observed this?  If so have you found a correction?
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/2fb3aff8-40ec-464e-81e1-766cf08db433%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/CAK4qSCckZWh8hYJ6HQX-RvOAssSDmP4WCSFbh%2BGcty38GHay%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: how Upload image in django and how to read file dimensions

2018-05-10 Thread pradam
 data = request.FILES.get('file')
 from django.core.files.images import get_image_dimensions
 from PIL import Image
 im = Image.open(data) ---> No Quotes just pass the data here.



On Thu, May 10, 2018 at 7:31 PM, arvind yadav <
developer.arvind2...@gmail.com> wrote:

> my views.py in admin.py file
>
> def changelist_view(self, request, extra_context=None,):
> extra_context = extra_context or {}
> if request.method == 'POST':
> #extra_context['form'] ='form'
> form = HomePageBannerForm(request.POST, request.FILES)
> if form.is_valid():
> data = request.FILES.get('file')
> from django.core.files.images import get_image_dimensions
> from PIL import Image
> im = Image.open('data')
> width, height = im.size
> print(width, height,'>>>') here i want size of image
> #form.save();
>
> else:
> form = HomePageBannerForm()
> extra_context['form'] = HomePageBannerForm()
> return super(HomePageBannerAdmin, self).render_change_form(request, 
> extra_context)
>
>
>
> my form.html
>
>
> 
>   {% csrf_token %}
>   {{ form.as_p }}
>   Upload
> 
>
>
> facing this error on submit
>
> error section
>
>
>
>
> Internal Server Error: /homepage/homepagebanner/
> Traceback (most recent call last):
>   File 
> "/home/arvind/lib/python3.5/site-packages/django/core/handlers/exception.py", 
> line 35, in inner
> response = get_response(request)
>   File 
> "/home/arvind/lib/python3.5/site-packages/django/core/handlers/base.py", line 
> 128, in _get_response
> response = self.process_exception_by_middleware(e, request)
>   File 
> "/home/arvind/lib/python3.5/site-packages/django/core/handlers/base.py", line 
> 126, in _get_response
> response = wrapped_callback(request, *callback_args, **callback_kwargs)
>   File 
> "/home/arvind/lib/python3.5/site-packages/django/contrib/admin/options.py", 
> line 574, in wrapper
> return self.admin_site.admin_view(view)(*args, **kwargs)
>   File "/home/arvind//admin/main/admin.py", line 71, in inner
> safeview = view(request, *args, **kwargs)
>   File "/home/arvind//admin/homepage/admin.py", line 72, in changelist_view
> im = Image.open('data')
>   File "/home/arvind/lib/python3.5/site-packages/PIL/Image.py", line 2543, in 
> open
> fp = builtins.open(filename, "rb")
> IsADirectoryError: [Errno 21] Is a directory: 'data'
>
> --
> 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/b54d1197-7d4b-4a95-ac35-5e8f6284cfd1%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/CAGGVXBNAuAbL4817tJ%2BV4d2Cd5xRnEnBaJGhjg--WpkXbwP%3DJg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Display Users Posts also whether it is logged in or logged out

2018-05-10 Thread objectiveappsdev


I want to Display Users Posts also whether it is logged in or logged out 
When I click the everyone User It will show me users Profile Info but I 
want everyone user's posts also How Can I Solve This

Here is my code
https://dpaste.de/KBcF

Thank You in Advance

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/aa97858a-71a7-4c65-b5c0-b7afe0ac0364%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Problem with debug = True/False

2018-05-10 Thread Gerald Brown
On my admin site if I have Debug set to true (I have read that for 
production this is a no-no) everything looks fine.  When I change it to 
FALSE all of the styling goes away as if it is being run using gunicorn.

Has anyone observed this?  If so have you found a correction?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2fb3aff8-40ec-464e-81e1-766cf08db433%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Case inconsistency

2018-05-10 Thread Melvyn Sopacua
On donderdag 10 mei 2018 15:39:21 CEST Matthew Pava wrote:

> Your reference is interesting because it seems to imply that the method
> attribute has to be uppercase.  Maybe the browser translates it to
> uppercase before sending it to the server?

Again, HTML and requests are not strictly related. Requests are made using HTTP 
and yes, 
the browser is responsible for making that request. HTML has four ways of 
instructing the 
browser to make a request:

- A  submission
-  Hyperlink
- A src property of a resource reference (through img / script / link etc tags)
- A  refresh tag

And yes, HTTP request methods are uppercase:

% telnet localhost 80

Escape character is '^]'.
get / http/1.1
HTTP/1.1 400 Bad Request

Now with capitals:
Escape character is '^]'.
GET / HTTP/1.1
Host: localhost

HTTP/1.1 301 Moved Permanently

> But then that doesn't explain
> why I got two different results based on the case of the method attribute.

Lowercase `get` is a common method, for one on all dictionary-like objects in 
Python. But 
the get method isn't implemented on standard Django Request objects[1]. So even 
reading your original message, I couldn't tell you what went wrong. You 
probably 
analyzed the bug wrong as there are a few close but not quite the same things 
in the 
whole stack:

- HTML Form's method attribute
- A view that has a get() method that handles HTTP GET requests
- Django's HttpRequest object
- It's GET / POST dictionaries
- Which have a get() method

I've never come accross a browser that accepted only lowercase HTML attributes, 
although it may have been possible in the dark ages of XHTML 1.1 strict mode. 
I'd be 
thoroughly surprised if the only changing the case of the form's method 
attribute from 
`get` to `GET` would change anything. 

> 
> -Original Message-
> From: django-users@googlegroups.com [mailto:django-users@googlegroups.com]
> On Behalf Of Melvyn Sopacua Sent: Wednesday, May 9, 2018 6:21 PM
> To: django-users@googlegroups.com
> Subject: Re: Case inconsistency
> 
> On woensdag 9 mei 2018 23:00:06 CEST Matthew Pava wrote:
> > I came across an interesting issue recently.  I had a form with an
> > action set to "GET".  The corresponding view was a
> > django-rest-framework view that was just supposed to allow for GET
> > requests.  However, I couldn't get it to work because drf was
> > expecting lower case names, and it turns out that
> > HTML5 expects a lowercase action set to "get".
> 
> HTML is not your reference (and case insensitive to boot). HTML does not
> make requests, it just specifies how responses are rendered. HTTP makes
> requests: https://tools.ietf.org/html/rfc2616#page-36
> --
> Melvyn Sopacua
> 
> --
> 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/5432858.BvN9p53GFH%40fritzbo
> ok. For more options, visit https://groups.google.com/d/optout.


-- 
Melvyn Sopacua


[1] https://docs.djangoproject.com/en/2.0/ref/request-response/#methods

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


how Upload image in django and how to read file dimensions

2018-05-10 Thread arvind yadav
my views.py in admin.py file

def changelist_view(self, request, extra_context=None,):
extra_context = extra_context or {}
if request.method == 'POST':
#extra_context['form'] ='form'
form = HomePageBannerForm(request.POST, request.FILES)
if form.is_valid():
data = request.FILES.get('file')
from django.core.files.images import get_image_dimensions
from PIL import Image
im = Image.open('data')
width, height = im.size
print(width, height,'>>>') here i want size of image
#form.save();

else:
form = HomePageBannerForm()
extra_context['form'] = HomePageBannerForm()
return super(HomePageBannerAdmin, self).render_change_form(request, 
extra_context)



my form.html



  {% csrf_token %}
  {{ form.as_p }}
  Upload



facing this error on submit 

error section 




Internal Server Error: /homepage/homepagebanner/
Traceback (most recent call last):
  File 
"/home/arvind/lib/python3.5/site-packages/django/core/handlers/exception.py", 
line 35, in inner
response = get_response(request)
  File "/home/arvind/lib/python3.5/site-packages/django/core/handlers/base.py", 
line 128, in _get_response
response = self.process_exception_by_middleware(e, request)
  File "/home/arvind/lib/python3.5/site-packages/django/core/handlers/base.py", 
line 126, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File 
"/home/arvind/lib/python3.5/site-packages/django/contrib/admin/options.py", 
line 574, in wrapper
return self.admin_site.admin_view(view)(*args, **kwargs)
  File "/home/arvind//admin/main/admin.py", line 71, in inner
safeview = view(request, *args, **kwargs)
  File "/home/arvind//admin/homepage/admin.py", line 72, in changelist_view
im = Image.open('data')
  File "/home/arvind/lib/python3.5/site-packages/PIL/Image.py", line 2543, in 
open
fp = builtins.open(filename, "rb")
IsADirectoryError: [Errno 21] Is a directory: 'data'

-- 
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/b54d1197-7d4b-4a95-ac35-5e8f6284cfd1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Case inconsistency

2018-05-10 Thread Matthew Pava
My comment was stated inaccurately.  The method attribute was set to "GET" on 
the form element.  It only worked when I set it to "get".
I learned XHTML (strict), which requires elements and attributes to be 
lowercase (which, for some reason, I violated when I set the attribute to 
"GET").  I forgot that that requirement was lifted with HTML5.

Your reference is interesting because it seems to imply that the method 
attribute has to be uppercase.  Maybe the browser translates it to uppercase 
before sending it to the server?  But then that doesn't explain why I got two 
different results based on the case of the method attribute.

-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Melvyn Sopacua
Sent: Wednesday, May 9, 2018 6:21 PM
To: django-users@googlegroups.com
Subject: Re: Case inconsistency

On woensdag 9 mei 2018 23:00:06 CEST Matthew Pava wrote:
> I came across an interesting issue recently.  I had a form with an 
> action set to "GET".  The corresponding view was a 
> django-rest-framework view that was just supposed to allow for GET 
> requests.  However, I couldn't get it to work because drf was 
> expecting lower case names, and it turns out that
> HTML5 expects a lowercase action set to "get".

HTML is not your reference (and case insensitive to boot). HTML does not make 
requests, it just specifies how responses are rendered. HTTP makes requests:
https://tools.ietf.org/html/rfc2616#page-36
--
Melvyn Sopacua

--
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/5432858.BvN9p53GFH%40fritzbook.
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/71535c90594c49719fe1f70376d7e7a0%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.


Creating models from json url feed

2018-05-10 Thread Matt Snelgar


I am making a django app to browse available products at different markets. 
I am getting data for my models from a JSON url feed, 

I am not sure on the best approach to turn this data into models as the 
feed for a single market can contain upwards of 50k items.


Models - feel free to suggest any improvements on these

# Details of a sellable products
class Product(models.Model):
item = models.IntegerField(primary_key=True, auto_created=False)
name = models.CharField(max_length=40)

# Market where products can be bought, some markets will cater to multiple 
suburbs.
class Market(models.Model):
id = models.IntegerField(primary_key=True, auto_created=True)
name = models.CharField(max_length=40)

# Nearby suburbs can share the one market
class Suburb(models.Model):
name = models.CharField(max_length=30)
market = models.ForeignKey(Market, on_delete=models.SET_NULL, null=True)

# Actual product for sale
class ProductForSale(models.Model):
sale = models.IntegerField(primary_key=True)
product = models.ForeignKey(Product, on_delete=models.SET_NULL, 
null=True)
cost = models.IntegerField(default=1)
owner = models.CharField(max_length=30)
quantity = models.IntegerField(default=1)
market = models.ForeignKey(Market,on_delete=models.SET_NULL, null=True )
Feed of markets products example

"market_products": [
{
"id":11654,
"item":123,
"owner":"Bob",
"suburb":"Springvale",
"cost":3,
"quantity":1,

},
{
"id":11655,
"item":123,
"owner":"Sarah",
"suburb":"Sunnyville",
"cost":5,
"quantity":2,

},

This is how I am trying to populate my ProductForSale models - I don't know 
if this is the correct approach for the Product FK, or how to link the 
suburb to its Market FK

markets = Market.objects.all()
for market in markets:
url = "jsonurl"
response = urllib.request.urlopen(url)
data = json.loads(response.read())
for entry in data['market_products']:
new_product_sale = ProductForSale.objects.create(
product = Product.objects.get(item=entry['item']),
cost = entry['cost'],
owner = entry['owner'],
quantity = entry['quantity']
)
new_product_sale.save()

Is there a point where I should create a separate model for each markets 
products, or is it fine to house them all in the one model?

-- 
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/0a0f0614-dc75-4813-9542-f1d6de3134bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Chain filter problem in django

2018-05-10 Thread Mohsen Tamiz
I have written some questions in stackoverflow 1 
, 2 
 and in django rest framework 
group 
 
to get a solution to my problem but still frusterated. 
The problem is about having three tables that have a relation sequentialy 
between each other. More specifically table Person has a reverse relation 
with table PersonSession and the second one has a reverse relation with 
Billing table. And the problem arises when we want to filter some persons 
based on their sessions and their billings. 
Three models are as below:

#models.py
class Person(models.Model):
first_name = models.CharField(max_length=
20)
last_name = models.CharField(max_length=20)

class PersonSession(models.Model):
start_time = models.DateTimeField(auto_now_add=True)
end_time = models.DateTimeField(null=True,
blank=True)
person = models.ForeignKey(Person, related_name='sessions')

class Billing(models.Model):
DEBT = 'DE'
BALANCED = 'BA'
CREDIT = 'CR'

session = models.OneToOneField(PersonSession,
   blank=False,
   null=False,
   related_name='billing')
STATUS = ((BALANCED, 'Balanced'),
  (DEBT, 'Debt'),
  (CREDIT, 'Credit'))

status = models.CharField(max_length=2,
  choices=STATUS,
  blank=False,
  default=BALANCED
  )

#views.py
class PersonFilter(django_filters.FilterSet):
start_time = 
django_filters.DateFromToRangeFilter(name='sessions__start_time',
 distinct=True)
billing_status = 
django_filters.ChoiceFilter(name='sessions__billing__status',
choices=Billing.STATUS,
distinct=True)

class Meta:
model = Person
fields = ('first_name', 'last_name')

class PersonList(generics.ListCreateAPIView):
queryset = Person.objects.all()
serializer_class = PersonSerializer
filter_backends = 
(django_filters.rest_framework.DjangoFilterBackend)
filter_class = PersonFilter

There is a difference between when we call a simple filter like this: 

Person.objects.filter(Q(sessions__start_time__gte='2000-02-01') & \
  Q(sessions__start_time__lte='2000-03-01') & \
  Q(sessions__billing__status=Billing.DEBT))
or something like this:
Person.objects.filter(Q(sessions__start_time__gte='2000-02-01') & \
  Q(sessions__start_time__lte='2000-03-01')).filter(
  Q(sessions__billing__status=Billing.DEBT))
As the answer  to my question 
stated the second one creates two inner join on a same table PersonSession that 
is obviously wrong, but when using djnago-filter, filters on qeryset would be 
applied sequentially and the result is like the second query which is incorrect.
I hope to find a way to keep my filters working and able to use them together 
or each of them separately. 

-- 
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/df42e4b6-3b18-4c0a-8a70-d376ec7e8718%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Display the __str__ or __unicode__ of an objet on deletion of one of its ManyToManyField

2018-05-10 Thread eduardo
Hi Jean Baptiste.

Did you find a solution to your issue? I am in the same situation and your 
explanation is the closest that I have found.

Thanks...

El viernes, 2 de diciembre de 2016, 15:33:22 (UTC+1), Jean-Baptiste Pressac 
escribió:
>
> Hello,
> Thanks Carlos but modifying TypeOeuvre as suggested
>
>  def __unicode__(self):
> return self.intitule.__str__
>
>
> generates the following error : 
>
> Exception Type: TypeError at /admin/prelib/typeoeuvre/11/delete/Exception 
> Value: __str__ returned non-string (type method-wrapper)
>
>
> 2016-12-02 15:06 GMT+01:00 Carlos Andre >:
>
>> def __unicode__(self):
>> return "{0} [{1}]".format(self.titre[:200], self.id).__str__
>>
>>  def __unicode__(self):
>> return self.intitule.__str__
>>  
>>
>> 2016-12-02 10:03 GMT-03:00 Jean-Baptiste Pressac > >:
>>
>>> Hello,
>>> On Django 1.8 + Python 2.7.11, I have declared in Django admin.py an 
>>> oeuvre class with a ManyToManyField (types) to an TypeOeuvre class.
>>>
>>>
>>> class Oeuvre(models.Model):
>>> titre = models.CharField(max_length=510)
>>> types = models.ManyToManyField('TypeOeuvre',
>>>blank=True,
>>>verbose_name="Type(s) de l'œuvre")
>>> class Meta:
>>> ordering = ['titre']
>>>
>>> def __unicode__(self):
>>> return "{0} [{1}]".format(self.titre[:200], self.id)
>>>
>>> class TypeOeuvre(models.Model):
>>> intitule = models.CharField(max_length=100, verbose_name='Intitulé')
>>> commentaire = models.CharField(max_length=255,
>>>verbose_name='Commentaire',
>>>blank=True)
>>>
>>> class Meta:
>>> ordering = ['intitule']
>>> verbose_name = "Type d'œuvre"
>>> verbose_name_plural = "Types d'œuvres"
>>>
>>> def __unicode__(self):
>>> return self.intitule
>>>
>>>
>>>
>>> When I try to delete a TypeOeuvre object in Django Admin for which 
>>> relations to one oeuvre exists, the "Are you sure?" warning do not 
>>> explicitly mention the name of the oeuvre but displays a list of: 
>>>
>>> Oeuvre-typeoeuvre relationship: Oeuvre_types object
>>>
>>> I also reproduced the problem on Django 1.10 + Python 3.4.5 and using 
>>> __str__ instead of __unicode__.
>>>
>>>
>>> Is there a way to display the name of the oeuvres linked to the type ?
>>>
>>>
>>> Thanks,
>>>
>>>
>>> 
>>>
>>>
>>>
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to django-users...@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/f62bac64-d292-46ee-b23a-e0fc7a630706%40googlegroups.com
>>>  
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/django-users/MjQ-Dh2p4eQ/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> django-users...@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/CAA8yBMyvpT-ZfsoA48utAAy_-ghduitc_FHSXM2K5zBxvyqXQA%40mail.gmail.com
>>  
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Jean Baptiste Pressac
>

-- 
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/72a32244-a6cf-49cf-9630-6708654fbafc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: integrating themes in django

2018-05-10 Thread James Farris
This should give you an idea of what you have to do
Templates: https://tutorial.djangogirls.org/en/html/
Statics: https://tutorial.djangogirls.org/en/css/

On Thu, May 10, 2018 at 12:27 AM, Hitesh Goyal  wrote:

> Ok . Could you please provide a sample source where it has been
> implemented .
>
> On Thursday, May 10, 2018 at 12:48:44 PM UTC+5:30, James Farris wrote:
>>
>> Unless someone knows of an easier way, you will have to do some work to
>> get html/css/js themes integrated as you will have to create templates for
>> html and a static directory for css and js.  Then hook the css and js into
>> the template files you create.  It's not like a Drupal or Wordpress site
>> where you download a theme and install it.  It will take some finessing for
>> a ready made website theme to be integrated into a Django project.
>>
>> It sounds complex, but it really isn't that hard.
>>
>> On Wed, May 9, 2018 at 9:10 PM, Hitesh Goyal  wrote:
>>
>>> Hi team, I am new to Django.
>>> How can i integrate ready-made website themes in a django project ?
>>>
>>> --
>>> 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 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/ms
>>> gid/django-users/c54ea1fa-6cc2-413a-a841-9235a93469d4%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/344559c4-ecc3-4e21-8a2d-e842e078066e%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/CAE-E-_1Rnvt0-SGTk_iPXoW66rSHXqgeqr3ZM-4qXFy-wzQ2oQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: integrating themes in django

2018-05-10 Thread Hitesh Goyal
Ok . Could you please provide a sample source where it has been implemented 
. 

On Thursday, May 10, 2018 at 12:48:44 PM UTC+5:30, James Farris wrote:
>
> Unless someone knows of an easier way, you will have to do some work to 
> get html/css/js themes integrated as you will have to create templates for 
> html and a static directory for css and js.  Then hook the css and js into 
> the template files you create.  It's not like a Drupal or Wordpress site 
> where you download a theme and install it.  It will take some finessing for 
> a ready made website theme to be integrated into a Django project.
>
> It sounds complex, but it really isn't that hard.
>
> On Wed, May 9, 2018 at 9:10 PM, Hitesh Goyal  > wrote:
>
>> Hi team, I am new to Django.
>> How can i integrate ready-made website themes in a django project ?
>>
>> -- 
>> 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 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/c54ea1fa-6cc2-413a-a841-9235a93469d4%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/344559c4-ecc3-4e21-8a2d-e842e078066e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: integrating themes in django

2018-05-10 Thread James Farris
Unless someone knows of an easier way, you will have to do some work to get
html/css/js themes integrated as you will have to create templates for html
and a static directory for css and js.  Then hook the css and js into the
template files you create.  It's not like a Drupal or Wordpress site where
you download a theme and install it.  It will take some finessing for a
ready made website theme to be integrated into a Django project.

It sounds complex, but it really isn't that hard.

On Wed, May 9, 2018 at 9:10 PM, Hitesh Goyal  wrote:

> Hi team, I am new to Django.
> How can i integrate ready-made website themes in a django project ?
>
> --
> 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/c54ea1fa-6cc2-413a-a841-9235a93469d4%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/CAE-E-_2pjq65bYW0RuMHd7XrD3i94j9r_rWi0sCXY2hLFYXhNw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.