Re: how many visitors has view my posts and how many visitors view my site

2016-01-22 Thread Lucas Magnum
Thought about using Google Analytics for that?

[]'s

Lucas Magnum.

2016-01-22 13:02 GMT-02:00 Xristos Xristoou <saxr...@gmail.com>:

> hello,
>
>
> i want to know  how many people view my site and how many view one to one
> my posts specific.
> my site is simple i have two templates one with all my post and one with
> post details.
> but i dont know how to do that i am new in django.
>
>
> the start is to add a new field in my class
>
> view = models.IntegerField(default=0)
>
>
> any idea ?any documentation to help me ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To 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/50bcbc55-107b-4fec-b67b-9217aec5082d%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/50bcbc55-107b-4fec-b67b-9217aec5082d%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Template can't find image file

2015-12-08 Thread Lucas Magnum
Have you changed your urls.py?
https://docs.djangoproject.com/en/1.9/howto/static-files/#serving-static-files-during-development





[]'s

Lucas Magnum.

2015-12-07 21:45 GMT-02:00 Gary Roach <gary719_li...@verizon.net>:

> While I'm working with "Tango with Django" I am using Django 1.8 and
> Python 3.4 (debian linux).
>
> My project tree (somewhat truncated) is in the /root directory and looks
> as follows:
>
> tango
> ├── bin
> ├── include
> ├── lib
> └── tango
> ├── db.sqlite3
> ├── __init__.py
> ├── manage.py
> ├── rango
> ├── requirements.txt
> ├── static
> │   ├── images
> │   └── __init__.py
> ├── tango
> │   ├── __init__.py
> │   ├── __init__.pyc
> │   ├── __pycache__
> │   ├── settings.py
> │   ├── settings.pyc
> │   ├── urls.py
> │   └── wsgi.py
> ├── tango.nja
> └── templates
> ├── __init__.py
> └── rango
>
> The pertinent parts of the settings.py file are:
>
> BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
>
> TEMPLATES = [
> {
> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
> 'DIRS': [os.path.join(BASE_DIR, 'templates')],
> 'APP_DIRS': True,
> 'OPTIONS': {
>
> STATIC_PATH = os.path.join(BASE_DIR, 'static')
>
> STATIC_URL = '/static/'
>
> STATICFILES_DIRS = (
> STATIC_PATH,
> )
>
> The rango index.html file is:
>
> 
>
> {% load static from staticfiles %}
> 
>
> 
> Rango
> 
>
> 
> Rango says...
> hello world! {{ boldmessage }}
> About
> 
> 
>
> 
>
> The apache2.png is just a handy image file.
>
> The result of 127.0.0.1:8000/rango/   is:
>
> Rango says...
> hello world! I am bold font from the context
> About
> Picture of Apache logo
>
> I've tried everything I can think of to try to get the image served and
> have totally failed. The firefox debugger just says "failed to load the
> given URL"
>
> What am I doing wrong.
>
> Gary R
>
>
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/56661A1E.30803%40verizon.net
> .
> 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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAB7jOxe-yN%3DVDpUc8ZzgX%2B8tw2CWf7OTTHA2svbeHm3G1sMPQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to count the amount of objects in a django joined table?

2014-02-03 Thread Lucas Magnum
{% for user in object_list %}
 
 {{ user.id }}
 
 Number of assets: {{ user.assets_set.count }}
 

{% endfor %}


[]'s

Lucas Magnum.


2014-02-03 hykyd <chrisvele...@gmail.com>:

> My problem is simple: I have **Users** who own **Assets** or **Assets**
> which belong to Users If you prefer and I cannot make it to retrieve the
> number (count) of **Assets** each **User** has. I know this might be sound
> silly to most of you but I am new to python/django (coming from PHP/MySQL)
> and I do not know how things work here. I do not want to be engaged with
> raw SQL - this would be my last choice If nothing else works.
>
> (*) I have removed all non-related raws from the code
>
> **Users**
>
> class Users(models.Model):
> firstname = models.CharField(max_length=100)
> lastname = models.CharField(max_length=100)
>
> **Assets**
>
> class Assets(models.Model):
> serial = models.CharField(unique=True, max_length=100)
> user = models.ForeignKey('Users', blank=True, null=True)
>
> # this is what I am playing with to retrieve the number of assets
> each user owns
> @classmethod
> def user_assets(self):
> return Assets.objects.filter(user=user).count()
>
> **views.py**
>
> class UserList(ListView):
> model = Users
> def get_context_data(self, **kwargs):
> context = super(UserList, self).get_context_data(**kwargs)
> context['user_assets'] = self.model.user_assets()
> return context
>
> **template**
>
> {% for user in object_list %}
>  
>  {{ user.id }}
>  
>  {{ user_assets }}
>  
>  
> {% endfor %}
>
> How can I get that number? I have read about aggregations, annotations and
> filters but can't really get it.
>
> I am looking for a simple solution by using class based views and easily
> expandable (I may want to add other models later)
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e43421ba-5d8f-4f89-85ca-edeb6ff6e1f3%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAB7jOwJNjPC6LkPcK26eMZN463%2BZHXi65Xg%2B1ziwQjVfX9x8Q%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: CreateView and get_context_data()

2013-11-22 Thread Lucas Magnum
Timothy,
The "get_context_data" is called in *get* method, once you override it
"get_context_data" isn't called anymore.

You can see in
http://ccbv.co.uk/projects/Django/1.4/django.views.generic.edit/CreateView/







[]'s

Lucas Magnum.


2013/11/22 Timothy W. Cook <t...@mlhim.org>

> I am trying to setup some context variable for use in a template when
> I execute a create view.
>
> class ReviewTitleCreateView(CreateView):
> model = Review
> form_class = ReviewTitleCreateForm
> template_name = 'papers/review_title.html'
>
> def get_context_data(self, **kwargs):
> context = super(ReviewTitleCreateView,
> self).get_context_data(**kwargs)
> context['title'] = self.paper__title
> print('Title: ',self.paper__title)
> return context
>
>
> def get(self, request, *args, **kwargs):
> form = self.form_class(initial=self.initial)
> return render(request, self.template_name, {'form': form})
>
> def post(self, request, *args, **kwargs):
> form = self.form_class(request.POST)
> if form.is_valid():
> # 
> form.save()
> return HttpResponseRedirect('#')
>
> return render(request, self.template_name, {'form': form})
>
> The 'Title: ' isn't even printed in the terminal nor is it available
> in the template.  Well, it is available I suppose (there is no error)
> but empty.
>
> The Review model:
> class Review(models.Model):
> """
> A review at a specific stage of one paper.
> """
> INCLUDE_CHOICES = [(True,'Include'),(False,'Exclude')]
> STAGES = [('Selection by Title','Selection by Title'),('Selection
> by Abstract','Selection by Abstract'), ('Selection by Full
> Text','Selection by Full Text')]
>
> paper = models.ForeignKey(Paper, verbose_name=_('Paper'),
> related_name="%(app_label)s_%(class)s_related", null=False,
> blank=False, help_text=_("The reviewed paper."))
>
> include = models.NullBooleanField("Choice",
> choices=INCLUDE_CHOICES, default=True, null=False, blank=False,
> help_text="Select Include or Exclude for this stage of review.")
>
> exclusion_choice = models.ForeignKey(Exclusion, null=True,
> blank=True, related_name="%(app_label)s_%(class)s_related")
>
> exclusion_text = models.TextField(null=True, blank=True)
>
> def __str__(self):
> return self.paper.title
>
> ===
>
> Thoughts?
>
>
>
>
>
>
> --
> MLHIM VIP Signup: http://goo.gl/22B0U
> 
> Timothy Cook, MSc   +55 21 94711995
> MLHIM http://www.mlhim.org
> Like Us on FB: https://www.facebook.com/mlhim2
> Circle us on G+: http://goo.gl/44EV5
> Google Scholar: http://goo.gl/MMZ1o
> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3UmCCE-Dd%3DdjdVgCUpwG8N7DL37zXx_C3hWZCrbeV2C7Q%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAB7jOxez1Zc10ByvR5gXgr65xKMc%3Dg7ASD4KJz33oRQt9UC1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: ImproperlyConfigured at /admin/polls/poll/add/ 'model' is a required attribute of 'PollAdmin.inlines[0]'.

2013-10-23 Thread Lucas Magnum
Rename the attribute "mode" to *model* in the ChoiceInline.

[]'s

Lucas Magnum.


2013/10/23 Adrian Paul Ciobanita <adrian.cioban...@gmail.com>

> Hello, i've been playing with Django 1.5.4 for some TDD tutorials,
> examples, and tried to also do the tutorial :
> https://docs.djangoproject.com/en/1.4/intro/tutorial02/#adding-related-objects
> BUT i keep receiving this error, as suggested in the Subject:
>
>> ImproperlyConfigured at /admin/polls/poll/add/
>
> 'model' is a required attribute of 'PollAdmin.inlines[0]'.
>>
>
> This is my admin.py content:
> from django.contrib import admin
>
>
> from polls.models import Choice, Poll
>
>
> class ChoiceInline(admin.StackedInline):
> mode = Choice
> extra = 2
>
> class PollAdmin(admin.ModelAdmin):
> fieldsets = [
> (None, {'fields': ['question']}),
> ('Date information', {'fields': ['pub_date'], 'classes':
> ['collapse']}),]
> inlines = [ChoiceInline]
> list_display = ('question', 'pub_date', 'was_published_recently')
> search_fields = ['question']
> list_filter = ['pub_date']
>
> admin.site.register(Poll, PollAdmin)
>
> If i change admin.py and i'm left with:
> admin.site.register(Poll)
>
> Then i have no problem whatsoever with accessing, creating, deleting polls.
>
> Can any of you please point out in the right direction? It get's really
> frustrating. :(
>
> Below is the output/stacktrace from the server:
> Internal Server Error: /admin/polls/poll/add/
> Traceback (most recent call last):
>   File
> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/handlers/base.py",
> line 103, in get_response
> resolver_match = resolver.resolve(request.path_info)
>   File
> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py",
> line 319, in resolve
> for pattern in self.url_patterns:
>   File
> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py",
> line 347, in url_patterns
> patterns = getattr(self.urlconf_module, "urlpatterns",
> self.urlconf_module)
>   File
> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py",
> line 342, in urlconf_module
> self._urlconf_module = import_module(self.urlconf_name)
>   File
> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/utils/importlib.py",
> line 35, in import_module
> __import__(name)
>   File "/home/teach3r/work_dir/tutorials/mysite/mysite/urls.py", line 5,
> in 
> admin.autodiscover()
>   File
> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/__init__.py",
> line 29, in autodiscover
> import_module('%s.admin' % app)
>   File
> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/utils/importlib.py",
> line 35, in import_module
> __import__(name)
>   File "/home/teach3r/work_dir/tutorials/mysite/polls/admin.py", line 19,
> in 
> admin.site.register(Poll, PollAdmin)
>   File
> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/sites.py",
> line 98, in register
> validate(admin_class, model)
>   File
> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/validation.py",
> line 184, in validate
> "of '%s.inlines[%d]'." % (cls.__name__, idx))
> ImproperlyConfigured: 'model' is a required attribute of
> 'PollAdmin.inlines[0]'.
>
> Thx in advance.
>
> Kind 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5d666f2e-6c3b-4997-b88b-8f47968ac410%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAB7jOzzgjLnOU0_iM%2BaZo%3D2_QyZexbgwcG5Xp8Tn6ntPOvorQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: RequestContext and request.user

2013-08-16 Thread Lucas Magnum
Robin,
RequestContext, includes TEMPLATE_CONTEXT_PROCESSORS results.
request is a result of "django.core.context_processors.request".

https://docs.djangoproject.com/en/dev/ref/templates/api/#subclassing-context-requestcontext

[]'s

Lucas Magnum.


2013/8/16 Robin Lery <robinl...@gmail.com>

> Hello,
> I am all confused about these two things:
> context_instance = RequestContext and request.user
>
> Are they both equal? I suppose RequestContext includes a user varialble
> from the given template. And request.user would also give the current
> user's info, i guess. Can someone please give me insight about these two.
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: ajax and django

2013-07-26 Thread Lucas Magnum
https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax

[]'s

Lucas Magnum.


2013/7/26 Lucas Magnum <lucasmagn...@gmail.com>

> Are you passing crsf_token in ajax post?
>
> []'s
>
> Lucas Magnum.
>
>
> 2013/7/26 heni yemun <heno...@gmail.com>
>
>> Hi,
>> I'm trying to get a django project interact with ajax based site. The
>> problem is that when i use the send function to send a POST data
>> asynchronously the django app returns a 500 code and the server doesn't do
>> anything. How do i correct this?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: ajax and django

2013-07-26 Thread Lucas Magnum
Are you passing crsf_token in ajax post?

[]'s

Lucas Magnum.


2013/7/26 heni yemun <heno...@gmail.com>

> Hi,
> I'm trying to get a django project interact with ajax based site. The
> problem is that when i use the send function to send a POST data
> asynchronously the django app returns a 500 code and the server doesn't do
> anything. How do i correct this?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Issues saving form data

2013-06-14 Thread Lucas Magnum
Hi Tom,

Maybe I can help you.
Skype: lmagnum92





[]'s

Lucas Magnum.


2013/6/14 Tom Russell <t...@caregointl.com>

> I am having some issues saving data from a form and not sure why since it
> was working just yesterday.
>
> Could someone take a look offline to give me some feedback on what I am
> doing wrong? It's a small project but this has me stumped. Also, is
> anyone available via skype to talk in regards to some of my issues?
>
> Thanks,
>
> Tom
>
> --
> 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 http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Django tutorial - The "python manage.py startapp polls" command

2013-05-27 Thread Lucas Magnum
Try: python manage.py syncdb if you already put 'django.contrib.admin' in
your INSTALLED_APPS (settings.py file).


[]'s

Lucas Magnum.


2013/5/27 Shashwat Srivastava <shashr...@gmail.com>

> The "python manage.py startapp polls" command doesnt create a admin.py
> file inside polls. I tried creating a admin.py file and running it but i
> get this error when I try to use it.
>
> DatabaseError at /admin/polls/poll/1/
>
>
> no such table: django_admin_log
>
>
>
> I think the autogenerated code wasnt generated and this is causing some 
> problems. How do I fix it?
>
>  --
> 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 http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: newbie- delete confirmation

2013-05-16 Thread Lucas Magnum
http://ccbv.co.uk/projects/Django/1.4/django.views.generic.edit/DeleteView/

As you can see, when you send a post request to DeleteView it execute the
"delete" method of object.
What o have to do is, send a post request for your view.

In template you can put a submit input with value "confirm" and when user
submit a form, the object will be delete.




[]'s

Lucas Magnum.


2013/5/16 tony gair <tonytheg...@gmail.com>

>
> I'm making a cbv with django braces
>
> I'm wanting to delete a record with a confirm form , does anyone know of
> an exampple to show me how to do this
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Collectstatic not working

2013-02-10 Thread Lucas Magnum
Remove the
 os.path.join(PROJECT_PATH, 'static'),
>From staticfiles_dir by default this already included.



[]'s

Lucas Magnum.


2013/2/10 Satinderpal Singh <satinder.goray...@gmail.com>

> I am trying to configure the static files for my project by following the
> Django guide https://docs.djangoproject.com/en/dev/howto/static-files/
>  My project is like this:
>
>  Automation
>  |
>  |-static
>  | |
>  | |-css
>  | |-js
>  |-__init__.py
>  |-settings.py
>  |-urls.py
>  |-wsgi.py
>  |
>  |-myapp
>  |
>  |-templates
>
> PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
> STATIC_ROOT = os.path.join(PROJECT_PATH,'static')
> STATICFILES_DIRS = (
>  os.path.join(PROJECT_PATH,
> 'static'),
> )
> On running ./manage.py  collectstatic in the terminal, gives following
> message.
>
> "The STATICFILES_DIRS setting should "
> django.core.exceptions.ImproperlyConfigured: The STATICFILES_DIRS setting
> should not contain the STATIC_ROOT setting
>
> How could i solve this problem.
>
> --
> Satinderpal Singh
> http://satindergoraya.blogspot.in/
> http://satindergoraya91.blogspot.in/
>
> --
> 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 http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.