inventory in Django

2016-04-08 Thread Becka R.
Hi,

Sorry if this question seems basic, but I'm having trouble figuring out the 
best way to approach this on a high level. 

I'm at the beginning stages of building an ecommerce site,. Inventory 
changes regularly, and photos and descriptions need to be easy to update 
for my client. Is this an ajax problem or can this be done in views?  What 
are some elegant ways to approach this? I know this is a very common 
problem, which is great - direction would be helpful. 

Thank you.

Becka

-- 
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/ca77cc15-dd17-453a-a99b-f7dddfe88c50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


django dynamically updating dashboard

2016-03-28 Thread Becka R.
Hi,

I suspect this calls for celery, which I've never used.   Can someone point 
me in a direction of docs or a tutorial?

App examples would be amazing.  Thank you. 

Becka

-- 
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/da22c396-04a3-4377-be5f-57357908ce99%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


advanced beginner / early intermediate Django users

2016-03-19 Thread Becka R.
Hi there, 

This is less about solving a specific coding issue in Django, and more 
asking for input from other people who have hit walls in Django.  I hope 
this is within the scope of what this list is used for, and if it isn't I 
apologize. 

I've now written a couple of Django CRUD applications, and I keep running 
into walls in Django which I suspect are quite common to advanced beginners 
or early intermediate users.  I'm in the process of organizing a sprint, 
and am hoping to start working with people on gathering and creating 
resources for people who are beyond the core basics, but still learning 
some of the fundamentals. 

Some of the issues I really struggled with, and had blocks on included:
-  deployment 
- switching to Postgres
-  allowing a user to edit data in a modelform where there was a foreign key

I'm guessing these are all very common use cases, and that there are more 
which could be better documented.  I'm interested in helping to make it 
easier for people at my level to find resources and code samples,and I have 
two questions for the group:

1.  What are some of the common use cases you've struggled with? 
2. What resources, beyond the docs and official tutorial have you found to 
be helpful, accurate, and up to date with Django 1.9 (or 1.8) and 
associated packages?

Thanks so much for your ideas. 

Becka

-- 
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/3d7448a1-2d8d-4333-ad4a-9396f552b346%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


no migrations folder

2016-03-08 Thread Becka R.
Hi, 

My migrations aren't being created.  I think that's the problem, anyway - 
there's no migrations folder, and the table I've created doesn't exist when 
I search in the shell.  

Here's 'my file structure:


/ladynerds manage.py db.sqlite3 /ladynerds /static /templates __init.__py 
forms.py models.py settings.py urls.py views.py wsgi.py

And when I run manage.py makemigrations I get this traceback:

('/Users/rebeccaeliserobbins/Documents/repos/LadynerdsNEW/ladynerds/ladynerds/templates',)

look here:/static/

/Users/rebeccaeliserobbins/Documents/repos/LadynerdsNEW/ladynerds/ladynerds/views.py:7:
 
RemovedInDjango110Warning: django.core.context_processors is deprecated in 
favor of django.template.context_processors.

  from django.core.context_processors import csrf


/Users/rebeccaeliserobbins/Documents/repos/LadynerdsNEW/ladynerds/ladynerds/urls.py:27:
 
RemovedInDjango110Warning: Support for string view arguments to url() is 
deprecated and will be removed in Django 1.10 (got 
django.contrib.auth.views.login). Pass the callable instead.

  url(r'^login/', 'django.contrib.auth.views.login', 
name='foo',kwargs={'template_name': 'login.html'}),


/Users/rebeccaeliserobbins/Documents/repos/LadynerdsNEW/ladynerds/ladynerds/urls.py:28:
 
RemovedInDjango110Warning: Support for string view arguments to url() is 
deprecated and will be removed in Django 1.10 (got 
django.contrib.auth.views.logout). Pass the callable instead.

  url(r'^logout/', 'django.contrib.auth.views.logout', name='logout', 
kwargs={'next_page': index}),


System check identified some issues:


WARNINGS:

*?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 
1.8 and the TEMPLATES dictionary takes precedence. You must put the values 
of the following settings into your default TEMPLATES dict: TEMPLATE_DIRS.*

No changes detected



My templates are loading correctly except that I'm getting the "no such 
table" errors.  


What's going on?  I'm using Django 1.9


Thanks so much. 


Becka





-- 
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/f6f79414-6260-4f6e-9c4b-7719db3e11ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


I don't understand this error - Django 1.9

2016-03-04 Thread Becka R.
Hi, 

I'm building a pretty basic CRUD application for a community I'm part of.   
I'm now getting "ImportError: No module named [myappname]" when I run the 
server, and an operational error in the admin. 

I looked at the documentation, and followed the steps, but I'm not doing 
something correctly.  I'd like to 1) fix this, and 2) propose some changes 
to the docs to clarify this issue. 

My project is called "ladynerds" (We're a professional association for a 
bunch of women software engineers). 

Here's the documentation I'm following:

https://docs.djangoproject.com/en/1.9/ref/applications/

I'm using Django 1.9

*Here's my file structure:*

/ladynerds   (project file)
 /ladynerds  (app)
  __init__.py
  models.py
  forms.py
  settings.py
  urls.py
  views.py
  wsgi.py
  /static
  /templates
  

*Here's what I put into ladynerds/__init__.py:*


import apps

default_app_config = 'LadyNerds.apps.LadyNerdsConfig'


I've also tried using 'ladynerds.apps.LadyNerdsConfig'


*Here's what I put into ladynerds/apps.py:*

from django.apps import AppConfig

class LadyNerdsConfig(AppConfig):
name = "LadyNerds"
verbose_name = "LadyNerds"

*Here's my settings.py INSTALLED_APPS*


INSTALLED_APPS = (
'ladynerds.apps.LadyNerdsConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'ladynerds'
)


I'm getting:  ImportError: No module named LadyNerds

What am I missing?

And, thanks. 

Becka

-- 
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/2e9e6959-0dc6-4cfb-9fe1-5aaf77db852f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


allow both edits and additions in form

2015-12-03 Thread Becka R.
Hi,

I've been tryign to understand this for a while, and am pretty stuck.  I've 
googled extensively.

My form currently allows me to add items to teh datatable.

I want to be able to, in the same template, edit each row.  I put a button 
in each table row, and I want to get the pk for the item in that row, and 
then edit that item.  I don't understand how this is done. I've tried 
declaring an instance, but I got lost in the fog after that.  Thanks so 
much.  Code is below. 

I have a basic modelform:

*models:*

class Inventory(models.Model):
item = models.CharField(max_length=20, blank=True)
needs_repairs = models.BooleanField(default=True)
date = models.DateTimeField(auto_now_add=True, blank=True)

def __str__(self):
return '%s %s'%(self.item, self.needs_repairs)

*views*

def inventory(request):
model = Inventory
stuff = Inventory.objects.all()
   form = InventoryForm(data = request.POST)
if request.method == "POST":

if form.is_valid(): 
obj = form.save(commit=False)
obj.save() 

else:
form = InventoryForm()
context = RequestContext(request)
return render_to_response('inventory.html', {
'form':form, 'stuff':stuff
}, RequestContext(request))


*forms*

class InventoryForm(ModelForm):
class Meta:
model = Inventory
fields = '__all__'

*template*




Truck Inventory 

 


Whatcha got?
Needs Repairs
Change



{% for things in stuff %}

{{things.item}}
{{things.needs_repairs}}


   {% csrf_token %}
   
   
   

{% endfor %}







Add stuff

 {% csrf_token %}
  
   {{ form.as_ul}}

 
 






-- 
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/074cef57-c0d2-4f21-82d7-87912ec0e334%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: matching query does not exist.

2015-11-20 Thread Becka R.
Oh, this worked - thank you so much for the code help and explanation!

Much appreciated. 

B  

On Thursday, November 19, 2015 at 7:59:26 PM UTC-8, Andrew Farrell wrote:
>
> Hi Becka,
>
> So it seems like, from reading your code, that I can diagnose your issue.
> When a user clicks "sign up", in say the Thursday Shifts Available table, 
> the browser sends a POST from this form:
>  
> {% csrf_token %}
> 
> {{shift.meal}}
> {{shift.meal}}
> {{shift.camper}}
>   
> 
> 
> This POST includes the keys 'csrf_token', 'camper, 'meal', & 'meal' but 
> not 'shift_id'. Therefore, in 
>
> if request.method == 'POST':
> shift_id = request.POST.get('shift_id')
> signup_for_shift(shift_id, request.user)
> return redirect('signup')
> request.POST.get('shift_id') returns None.
> When that gets passed to mealShifts.objects.get(pk=shift_id), it  raises 
> the error.
> You can confirm that by inserting the line 
>   import pdb;pdb.set_trace()
> before that line and run `print(request.POST.get('shift_id'))` when the 
> django toy server hits that breakpoint.
>
> -- Andrew Farrell
>
> On Thu, Nov 19, 2015 at 9:31 PM, Becka R. <beck...@gmail.com 
> > wrote:
>
>> Hi --
>>  
>> I'm working on a personal project, and have been stuck on this problem 
>> for a bit of time.  There don't seem to be examples out there for editing 
>> tables with data. Is this right? Am I looking in the right places?  I'm 
>> still pretty new at Django, and learning largely on my own. 
>>
>> I have  a template wherein people can sign up for meal shifts at Burning 
>> Man. It doesn't use a form, because the table is populated with data, but 
>> until someone signs up for a shift, "camper" is set to None.  The page is 
>> rendering and displaying data correctly, but when I go to add myself as a 
>> logged in user, I get the following error:
>>
>> DoesNotExist at /signup/
>>
>> mealShifts matching query does not exist.
>>
>>
>> Code is below. Thanks for any help.  
>>
>>
>> Signup is the name of the template and the view function.  mealShifts 
>> (which I know needs to be capitalized) is the name of the model. 
>>
>> Here's the view:
>>
>> def signup_for_shift(shift_id, camper):
>> shift = mealShifts.objects.get(pk=shift_id)
>> if shift.camper is not None:
>> raise ValueError
>>
>> shift.camper = camper
>> shift.save()
>>
>>
>>
>> @login_required(login_url='login.html')
>> def signup(request):
>> model = mealShifts
>> user = request.user
>> poss_shifts = mealShifts.objects.all().order_by('day')
>> day_choices = range(0, 6)
>> meal_choices = ['Breakfast', 'Dinner']
>> shift_choices = ['Chef', 'Sous_Chef', 'KP']
>> username = None
>> 
>>
>> sundayShiftsAvail = mealShifts.objects.filter(day=0, assigned=False)
>> sundayShiftsTaken = mealShifts.objects.filter(day=0, assigned=True)
>>
>> mondayShiftsAvail = mealShifts.objects.filter(day=1, assigned=False)
>> mondayShiftsTaken = mealShifts.objects.filter(day=1, assigned=True)
>>
>> tuesdayShiftsAvail = mealShifts.objects.filter(day=2, assigned=True)
>> tuesdayShiftsTaken = mealShifts.objects.filter(day=2, assigned=True)
>>
>> wednesdayShiftsAvail = mealShifts.objects.filter(day=3, 
>> assigned=False)
>> wednesdayShiftsTaken = mealShifts.objects.filter(day=3, assigned=True)
>>
>> thursdayShiftsAvail = mealShifts.objects.filter(day=4, assigned=False)
>> thursdayShiftsTaken = mealShifts.objects.filter(day=4, assigned=True)
>>
>> fridayShiftsAvail = mealShifts.objects.filter(day=5, assigned=False)
>> fridayShiftsTaken = mealShifts.objects.filter(day=5, assigned=True)
>>
>> saturdayShiftsAvail = mealShifts.objects.filter(day=6, assigned=False)
>> saturdayShiftsTaken = mealShifts.objects.filter(day=6, assigned=True)
>>
>> saturdayShiftsAvail = mealShifts.objects.filter(day=7, assigned=False)
>> saturdayShiftsTaken = mealShifts.objects.filter(day=7, assigned=True)
>> 
>> if request.method == 'POST':
>> shift_id = request.POST.get('shift_id')
>> signup_for_shift(shift_id, request.user)
>> return redirect('signup')
>>
>> context = RequestContext(request)
>> return render_to_response('signup.html', 
>> RequestContext(request, {
>> 'username':username, 'poss_shifts':poss_shift

matching query does not exist.

2015-11-19 Thread Becka R.
Hi --
 
I'm working on a personal project, and have been stuck on this problem for 
a bit of time.  There don't seem to be examples out there for editing 
tables with data. Is this right? Am I looking in the right places?  I'm 
still pretty new at Django, and learning largely on my own. 

I have  a template wherein people can sign up for meal shifts at Burning 
Man. It doesn't use a form, because the table is populated with data, but 
until someone signs up for a shift, "camper" is set to None.  The page is 
rendering and displaying data correctly, but when I go to add myself as a 
logged in user, I get the following error:

DoesNotExist at /signup/

mealShifts matching query does not exist.


Code is below. Thanks for any help.  


Signup is the name of the template and the view function.  mealShifts 
(which I know needs to be capitalized) is the name of the model. 

Here's the view:

def signup_for_shift(shift_id, camper):
shift = mealShifts.objects.get(pk=shift_id)
if shift.camper is not None:
raise ValueError

shift.camper = camper
shift.save()



@login_required(login_url='login.html')
def signup(request):
model = mealShifts
user = request.user
poss_shifts = mealShifts.objects.all().order_by('day')
day_choices = range(0, 6)
meal_choices = ['Breakfast', 'Dinner']
shift_choices = ['Chef', 'Sous_Chef', 'KP']
username = None


sundayShiftsAvail = mealShifts.objects.filter(day=0, assigned=False)
sundayShiftsTaken = mealShifts.objects.filter(day=0, assigned=True)

mondayShiftsAvail = mealShifts.objects.filter(day=1, assigned=False)
mondayShiftsTaken = mealShifts.objects.filter(day=1, assigned=True)

tuesdayShiftsAvail = mealShifts.objects.filter(day=2, assigned=True)
tuesdayShiftsTaken = mealShifts.objects.filter(day=2, assigned=True)

wednesdayShiftsAvail = mealShifts.objects.filter(day=3, assigned=False)
wednesdayShiftsTaken = mealShifts.objects.filter(day=3, assigned=True)

thursdayShiftsAvail = mealShifts.objects.filter(day=4, assigned=False)
thursdayShiftsTaken = mealShifts.objects.filter(day=4, assigned=True)

fridayShiftsAvail = mealShifts.objects.filter(day=5, assigned=False)
fridayShiftsTaken = mealShifts.objects.filter(day=5, assigned=True)

saturdayShiftsAvail = mealShifts.objects.filter(day=6, assigned=False)
saturdayShiftsTaken = mealShifts.objects.filter(day=6, assigned=True)

saturdayShiftsAvail = mealShifts.objects.filter(day=7, assigned=False)
saturdayShiftsTaken = mealShifts.objects.filter(day=7, assigned=True)

if request.method == 'POST':
shift_id = request.POST.get('shift_id')
signup_for_shift(shift_id, request.user)
return redirect('signup')

context = RequestContext(request)
return render_to_response('signup.html', 
RequestContext(request, {
'username':username, 'poss_shifts':poss_shifts,
'sundayShiftsAvail':sundayShiftsAvail, 
'sundayShiftsTaken':sundayShiftsTaken,  
'mondayShiftsTaken':mondayShiftsTaken, 
'mondayShiftsAvail':mondayShiftsAvail,  
'tuesdayShiftsTaken':tuesdayShiftsTaken, 
'tuesdayShiftsAvail':tuesdayShiftsAvail,  
'wednesdayShiftsTaken':wednesdayShiftsTaken, 
'wednesdayShiftsAvail':wednesdayShiftsAvail, 
'thursdayShiftsTaken':thursdayShiftsTaken, 
'thursdayShiftsAvail':thursdayShiftsAvail,  
'fridayShiftsTaken':fridayShiftsTaken, 
'fridayShiftsAvail':fridayShiftsAvail,  
'saturdayShiftsTaken':saturdayShiftsTaken, 
'saturdayShiftsAvail':saturdayShiftsAvail
},))



Here is my model:


class mealShifts(models.Model):
Sunday = "Sunday"
Monday = "Monday"
Tuesday = "Tuesday"
Wednesday = "Wednesday"
Thursday = "Thursday"
Friday = "Friday"
Days = (
(0, "Sunday"),
(1, "Monday"),
(2, "Tuesday"),
(3, "Wednesday"),
(4, "Thursday"),
(5, "Friday"),
(6, "Saturday"),
)
Breakfast = "Breakfast"
Dinner = "Dinner"
Meals = (
(Breakfast, "Breakfast"),
(Dinner, "Dinner"),
)
Chef = "Chef"
Sous_Chef = "Sous-Chef"
KP ="KP"
Shifts = (
(Chef, "Chef"),
(Sous_Chef, "Sous_Chef"),
(KP, "KP"),
)
assigned = models.BooleanField(default=False)
day = models.IntegerField(choices=Days)
meal = models.CharField(max_length = 10, choices=Meals)
shift = models.CharField(max_length = 10, choices=Shifts, default=KP)
camper = models.ForeignKey(User, null=True, blank=True, default=None)

class Meta:
unique_together = ("day", "meal", "shift")

def __str__(self):
return '%s %s %s %s %s %s'%(self.id, self.assigned, self.day, self.meal, 
self.shift, self.camper)


And my template:


 


Day
Meal
Shift
Camper
Camper




{% for shift in sundayShiftsTaken %}

Sunday
{{shift.meal}}
{{shift.shift}}
{{shift.camper}}

{% endfor %}
{% for shifts in mondayShiftsTaken %}

Monday
{{shifts.meal}}
{{shifts.shift}}
{{shifts.camper}}

{% endfor %}
{% for shifts in tuesdayShiftsTaken %}

Tuesday
{{shifts.meal}}
{{shifts.shift}}

n00b question about displaying data in order by day

2015-11-06 Thread Becka R.
Hi --

I'm building a scheduling app for my burning man camp.  There are seven 
days (Mon-Sun), and each day has two meals, and people can sign up for the 
available shifts. 

Here's my table:


class mealShifts(models.Model):
Sunday = "Sunday"
Monday = "Monday"
Tuesday = "Tuesday"
Wednesday = "Wednesday"
Thursday = "Thursday"
Friday = "Friday"
Days = (
(Sunday, "Sunday"),
(Monday, "Monday"),
(Tuesday, "Tuesday"),
(Wednesday, "Wednesday"),
(Thursday, "Thursday"),
(Friday, "Friday"),
)
Breakfast = "Breakfast"
Dinner = "Dinner"
Meals = (
(Breakfast, "Breakfast"),
(Dinner, "Dinner"),
)
Chef = "Chef"
Sous_Chef = "Sous-Chef"
KP ="KP"
Shifts = (
(Chef, "Chef"),
(Sous_Chef, "Sous_Chef"),
(KP, "KP"),
)
assigned = models.BooleanField(default=False)
day = models.CharField(max_length = 10, choices=Days, default=Sunday)
meal = models.CharField(max_length = 10, choices=Meals, default=Dinner)
shift = models.CharField(max_length = 10, choices=Shifts, default=KP)
camper = models.OneToOneField(User)

class Meta:
unique_together = ("day", "meal", "shift")

def __str__(self):
return '%s %s %s %s'%(self.day, self.meal, self.shift, self.camper)



And my views function:

def signup(request):

shifts = mealShifts.objects.all()

username = None

if not request.user.is_authenticated():

return 

if request.method == 'POST':

form = MealForm(request.POST)

if form.is_valid():

shift = form.save(commit=False)

shift.camper = request.user

shift.save()

return redirect('signup')


else:

form = MealForm()

return render_to_response('signup.html', 

RequestContext(request, {'form':form,'shifts':shifts, 
'username':username},))


 
And here's the part of the template that displays the shifts:


Shifts





{% for shift in shifts %}

{{shift.camper}} {{shift.day}} {{ shift.meal }} 

{% endfor %}









How can I display the data in the template so the shifts are sorted by day, 
and then by meal?

Thank you,

Becka

-- 
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/3f3144db-8efc-4630-8911-7dbb25da488d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


looking for a basic model form example

2015-10-24 Thread Becka R.
Hi there, 

I'm seeing a lot of pretty conflicting explanations for constructing a 
basic model form that gets and posts data.  Can anyone point me to a 
succinct example?  I'm looking at the official tutorial, and don't 
understand which parts are fundamental, and I'm seeing a lot of other 
possible ways to approach this particular problem.  I'm also stumbling over 
get_url, and wondering if it's something I need for a form?  If someone 
could point me to a simple working example, I'd really appreciate it.  

Thanks, 

Becka

-- 
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/e40db231-19c7-4ccf-a876-7fd4b232d8bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: solution to static file loading issue on 1.8

2015-10-23 Thread Becka R.
Hi, 

I'd love to understand why, exactly, it did make a difference.  All I know 
for sure is that after four hours of trying various possibilities,  this is 
what removed the error. 

Thanks!

On Friday, October 23, 2015 at 10:25:23 AM UTC-7, Tim Graham wrote:
>
> Hi Becka,
>
> You've provided the default value for STATICFILES_FINDERS so putting that 
> in your settings shouldn't make a difference. An example of 
> STATICFILES_DIRS is given at:
>
> https://docs.djangoproject.com/en/1.8/howto/static-files/
>
> If you have a suggestion about how to improve the docs that would be 
> welcome.
>
> On Friday, October 23, 2015 at 12:18:13 PM UTC-4, Becka R. wrote:
>>
>> Hi,
>>
>> I just spent  hours on this problem, and (at last) stumbled into the 
>> Stack Overflow answer, and wanted to preserve this for posterity.
>>
>> I'm using Django 1.8, and wasn't able to get my static files to load on 
>> my local server.  I finally found the Stack Overflow answe 
>> <http://stackoverflow.com/questions/29957604/django-1-8-static-files-doesnt-work>r
>>  
>> that made all the difference - pasted below.
>>
>> I haven't seen this in the official docs for Django 1.8.  
>>
>> Snippet below: 
>>
>> I put this in my settings.py:
>>
>> STATICFILES_FINDERS = (
>> "django.contrib.staticfiles.finders.FileSystemFinder",
>> "django.contrib.staticfiles.finders.AppDirectoriesFinder",)
>> STATICFILES_DIRS = (
>> os.path.join(BASE_DIR, "static"),)
>>
>>

-- 
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/f16ec345-4890-4876-a9e9-dda445c0b748%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


solution to static file loading issue on 1.8

2015-10-23 Thread Becka R.
Hi,

I just spent  hours on this problem, and (at last) stumbled into the Stack 
Overflow answer, and wanted to preserve this for posterity.

I'm using Django 1.8, and wasn't able to get my static files to load on my 
local server.  I finally found the Stack Overflow answe 
r
 
that made all the difference - pasted below.

I haven't seen this in the official docs for Django 1.8.  

Snippet below: 

I put this in my settings.py:

STATICFILES_FINDERS = (
"django.contrib.staticfiles.finders.FileSystemFinder",
"django.contrib.staticfiles.finders.AppDirectoriesFinder",)
STATICFILES_DIRS = (
os.path.join(BASE_DIR, "static"),)

-- 
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/b39b9768-24fe-4459-9d8f-8d68e2194f46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.